Voltage Divider Question

Discussion in 'The Projects Forum' started by ppenumbra, Nov 17, 2014.

1. ppenumbra Thread Starter New Member

Jun 16, 2013
3
0
Hi there,

Complete neophyte to the electronics world, I've attempting to put the theory to work and a touch confused.

I'm using an Arduino to drive a gauge. The gauge is effectively a voltmeter with a maximum input of around .815V, as measured with a cheap meter. I slowly stepped up the voltage using PWM on the Arduino to get to that figure, stopping at 42 out of 255. Calculating the estimated output (42 / 255 * 5V), I get a slightly higher output of .823.

I'd like to have maximum control of the gauge. So, I'm thinking I should use a voltage divider to step down the max output of the Arduino (5V) to max at .82-ish, allowing me to use all 255 stops instead of just 42. I understand the basic math of the voltage divider, but I'm curious why I would use one set of resistors versus another.

Whether I use a 5k R1 and a 1k R2, or a 500/100 pair, the ratio remains the same. Given this gauge requires very little amperage, why would I use one pair or another?

Also, I'm thinking I should estimate a little aggressive with the final output V. If the circuit steps the 5V down too far, I won't reach the 100% mark on the gauge. Any thoughts on the voltage drop seen in the real world, would be helpful. As noted above, the theoretical 16% of the 5V put out by the Arduino is more like .815V of 4.93 max potential.

Thank you.

2. Alec_t AAC Fanatic!

Sep 17, 2013
7,098
1,478
For starters you need to consider that a) the Arduino output has a finite resistance which is effectively in series with the voltage divider and will drop some voltage, b) the gauge input has resistance which is in parallel with the bottom resistor of the voltage-divider so will pull the voltage down, and c) the resistors have a tolerance so won't necessarily have their marked values. All three factors mean you'll probably need one of the resistors to be adjustable to set the exact voltage you want.
R1 and R2 values are a compromise. Too low and they will overload the Arduino output. Too high and their division ratio will be affected by noise, stray capacitance and the swamping effect of the gauge resistance.
As a rule of thumb, the divider resistors need to have several times more resistance than the Arduino output and several times less resistance than the gauge.

3. MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,071
You don't need a divider, just a resistor in series with the meter...

Try this. Start with a 1K pot. Set it to full resistance. Put the pot (as a two-terminal rehostat) between the Arduino pin and the meter. Set the PWM to 255. Turn the pot until meter reads full scale. Remove from circuit, and measure the resistance of the Pot. Use a fixed resistor of the appropriate value in place of the pot.

btw- if 1K pot is not enough resistance, start with a 5K or 10K pot instead.

#12 likes this.
4. #12 Expert

Nov 30, 2010
17,893
9,309
MikeML has the answer. You are over-thinking this. What you do is use the full scale current requirement of the meter and add a resistor that limits 5 volts to that current.

The resistance of the meter, and it's current needs, are almost always a little off from the specifications, but they will be stable across time. When you get the series resistance dialed in, use a 1% resistor and forget about it for 10 to 20 years.

Trust me. I used to do this for my day job.

Last edited: Nov 17, 2014
5. ppenumbra Thread Starter New Member

Jun 16, 2013
3
0
Thanks for the recommendations! I had originally thought to just use a resistor, then digging around that seemed like the wrong move. I will take your recommended approach. Thanks!

6. WBahn Moderator

Mar 31, 2012
20,225
5,749
I'd start the other way around. If you start with 1K and it isn't enough, they you may overdrive and damage the meter.