Voltage dividers and load

Hi all,

I am trying to measure the voltage across the battery in a motorcycle. I have used a voltage divider driving a unity gain Op Amp and plugged the output of the op amp into an analogue port on a Mega 2560. I then calibrated it and it works fine. Until I put a load (bulb) across the battery. I am assuming the effect of the resistance of the bulb (being effectively in parallel with the voltage divider) is affecting the voltage out from the divider.

Is there a better way for me to measure the voltage across the battery.

It is a 6 volt system if that is important.

Thanks

Z

The Op Amp was suggested by a colleague at work who said it would remove any impact of the Arduino's analogue port impedance so I thought I would give it a try. But the problem I am having is the same whether the Op Amp is in circuit or not.

When there is no load on the battery and my meter says 6v the Arduino agrees. If I substitute a 4.5v battery the Arduino still agrees as it does when I use a 9v battery. So I am happy with my calibration.

But if I use the 6v battery and then stick a bulb across the battery terminals I gets 5.6v on the meter but 4.9 on the ?Arduino. With my limited understanding of electronics I am assuming this is because the resistance of the bulb is effectively in parallel with the voltage divider resistance and therefore changing the characteristics of the voltage divider.

Z

Its a dead simple Voltage Divider:

+---------- +ve
|
|
R1
|
------+ Vin = 6V
Vo |
R2
|
------+----------- Gnd

The Op Amp is now out of the circuit as it makes no difference to the issue.

The problem is if I put a bulb across the battery then the relationship of Vo to Vin changes.

Z

The problem is if I put a bulb across the battery then the relationship of Vo to Vin changes.

How? Where are you connecting the bulb? If the bulb goes between Ve and Gnd, the relationship between Vo and Vin (presumably ve in the diagram) doe not change. The actual value of Vo will change, as ve drops while supplying the load demanded by the bulb, but, presumably that is what you are trying to measure.

Arduino analogue input impedance is not your problem.
From the AVR datasheet, RAIN is 100Mohm.

What are the values of your R1 and R2?

The bulb goes across Vin (+ve and gnd on my diagram). ie across the battery.

I have tried 5.6K and 4.3K and also 10k and 4.3k. I was wondering if resistors in the Meg range might be better.

Z

I am assuming this is because the resistance of the bulb is effectively in parallel with the voltage divider resistance and therefore changing the characteristics of the voltage divider.

This is a wrong assumption.

What is happening is that the bulb is taking more current than the battery can supply and so the battery voltage is actually dropping. Try a lower wattage bulb and see or measure the current through the bulb. Also try a fully charged battery.

Mike,

I understand what you are saying but the battery is fully charged and the bulb in question is a bulb of the type used on the bike.

I have calibrated the circuit and the Arduino using a 4.5v battery and a 9v battery.

The problem is if I put the 6v battery in circuit and measure the voltage with my DMM then I get 6.2v. The display on the Arduino agrees. If I put the bulb across the battery (with it still in circuit) the voltage drops to 5.4v on the DMM but to 4.9v on the Arduino display,

This is why I think the resistance of the bulb being in parallel with the voltage divider is influencing it somehow.

Z

Fair enough.

I will strip it all down and recheck everything. Now I know that the problem is not fundamental I will start over.

Thanks to everyone for your help and perseverance.

Z

I have calibrated the circuit and the Arduino using a 4.5v battery and a 9v battery.

The problem is if I put the 6v battery in circuit and measure the voltage with my DMM then I get 6.2v. The display on the Arduino agrees. If I put the bulb across the battery (with it still in circuit) the voltage drops to 5.4v on the DMM but to 4.9v on the Arduino display,

You really need to show your "calibrated" code. How does what the arduino is reporting compare to Vo/gnd as measured by the multimeter?

Why not start with checking your calculations (how you convert from an analog value to a voltage)? If your circuit is ok there really isn't much else that can be wrong.

A bit more research has shown me that the voltage I am getting from the divider is about .5v less than I am calculating. This is without connection to the Arduino. So I will remake the voltage divider on stripboard and not breadboard as I am currently doing.

It is fast becoming obvuous that the problem lies with the voltage divider itself.

I will report back.

Thanks again all.

Z

You know a nice 10 turn trim pot makes a great adjustable voltage divider that you can then calibrate manually to your hearts desire. :wink:

A bit more research has shown me that the voltage I am getting from the divider is about .5v less than I am calculating.

Well yes, calculations get one in the ball park, but measuring the actual values is the only way to see what the actual output is when using parts that probably have a +-10% accuraccy.

The strange thing is I am getting 0.5v difference when calculating using actual measured resistance. There is obviously some "hidden" resistance in there somewhere!

Z

Well, in electronics things generally "work the way they are wired". I suspect you have bad wiring, or more probably bad code since no code has been provided.

Done some more research which has only confused me more.

This is the circuit:

It is not connected to the Arduino.

R1 = 5680K
R2 = 4744K
Vin = 5.937V

Therefore if my understanding is correct:

R2
Vout = ---------- x Vin
R1 + R2

4744
Vout = --------------- x 5.937
4744 + 5680

Vout = 4744
------- x 5.937
10424

Vout = 2.702V

Whereas I am measuring Vout as 2.195V. I have used both a Fluke and AVO and both give the same answer +/- 0.001V.

Am I being a complete idiot and missing something here?

Z

The values are measured. Again with 2 different meters (not that I am clutching at straws or anything).

Z

The values are measured. Again with 2 different meters (not that I am clutching at straws or anything).

Why not show us the "real thing". That is how your code converts an ADC reading to a voltage across R2.

Also I assume 5680k should read as 5.68k, right?

BenF - No the resistors are in the Mega Ohm range, At this point I am trying to figure out why I am getting voltage readings which are not what I calculate they should be so the Arduino is not connected.

Richard - I will give that a try.

Z