7
\$\begingroup\$

I'm testing the Seeeduino v4.2 board with the ADCInOutSerial code in the Arduino IDE and the lowest voltage the board can read is 18 mV, showing an equivalent ADC of 4 on the serial monitor. The chip that the board uses is the ATmega328P. It works on a 5 V power supply and has a 10-bit ADC (1024 levels), so the voltage that I calculated for an ADC level of 1 is, 5/1024 = x/1, where x is the equivalent voltage for the ADC level of 1, which comes to 5 mV.

But the board fails to read anything below 18 mV. Is this normal for the chip to be unable to read an ADV value below 18 mV or am I going wrong somewhere?

I tested the voltage using a multimeter.

\$\endgroup\$
  • \$\begingroup\$ Please note that Atmega328P has an internal 1.1V reference, so you can use it instead of your ~5V Vcc for a bit more precision. Just call analogReference(INTERNAL) \$\endgroup\$ – Nyos Sep 19 at 20:34
  • \$\begingroup\$ You can go as low as 1.000V on the AREF pin too, although for 10 bit alignment you might want a precise 1.023V (1mV resolution). Instrumentation class Op-Amps can be used for higher resolution at lower voltages. \$\endgroup\$ – mckenzm Sep 20 at 3:34
19
\$\begingroup\$

See data sheet section 28.8 ADC Characteristics: typical offset error 2 LSB and typical gain error 2 LSB. Absolute accuracy (INL, DNL, gain error, offset error, etc) could be typically 4.5 LSB under some operating conditions. These are Typical, not Min/Max guaranteed specs. So yes it’s pretty much normal behavior. You can buy an external ADC that has guaranteed min/max performance specs. But the internal ADC trades convenience for performance. Oh and by the way, your multimeter probably has its own measurement error specs, check the booklet it came with.

\$\endgroup\$
  • \$\begingroup\$ to experiment with effects of sampling-charge, add 1,000pf or 10,000pf from analog input to ground. \$\endgroup\$ – analogsystemsrf Sep 19 at 1:49
10
\$\begingroup\$

Aside from the theoretical and worst-case chip specs mentioned elsewhere, there's also a possible source of error in the voltage drops across copper traces.

Grounds are not equipotential at mV level with currents in the mA level or higher flowing through typical 1oz copper, so you could be reading that voltage drop. When you measure the voltage going into the chip put the negative lead of your meter directly on the GND pin nearest the Aref pin.

\$\endgroup\$
7
\$\begingroup\$

The ADC will have some zero offset on it, and so will any signal conditioning electronics (e.g. an op-amp) around it.

If you need accurate ADC measurements, it is usual to apply some self-calibration. On power-on, the signal input will be disconnected temporarily from the ADC, and the micro checks the ADC reading with a guaranteed 0V input. The micro can then subtract that value from real ADC readings, to get the actual voltage on the input.

For applications which need even better measurement accuracy, it is also common to add a further self-calibration stage at power-on where a known reference voltage was switched onto the signal input temporarily. By knowing the actual voltage, you can scale the ADC reading up or down as required. If you only have an ADC in the system then this is not needed, because ADCs on their own are accurate enough. However if you have some kind of signal conditioning circuit before the ADC, this will correct for gain errors due to component tolerances in the rest of the circuit.

\$\endgroup\$
3
\$\begingroup\$

With a '328P, it's generally 5V/1024, or ~4.88mV. If Vcc is lower, such as 4.75V from USB, then it'll be a little lower.

Actual usable will be as discussed elsewhere.

\$\endgroup\$

Your Answer

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

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