0

I want to use the 3.3v on a cheap Arduino Nano clone as my ADC analog reference voltage. The 3.3v comes from a regulator inside the CH340 USB serial chip.

I've measured the voltages (My DMM is NOT calibrated) on seven different Nanos and the voltages vary (2.96-3.38v).

I'm happy to calibrate each board to this voltage, but are there any figures available on how stable this 3.3v supply is? Long term and temperature wise?

5
  • Datasheet says? Commented Nov 22, 2017 at 4:16
  • Very little, just that it's a 3.3v LDO rated to 25mA
    – John
    Commented Nov 22, 2017 at 4:18
  • The internal analog voltage reference of 1.1V is better. That voltage can be 1.0 to 1.2V so you have to determine it for each board (just once). After setting the analogReference to 1.1V, you can measure the actual voltage at the aref pin: pighixxx.com/test/portfolio-items/nano Why do you need a reference of 3.3V? Is it for a analog sensor running at 3.3V?
    – Jot
    Commented Nov 22, 2017 at 9:58
  • I wanted to try the 3.3v as the input voltage from USB (VCC) differs on each host it's plugged into. I'm wanting to measure an external battery voltage. It goes through a voltage divider with high precision resistors, but if I divide it down to a max of 1.0 volts, I have to use very high precision resistors for the divider circuit.
    – John
    Commented Nov 23, 2017 at 2:39
  • @John see my answer; in any case your 3.3V varies not only from host to host, but also during the time. If you want a precise measure, use an external reference, otherwise you'll have to calibrate the internal one. And if you don't want to use a high reducing of the input voltage, use the trick I wrote in the answer (measure the reference and then use that measure to compensate)
    – frarugi87
    Commented Nov 23, 2017 at 13:20

1 Answer 1

1

Using the VCC as voltage reference is ok only if

  1. you accept poor performances or
  2. you need to measure a ratiometric output.

Case 2 is because the output depends on VCC (so you compensate). For instance, if you want to get the value of position in a potentiometer, you have that the voltage you see is Vo = Vcc * X (where 0<=X<=1 is the position), then the result you have on your ADC is Y = Vi / Vcc * k = X * k (where k is the maximum value of the ADC reading - e.g. 1023). So you actually compensate the Vcc deviation.

If you want to measure an absolute voltage, however (case 1) you will have a lot of uncertainties. For instance, if your current varies during the time (for instance you turn on the LED), the Vcc voltage can vary quite a lot. This is why for precise measurements you always must use a voltage reference.

In your case, you can

  1. Use the internal reference - for the Atmega328 it is nominally 1.1V, but it can range from 1.0V to 1.2V
  2. Use an external reference

You have to keep in mind that the voltage reference is the maximum value you can read. For instance, if you use the internal reference and then try to measure a 2.3V, you will not be able to do it (you will read the maximum value of 1.1V)

In order to fix this, you can use a trick: use Vcc as reference, and then use a voltage reference to get a precise calibration every time you need to measure something. For instance, if you have to read values from ADC1 and ADC3, you can

  1. Read the value of the internal/external reference
  2. Read ADC1
  3. Read ADC3
  4. Use the reading in point 1 to be able to guess what ADC1 and ADC3 readings were

This way you compensate for variations in the supply.

Just note that, even if the internal reference is not very precise (it has a 10% deviation from the standard value), it is indeed stable, while the VCC varies (a lot) during time. So if you have to calibrate, calibrate against the internal reference and not the Vcc.

If you can afford an external voltage reference, these are usually very stable and have very little deviation from sample to sample, so you may assume their value is "fixed"

2
  • Thanks, I don't quite understand where the voltage reference connects to - I'm pretty sure I cant connect a voltage reference up to ARef and simultaneously use VCC as the reference. In your example did you mean to, leave ARef internally connected to VCC, connect the precise reference to ADC1 and my analog input ADC3?
    – John
    Commented Nov 23, 2017 at 21:34
  • @John In fact it was implicit that you have to attach the reference to another ADC channel, and treat it as another input. Then you can make the measruements relative to that one. If you use the internal reference, you have a special channel (look on the datasheet) used to read the voltage, but of course you will have to use the VCC as reference
    – frarugi87
    Commented Nov 24, 2017 at 12:31

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.