# read external 6V power source via 5V driven arduino?

I need to check external 6V voltage for a servo circuit
on my 5V USB driven arduino uno
-
in order to not waste power & "over-power" the arduino's
analog pin reading the external 6Vt:
- should i use a voltage divider with high resistor values?

i look forward to your advice …

sort by: active | newest | oldest
marc_is_curious (author) 3 years ago

thanks a lot for all of your helpful replies ...

.

.

@ seandogue & steve

an opamp_buffer / zener surely is a secure way to transfer

the voltage in between the 2 circuits;

will get, test & add them

.

@ iceng

according to your advice: i will use 2* 10k resistors

for my voltage divider

.

@ jack

i tried several combinations – 10/10MOhms down to 220/220Ohm–

and received all the same results (pls. see below) ...

truetrue: i noticed a (non consistent) change of values immediately

after powering my circuit from time to time

- i then let it rest for a second & all went back to normal

(probably due to the caps storing but not unloading power immediately

or the sampling rate <-- arduino uno default 16MHz, 9600bps )

.

.

these are my measuring results:

with

voltage divider resistors

10 MOhm , 10 MOhm

... down to …

220 Ohm , 220 Ohm

.

.

Volt & voltage divider output

6.1V = 682

6.0V = 679

5.7V = 636

5.0V = 586

4.4V = 497

3.7V = 412

2.2V = 250

1.89V = 204

1.60V = 176

.

.

i will use a 10k/10k voltage divider

optionally including opamp_buffer or zener (still need to test them)

.

thanks, again for your support!

3 years ago

To maximize your voltage readings' accuracy, you should try to make the divider such that the maximum input voltage will be just under the maximum input voltage for the analog input.

seandogue3 years ago

Ideally, one uses a divider with an opamp buffer (gain=1) between the voltage you're reading and the arduino's analog input.

(0-6V source) ---> (~100k divider) ---> opamp_buffer ---> arduino_input.

iceng3 years ago

Do not forget the analog input has an input impedance that will affect the divider.

This input impedance varies from UNO to UNO see details at

http://forum.arduino.cc/index.php?topic=65134.0

Any way upshot is use 10K or less 1% hand selected metal film resistors.

3 years ago

Quote

"During an actual sample, the input resistance is temporarily a lot lower
as the sampling capacitor is charged up so it is recommended that
whatever you connect to the A/D have an output impedance of 10k or less
for best accuracy."

Jack A Lopez3 years ago

The input impedance of one of the GPIO pins configured as "high impedance", and connected to the ADC, is large, but I don't know how large.

Naturally you want the output resistance of your divider to be smaller than this, like maybe 10 or 100 times smaller. BTW, the output resistance of a voltage divider is just the resistance you'd get for R1 and R2 in parallel. (and if R1=R2, then Rout=0.5*R1=0.5*R2)

I was looking for a documented answer to this, but it may be easier to puzzle it out through experimentation.

That is, try R1=R2=10 MOhm, and see if the Arduino's ADC is measuring this correctly, i.e. if the numbers it gives are the same as those on an ordinary voltmeter, divided by 2.

I am guessing that R1=R2=10 MOhm, is too high, and this will cause the ADC to measure a value too low.

Also try voltage dividers made from:

R1=R2=10 = {1 MOhm, 100 KOhm, 10 KOhm, 1 KOhm}

Hopefully you'll see some change in the numbers produced by the ADC, and this will give you some sense of how big the resistors in your divider can be before the measurement becomes skewed.

BTW, regarding the gritty details of how the ADC actually works, I found this:

http://www.atmel.com/images/atmel-8032-using-the-a...

They say the maximum output resistance of a voltage source being measured by the ADC depends on the sampling rate. Essentially, here's a tiny capacitance in there, and larger output resistance means that capacitance needs longer time to charge, and sampling it too fast (before it is close to fully charged) results in measurement (too low?) error.

It looked complicated. That's why I am suggesting you try to discover empirically the maximum resistance for your divider.

Note: a better test would involve alternating your measurements of the divider output, with some other analog voltage measurements, like you would for a real application. That way the voltage on the tiny capacitance on the ADC is getting changed to different values. You ?might? get misleading results from a test that is always measuring just one, constant, voltage, assuming in such a test the voltage on the tiny ADC capacitor also never changes.

steveastrouk3 years ago

Yes, just use a divider. You can also be paranoid/sensible, and put a 5.1 V zener across the resistor feeding the arduino.