Differential input conversion using Arduino Uno

I need to perform a A/D conversion for a differential signal using Arduino Uno. I have tried a software method where I connect one i/p to A0 and another to A1, read ADC for both channels and then subtract it in the code. But the 100 ms time to convert the analog signals is causing some errors as it is not perfectly a differential signal conversion(ie there is some delay between the two samples taken and hence it is not exactly differential signal.)

Now I am not sure about this, but can I connect one of the analog inputs to the Arduino Uno GND pin and then perform a conversion for the other signal ie one i/p to ground of Arduino another to A0 of arduino and then perform A/D conversion for A0. Would this be correct? Would it cause damage from a circuit perspective? Is there any other metod without using an external differntial ADC?



if the two systems are not connected (e.g. common power ground) then its OK to connect one of the analog outputs to Arduino gnd.
!!!!! the signal going to analog input must never go negative, (see datasheet)
A diode may be a safeguard. Refer to components datasheet to find if output may be shortcircuit proof

Hi, just did something similar with an external subtractor using a single Opamp. Rather simple, but not a software solution. Rgds Robert

An analog conversion on the arduino does not take 100 milliseconds.

If yours are taking that long, you are doing it the wrong way.

Thanks a lot for the inputs.

@knut_ny "if the two systems are not connected (e.g. common power ground) then its OK to connect one of the analog outputs to Arduino gnd.!!!!!"

I am not very good in the circuits part, so could you please explain a little bit more on why this is so. Also would this provide a conversion of the differential signal?

@Robert Getzner I was kinda hoping there might be a solution without external circuit. But hey if there is no other go, then ya we got to do it the right way. Perhaps I should go for a differential amplifier circuit i guess.

@michinyon It was 100 micro seconds. My bad. I got this value from the analogread() api reference.

connecting the analog output from A to GND of B makes the analog voltage the reference voltage.
By doing this you can measeure the difference of the two outputs.
No harm is done (like a bird on power line)
..but make very sure to keep systems from connect to common GND.
They cannot connect to USB at the same time (on one PC)
As mentioned earlier: make sure analog input dont get negative voltage