Scaling a nominal 48V battery bank voltage for a 5V analog input

Started by Jedon, November 30, 2009, 04:05:58 PM

Previous topic - Next topic

Jedon

I have a board I want to use to log battery voltage.  It takes a 5V input.  Board normally reads things like wind speed, air temp, solar radiation, that kind of thing.

Here is info on the board:
http://automata-inc.com/datasheets/MINI-SS%20Field%20Station.pdf

Analog Sensor Inputs (10 bit): 0-5V
0-1mA
0-20mA
4-20mA
Signal conditioning available for 1 channel to accommodate mV signals.
4 analog inputs with lightning protection

The board has it's own 12V battery ( about 4"x4x"5") with an on board charger.
-Jedon
[ who knows just enough to be really dangerous ]

Moderator note:  this thread wandered through the woods, with confusion about what was needed, what the product was, etc., so I've edited it to to the bone to record the useful info for someone who needs to scale an analog voltage for an A/D input. There were lots of good comments that led to figuring out what Jedon needed, thanks to all.

BruceM

Jedon, for just voltage scaling, you could just do a voltage divider, as you planned with a pot, but as Jens pointed out, you'll need a higher resistance pot. It might be slightly more accurate with temperature change with metal film resistors, but I doubt it's worth the bother.

The current across this resistor voltage divider (pot or fixed resistors) will be a drain on your battery bank at all times, so you'd like it to be a high resistance.  Also, you should know what the input impedance of the A/D board you are using is. If it requires a 10K ohm impedance input, for example, then you will have to use an op amp voltage follower to drive the A/D board input, and then your scaling pot can be 1Mohm. There are lots of nice micropower op amps (200uA or less).

Another factor is how many bits of of resolution you need and your A/D has. On my battery bank charge controller (BBCC) I needed a 10 bit A/D value to represent 110V to 160V of my battery bank. That means a range of 50 volts divided by 1024 (10 bit A/D)  or about 0.05 volts resolution, +-0.05V accuracy.

If I just used a voltage divider and op amp follower, I would get only about 0.16 volts resolution.   A simple resistor divider can't do better than that.

But with op amps you can do simple math, in this case the difference between to values times another (scalar).  On another thread I posted that schematic here to the forum.  You're welcome use it if you do need to, and I can help you change the values to what you need for your 48 volt bank.  If your A/D is 10 bit, you get about 0.048 volts resolution, perhaps that is sufficient for your needs.  If you have 12 bits A/D, you should be sitting pretty with just a voltage divider.

Jedon

I asked an engineer and he said:
Quote
The easiest way is to use a couple of resistors, preferably 1% value.

The formula is Vout = (R1/(R1+R2))Vin.

We have 10k and 86.6k in 1% tolerance.  Plugging that in, we get 10 / 96.6 * 48 = 4.969 volts

The current drain of this combination is 48 volts / ( R1 + R2 ) = 0.5 mA

Power = I^2R or 0.0005 * 0.0005 * 96600 = 0.024 watts

The resistors are 1/8 watt, so they shouldn't get hot when operating.

An op amp is only necessary if the input that is reading the voltage pulls too much current.  Usually voltage input channels pull very little current, so the buffer probably won't be needed.  At the worst, your readings might be slightly low.

BruceM

Your tech support guy blew smoke, he doesn't know the input impedance. Hook up a 100K trim pot across 5V, with the wiper to the A/D and see if the data tracks across the measured by VOM voltage. If it doesn't you'll have to use an op amp.

His suggested 100K ohm divider is a good value, that gets you to safe cool watts for even 1/8 watt resistors  but the values need to be adjusted for 64.8 volts max, if your equalizing at 16.2V per 12V battery.  

For 0-64.8V scaled to 0-5 volts, you will get resolution of 0.063 volts per bit with a 10 bit A/D, which is what you have.  If this is acceptable, you don't need to use a 40-64.8 scaler via op amps, which would give you 0.024 volt resolution.

The values of the resistors for 0-64.8 volts I believe are 92.284 Kohms and 7.716 Kilohms, which I checked on the calculator that WJ kindly provided. (see below.)  A 100K 1/4 watt multiturn cermet trim pot will work well and be stable enough for your resolution.  You don't use audio or single turn pots for this sort of thing. Metal film resistors are best for accuracy and temperature stability.

For heat dissipation of a 100K resistor across 64.8 volts:  watts= volts x amps. In this case, 64.8 x (64.8/100K)= 0.042 watts. 1/8 watt resistors are fine, you're about 1/3 of rated, which is cool and good.




Jedon

Thanks Bruce!
I think that resolution should be fine, not sure exactly what it means though :-D

BruceM

Sorry, Jedon, it's hard for old engineers to speak english. I'll try again, let me know if I blew it again.

Your 10 bit A/D has a full range of 0-1024. When you read the A/D value, you will get an integer (whole number) between 0 and 1024 that represents the voltage sampled between 0 and 5V.  

Your resolution is the smallest change in voltage that you can detect.  With just the 64.8 to 5V voltage divider, and your 10 bit A/D, it will be 0.063 volts, and your accuracy is typically +/- one bit or +/- 0.063 volts.

So each bit of the integer A/D value is worth 0.063 volts, that is your limiting resolution...you can't see changes in voltage less than 0.063 volts.

Jedon

That was perfect Bruce, thank you. I'm very used to the 0-1024 values since I process the data from the board all the time, but haven't been involved with the hardware side.
I only speak software engineer not electrical engineer :-D

BruceM

Jedon,
I started out a "soft head", too.  I'll be able to explain things for you better now.

I hope your A/D input impedance is high, and all will be well with only the 100Kohm resistor divider.  If not, no worries, an op amp voltage follower is the simplest analog circuit known to man- not even a resistor needed. 

Jedon

I did take electronics in college but then got a D in digital logic.  ::)

dubbleUJay

Jedon, I posted a link to a calculator called Electronics Assistant in this thread:
http://www.microcogen.info/index.php?topic=404.0

One of its functions is a Potential Divider Calculator under the "Other" Tab. It also visually displays the resistors in a diagram which is nice.
dubbleUJay
Lister  - AK - CS6/1 - D - G1 - LR1 -
http://tinyurl.com/My-Listers

BruceM

Nice free calculator, WJ.  Thanks! The program gives me slightly different values, for Jedon's divider.  92.284 Kilohms, and 7.716 Kilohms.  I just recalculated and yep, I screwed up before, added one to the divider.

Jedon

I take it when I go into Radio Shack they won't have a 92.284K resister and it will be instead 90K?

dubbleUJay

Jedon, If you cant find the "Preferred Value" you will get the closest value you can find for the greater one, and use a pot for the other resistor. (multi-turn)
It then have to be calibrated against a known good multimeter or such.

But if you look at the screen-shot from the calculator attached, they give you Preferred Values for R1&2 which are standard values that should be available.
dubbleUJay
Lister  - AK - CS6/1 - D - G1 - LR1 -
http://tinyurl.com/My-Listers

Jedon


mobile_bob

seems like this is a perfect application of an opamp
build the divider, and tap it with an opamp to provide your 5volt range sense

looks to me like you could use two precision high value resisters to get the scaling right
and an opamp could tap and sample without loading the circuit in any meaningful way.
then get the scaled 5 volt output off the opamp?

i think i have the complete circuit schematic for such a divider somewhere in one of my
books on power electronics, have to check and see i guess.

bob g