# CH340 3.3v stability

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?

• 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) Commented Nov 23, 2017 at 13:20

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.

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