Pages: [1]   Go Down
Author Topic: Best Resistors for a voltage divider  (Read 766 times)
0 Members and 1 Guest are viewing this topic.
South Africa
Offline Offline
Sr. Member
****
Karma: 0
Posts: 360
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I need to monitor my supply voltage ( usually around 13,8vDC ), so assume I need a voltage divider into an analog pin on my Mega 2560.

From what I read, I need 2 resistors ( R1 & R2 ) connected as  Vin --- R1 --- pin A1 --- R2 --- Gnd.

Question : is it better to use higher valued resistors, or lower ( and why ) ?

For example :

R1 = 10,000 (10k)
R2 = 1,000 (1k)
10000 + 1000 = 11000 / 1000 = 11 : 1 ratio.
In software, I should multiply the analog read voltage by 11 to get the real value.

R1 = 10,000 (10k)
R2 = 4,700 (4k7)
10000 + 47000 = 14700 / 4700 = 3.127 : 1 ratio.
In software, I should multiply the analog read voltage by 3.127 to get the real value.

R1 = 1,000 (10k)
R2 = 220
1000 + 220 = 1220 / 220 = 5.55 : 1 ratio.
In software, I should multiply the analog read voltage by 5.55 to get the real value.

Logged

Offline Offline
Edison Member
*
Karma: 57
Posts: 2194
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Lower values present more load on your circuit.
Metal-film resistors, 1%, temp. stable, not "expensive".
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

South Africa
Offline Offline
Sr. Member
****
Karma: 0
Posts: 360
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK. So best option ( using components I have ) would be :

R1 = 10,000 (10k)
R2 = 3,300 (3k3)
10000 + 3300 = 13300 / 3300 = 4.03 : 1 ratio.
In software, I should multiply the analog read voltage by 4.03 to get the real value.

Am I correct then to assume that the MAX Vin would then be :  4.03 x 5v = 20.15vDC ?

Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 443
Posts: 23850
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Vout = (Vin * R2)/(R1+ R2)
Vout (R1  + R2) = Vin R2
Vout (R1 + R2) / R2 = Vin
5V (10000 + 33000) / 3300 = 20.1V, analog reading of 1023

Analog Reading * 0.00488 = voltage at input pin, assuming default settings and Vcc = 5V.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Online Online
Shannon Member
****
Karma: 162
Posts: 10513
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Make the resistors as high as possible without taking the input impedance presented to the analog pin above 10k.  So something like 27k and 15k would work and present the least load.  They combine to produce an impedance of about 10k (compute the parallel equivalent).

In a noisy environment (high currents being switched, high voltages etc), reduce the values by a factor of ten or so might be a wise precaution, as would adding a 10nF capacitor from analog pin to ground.

If you make the resistors really low in value they will heat up significantly, worth avoiding.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: