17
\$\begingroup\$

I'm using the ACS712 hall-effect based current sensing chip on some small robotic arm motors, and reading in the analog voltage with an Arduino Uno. I've had reasonably good results, but only after putting in an RC filter on the output. However, in the application note on the datasheet, it says not to do that:

"the addition of an RC filter to the output of a sensor IC can result in undesirable device output attenuation — even for DC signals."

Then it gives a formula to calculate attenuation, but it depends on knowing the input impedance of whatever is reading the signal, so that's what I'm after here.

\$\endgroup\$
23
\$\begingroup\$

There are several factors here.

First, the input impedance of the ADC. The ATmega328P uses a Successive approximation ADC. As such, the input is basically the input to a comparator, so the ADC has very high input impedance.

enter image description here

The ADC is specified as having a 100 MΩ (that is MegaOhm) input impedance.
However, this seems somewhat suspicious to me. Together with the fact that there is no analog input leakage specified, I would guess that this is the electrical characteristics of just the ADC, rather then the ADC together with the entire IO pin structure. I would guess that the ADC IO lines that are shared with digital IO have much more leakage current (1 uA from the docs) then the IO lines that are analog-only (50 nA, assuming that the SAR comparator is similar to the analog comparator input topology).


However, there is another consideration here, which is the reason that Atmel specifies the < 10 KΩ source impedance:
Input Capacitance

enter image description here

Basically, the input connections to the ADC inside the chip, after the multiplexer have some capacitance. If you look at the equivalent circuit for the ATmega ADC input:
enter image description here

You can see what the input looks like.

The problem with high source impedances arises when you are switching the input multiplexer from one pin to another. If you have two inputs, one at 0.5V and one at 4.5V, when you switch from one to the other, the input has to charge (or discharge) that 14 pF capacitor.

If the signal source is very high impedance, having to charge the capacitor may cause the input voltage to drop temporarily. If the ADC converts on the input while is is still charging the capacitor, you will get an incorrect value.

This can probably be dealt with by letting the ADC input settle for a period of time after switching ADC channels, but the best way to deal with it is to simply ensure that the input source can charge the capacitance fast enough that it's not a problem.

\$\endgroup\$
  • 1
    \$\begingroup\$ Nicely spelled out. \$\endgroup\$ – gwideman Apr 19 '14 at 2:19
  • 2
    \$\begingroup\$ I know this is an old question, but how would one "simply ensure that the input source can charge the capacitance fast enough that it's not a problem."? \$\endgroup\$ – RubberDuck Nov 23 '16 at 23:53
  • 2
    \$\begingroup\$ @RubberDuck - If your input is of high or unknown impedance, buffer it, using something like a op-amp configured as a unity-gain voltage follower. \$\endgroup\$ – Connor Wolf Nov 24 '16 at 1:41
  • \$\begingroup\$ +1 for "There is capacitance here". Now I understand it. \$\endgroup\$ – Eiver Jun 28 '17 at 11:40
8
\$\begingroup\$

The datasheet isn't entirely clear.

http://www.atmel.com/images/atmel-8271-8-bit-avr-microcontroller-atmega48a-48pa-88a-88pa-168a-168pa-328-328p_datasheet_complete.pdf

(24.6.1) Page 244 states: "The ADC is optimized for analog signals with an output impedance of approximately 10 kΩ or less. If such a source is used, the sampling time will be negligible. "

That's the closest to anything I ever found in the datasheet that talks about the ADC's impedance.

\$\endgroup\$
  • \$\begingroup\$ If you need an exact value, 100MΩ is listed in Table 29-15 on page 310. \$\endgroup\$ – Brian Gordon May 24 '18 at 8:39
  • \$\begingroup\$ It calls it "Analog Input Resistance" -- So, charging a 14 pF cap through this? Better have something on the front end, I'd say. I use .01 caps for DC voltages that don't change quickly. \$\endgroup\$ – SDsolar May 25 '18 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy