I thought there was a problem with the optocoupler limiting the safe input voltage range to 10V. I can’t find the thread now where this was first reported.
The software side would be best done as a user app, I think. There are reserved app spaces for user apps on the 2MB flash drive.