A perfect 10:1 voltage divider using only one resistor value!

Hi,

a voltage divider uses two resistors.
For a dividing ratio of 10:1 you need R and 9*R.

a) The common E12 resistor values do not provide values in that ratio.
b) You frequently have many resistors of the same value already in the drawer.

This trick does the job perfectly with only 6 resistors of the same value.

Put 3 resistors in parallel between GND and analog input. --> R/3
Put 3 resistors in serie between analog input and your measurement. --> 3 R

You have got the perfect ratio 1:10.
Enjoy!

RIN67630:
For a dividing ratio of 10:1 you need R and 9*R.

You have got the perfect ratio 1:10.

(R/3):(3*R) = 1:9 (= 1/10 of the voltage across the lower value).

You should at least have a selection of E12 resistors.
1k:(2*18k in parallel) or 1k:(6k8+2k2) is also 1:9, and uses only three resistors.

1:9 is just one of the many ratios used.
If you measure a 12volt car battery with 1.1volt Aref, you might need 1:14
This online calculator might be helpful.
Leo..

Wawa:
(R/3):(3*R) = 1:9 (= 1/10 of the voltage across the lower value).
You should at least have a selection of E12 resistors.

You should know, that Murphys Law stipulates: the one you will need is just the one that you just miss.

My point is that you just need one single resistor value, from the unused ones with less used values that you have laying around in the drawer since >15 years... e.g. 68KΩ
Additionally if you use all resistors from a same batch, you will reach a perfect accuracy.
Of course, you may use a resistor more to get 13V or one less to get 7V etc in steps of 3V...

The voltage source impedance as input to the Arduino ADC should not exceed 10K Ohms, so resistor value selection in a voltage divider is not at all arbitrary. 3x68K in parallel would be way out of spec.

jremington:
The voltage source impedance as input to the Arduino ADC should not exceed 10K Ohms, so resistor value selection in a voltage divider is not at all arbitrary. 3x68K in parallel would be way out of spec.

Out of spec? Which spec?

cf. Atmel 328P Manual page 310: "Rain Analog Input Resistance 100 MΩ"

Unless you want to tease the ADC at its maximum speed, and miss to implement a software filter, a source impedance of up to ~ 100 KΩ is absolutely fine.

From the Atmega datasheet, page 244:
"The ADC is optimized for analog signals with an output impedance of approximately 10k or less"
Leo..

Wawa:
From the Atmega datasheet, page 244:
"The ADC is optimized for analog signals with an output impedance of approximately 10k or less"
Leo..

"The ADC is optimized for" <> "Specifications".

Here is the complete statement: 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. If a source with higher impedance is used, the sampling time will depend on how long time the source needs to charge the S/H capacitor, which can vary widely.

So what was not understandable in "...unless you want to tease the ADC at its maximum speed, and miss to implement a software filter..." ?

RIN67630:
You have got the perfect ratio 1:10.

Well no, things are not that simple - if you use 5% resistors you have a ratio within a few percent,
so using 10k/91k is fine. With 1% resistors this trick is reasonable, but often completely unneeded:

The ratio is not critical if you calibrate - the calibration in software can compensate for the divider
and the ADC's reference voltage, so you can save a few components.

If you do want high accuracy in hardware, you're going to use 0.1% resistors or similar which are
available in better than just the E12 values(!)

Also 47k+33k = 90k, which means you can get 9:1 with just 3 resistors in E12, also 10k+10k:180k,
12k+18k:270k, there are many possibilities with less than 6 resistors.

And with even 2 resistors you can get pretty accurate: 9.1k:82k is a 1:9.011 ratio

RIN67630:
Out of spec? Which spec?

cf. Atmel 328P Manual page 310: "Rain Analog Input Resistance 100 MΩ"

It sounds to me that this is the input impedance of the analog pin. This should indeed be very high (ideally: infinite, but 100MΩ comes pretty darn close for most real world applications). That is something different than the output impedance of whatever signal you want to measure (which as stated should be not much more than 10kΩ).

Trying to measure a signal with a 100 MΩ output impedance will be pretty hard using that ADC. That's why e.g. pH probes come with special amplifier boards. Those sensors have such a high output impedance that they can not be read directly.

wvmarle:
It sounds to me that this is the input impedance of the analog pin. This should indeed be very high (ideally: infinite, but 100MΩ comes pretty darn close for most real world applications). That is something different than the output impedance of whatever signal you want to measure (which as stated should be not much more than 10kΩ).

Yes it is the input impedance of the analog pin. The output impedance of the sensor should be theoretically around < 1000 times lower to mess the voltage less than the ADC can resolve: 100KΩ.

But in practice the ADC accuracy is far less than 1%, so even around 470KΩ will do.

That of course only if you are not time critical. You may also need a high impedance to avoid disturbing your source or e.g. avoid draining current needlessly on battery.

I use to read the input twice. It works perfectly.

MarkT:
The ratio is not critical if you calibrate - the calibration in software can compensate for the divider
and the ADC's reference voltage, so you can save a few components.

If you do want high accuracy in hardware, you're going to use 0.1% resistors or similar which are
available in better than just the E12 values(!)

The point, again, was not to purchase 0.1% resistors to your design, but to use what lays in your drawer.
Beside that, the ADC isn't that accurate at all...

For me, it was also to measure at 1v range and 10v range on the same settings, but that is another story.