Greetings scorca,I'm thinking to transfer it in analog first and then convert it to digital right before microcontroller (or can be converted by the microcontroller also)
Optocoupler is usually a LED operating a transistor via light, so the output is making the transistor on.what is output of the optocoupler? If it is just an isolation, in my mind input would be the same as output. Is it true or false?
If you have the luxury of code space and sufficient processing time, I too would recommend you take the varying frequency from the voltage-to-frequency converter that has passed through the opto-coupler and feed it directly to the microcontroller. The result is the elimination of A-to-D converter and the frequency-to-voltage converter.If the data is going to a microcontroller, it's easier to leave it in the form of a frequency rather than converting back to analog. We know the processor will digitize it again anyway.
Of course there would need to be some electronics on the "hot" side of the system, but if the solar panel can't provide enough power to run the circuit, the microcontroller would just say "No input" anyway.