1
\$\begingroup\$

I have a SO2 sensor (CiTiceL 3MS/F) which has differential voltage output. I'd like to read this using the Arduino MEGA 2650. If I use a separate battery for the sensor and the arduino, can I connect the high output to one analog pin, the low output to a second pin, and subtract the voltages?

\$\endgroup\$
7
  • 1
    \$\begingroup\$ The devices need to share a common ground. Yes, you could do this, but you'll be sacrificing resolution, as you'll have different sampling errors on both channels. \$\endgroup\$ Commented Aug 26, 2013 at 21:48
  • 1
    \$\begingroup\$ The Arduino's A/D pins have fairly low input impedance (at least compared to a JFET input op-amp). This might work, but in addition to the A-D problems (doing the differential conversion in the quantized digital-domain instead of the analog domain), you're likely to have weirdness due to the loading down of the differential outputs (which is probably meant to go into a high-Z op-amp). In fact, it's even worse, since the input impedance of the A0-A5 pins is somewhat dynamic due to the multiplexed nature of the A/D, so your readings might depend on sampling order, etc. \$\endgroup\$
    – Zuofu
    Commented Aug 26, 2013 at 21:54
  • 1
    \$\begingroup\$ Since the output of the sensor likely changes slowly, you can take many readings and average them - a situation in which random noise actually increases your resolution, easily overcoming the stacking of error from having to measure two signals. So if you don't distort the signal by loading it with the ADC, you may actually be able to get decent results this way. But unless you have a means of calibrating your entire system end-to-end, you won't really know. \$\endgroup\$ Commented Aug 26, 2013 at 22:03
  • \$\begingroup\$ Which AVR does your Arduino use? Some of them do have differential ADCs. \$\endgroup\$ Commented Aug 26, 2013 at 23:59
  • \$\begingroup\$ Updated. Ignacio, which ones do? I haven't been able to find them. \$\endgroup\$ Commented Aug 27, 2013 at 0:28

1 Answer 1

5
\$\begingroup\$

Setting MUX[5:0] to an appropriate value will allow you to perform a differential ADC on the ATmega2560 with various levels of gain. See the ATmega2560 datasheet, §26.8.2, "ADCSRB – ADC Control and Status Register B" for details.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.