How would you measure an external voltage with the arduino ADC (eg ups battery, or another supervised PSU) and at the same time maintaining ground isolation between the two systems?
I thought of using an external ADC and then optoisolate on the digital side, however the ADC then needs to be powered from the system that is being measured which is not a good idea.
It won't be easy. Even a straight analog signal still needs common ground for Arduino ADC to work correctly. Otherwise the input would seem to float and your reading would be all over the board.
Can you use another power source? Power the ADC externally, read analog from whatever you need to read (and share ground), send signal digitally via optoisolator to Arduino.
The ADC is referenced to the Arduino's ground. (It has to be referenced to something.)
The Arduino's ground can "float" relative to earth ground (and other grounds) and in fact if you are running it from a power supply or battery the Arduino's ground is probably isolated from everything else.
For example, a battery-powered multimeter doesn't have a "ground" although the black lead is probably connected to an internal-isolated ground.
But if you connect the USB port to a computer, that may provide another ground path so don't expect it to be isolated if you're using USB.
Watcher:
I thought of using an external ADC and then optoisolate on the digital side, however the ADC then needs to be powered from the system that is being measured which is not a good idea.
Any other ideas?
You don't have to power the floating AtoD from the system being measured, you can get DCtoDC converters that have input and outputs isolated.
Just check what voltage you are measuring to make sure the isolation is high enough.
Tom...
What about putting the complete Arduino at the external voltage side ? and use a isolated USB ? 35 dollars is a lot of money, I hope there are cheaper modules.
If you need good isolation and accuracy , a V-F convertor, optocoupler , and F-V at the arduino end would be very robust. Or ( perhaps better) you could use the arduino to measure the frequency directly. 0.1% accuracy after calibration should be easily achievable.