best way to monitor 14.6V battery?

Go To Last Post
22 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Soo - in a project I'm working on there will be 3 li-poly batteries in series. This means at full charge they'll be at ~14.6V. What is the best way to monitor this voltage from an AVR's ADC? The only idea that I have is to put a very high resistance resistor divider across them, but I don't really like that for a variety of reasons (constant load (though small) on batteries as well as figuring out how input impedance of ADC input affects resistor divider, among other things). I suppose I could monitor the voltage of just one battery - but I don't really think that is a good solution either.

Soo - any suggestions?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think 3 li-polys in series will produce 12.6 volts fully charged. You shouldn't charge the cells to more than 4.2 volts each.

Mike

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mike53 wrote:
I think 3 li-polys in series will produce 12.6 volts fully charged. You shouldn't charge the cells to more than 4.2 volts each.

Mike


oops mind fart

but that doesn't exactly help me

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If your concerned about power drain from the voltage divider, why not put a small reed relay in series with the "High Side" of the series voltage divider network? When charging the cells, periodically activate the reed relay, only long enoug to accuire the ADC voltage sample. Then deactivate the reed relay.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your resistive divider should be on the switched side (same as the circuit being powered). If you're using lipols, chances are you're driving motors. Your resistive divider is going to be the least of your worries with regard current draw.
If you're worried about too high an impedance, then kill 2 birds with one stone. ie. Use an electrolytic cap accross the lower half of your resistive divider. This will give you back your low impedance plus offer some low pass filtering of your battery supply rail, thereby filtering any crap on same. 2 resistors and one cap is all you need. You can even use a trimpot instead of fixed resistors, to bring your 12.6v fully charged state down to your ADC voltage ref level.
The jpg below is from a project of mine. The component values are chosen for my application. You'll have to select your own.

JimK

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nleahcim wrote:

but that doesn't exactly help me

It's the most valuable advice in this thread so far, if your intention was to charge your 3 cell lipols to 14.6V. Overcharging lipols is dangerous stuff.

JimK

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow - could you all actually try to stay on topic instead of inflating your own bubbles? kthx.

Correcting a typo (that I somehow made twice) != helpful. Correcting it while giving me helpful advice is helpful. Correcting it for the sake of correction is annoying. Talking about it for multiple posts after I've aknowledged said correction is just obnoxious. I made a mistake. I've been corrected. Now drop it.

Bite me.

Last Edited: Sat. Dec 10, 2005 - 04:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JimK wrote:
Your resistive divider should be on the switched side (same as the circuit being powered). If you're using lipols, chances are you're driving motors. Your resistive divider is going to be the least of your worries with regard current draw.
If you're worried about too high an impedance, then kill 2 birds with one stone. ie. Use an electrolytic cap accross the lower half of your resistive divider. This will give you back your low impedance plus offer some low pass filtering of your battery supply rail, thereby filtering any crap on same. 2 resistors and one cap is all you need. You can even use a trimpot instead of fixed resistors, to bring your 12.6v fully charged state down to your ADC voltage ref level.
The jpg below is from a project of mine. The component values are chosen for my application. You'll have to select your own.

JimK


Yes it's being used to drive motors. There are already some fairly hefty caps on the line to smooth it. Can you go over how you calculated the values for your resistors and capacitors? Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

microcarl wrote:
If your concerned about power drain from the voltage divider, why not put a small reed relay in series with the "High Side" of the series voltage divider network? When charging the cells, periodically activate the reed relay, only long enoug to accuire the ADC voltage sample. Then deactivate the reed relay.

I suppose that would work - but somehow I figure there's a cleaner solution. I mean this seems like such a basic thing - and a problem that surely other people run into all the time...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First:

Quote:
...but somehow I figure there's a cleaner solution.

Well, I suppose you could use MOS-FET switches, provided you could ensure that they stayed turned off during all uncontrolled situations - like if the batteries were to be removed from the circuit.

Have you looked at some of the battery charger controller chips to see it they have any ideas that might imspire you?

Second:

Quote:
Wow - could you all actually try to stay on topic instead of inflating your own bubbles? kthx.

Correcting a typo (that I somehow made twice) != helpful. Correcting it while giving me helpful advice is helpful. Correcting it for the sake of correction is annoying. Talking about it for multiple posts after I've aknowledged said correction is just obnoxious. I made a mistake. I've been corrected. Now drop it.

Bite me.

Gee, don't you think that, just a little bit of honey would get you a lot more then pouring vinigar over those who are trying their best to help you?

Quote:
Soo - any suggestions?

If you can't treat those who are trying to help you with, even a little bit of courtesy, I'd suggest that you move over to one of the PIC forums and let them deal with your crap!!!

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

microcarl wrote:
First:

Well, I suppose you could use MOS-FET switches, provided you could ensure that they stayed turned off during all uncontrolled situations - like if the batteries were to be removed from the circuit.

Have you looked at some of the battery charger controller chips to see it they have any ideas that might imspire you?


yeah that's pretty much my plan - I expect there are some specialty ICs designed for this purpose.

microcarl wrote:

Second:

Gee, don't you think that, just a little bit of honey would get you a lot more then pouring vinigar over those who are trying their best to help you?

If you can't treat those who are trying to help you with, even a little bit of courtesy, I'd suggest that you move over to one of the PIC forums and let them deal with your crap!!!

Look carefully at my posts - those who contributed nothing and did not try to help me I'm not nice to, those who actually try to answer my question I'm nice to. I'm just tired of people inflating their own bubbles all the time rehashing stuff over and over. Here at my school it even has its own term: 'academic masturbation'. It is an incredibly common thing in academic settings as well as engineering related newsgroup/forum and I'm just sick of it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I expect there are some specialty ICs designed for this purpose.

Well, I wasn't specifically thinking of your using a packages solution, as I got the impression that you might want to build from descrete devices. I was thinking more along the lines of looking at how they accomplish these type of tasks and transpose those concepts over tou your specific requirements. Of course, one might say, "It the chip fits, use it."

Quote:
...those who contributed nothing and did not try to help me...

I apologize for my harshness! I have a tendancy to have blinders to the typical B.S.. Those on the forum who know anything, know who the B.S.ers are. They aren't fooling anybody1 There are places where B.S. politics work, such as academia, and bosses, but I think its not true here. If someone is full of themselves, it shows and, we all see it for what it is.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

microcarl wrote:
Well, I wasn't specifically thinking of your using a packages solution, as I got the impression that you might want to build from descrete devices. I was thinking more along the lines of looking at how they accomplish these type of tasks and transpose those concepts over tou your specific requirements. Of course, one might say, "It the chip fits, use it."

Oh I have no problem with extra ICs. The board that this is for at last count had something like 15 ICs on it - so what's one more? I just want a good solution. I guess a resistive divider wouldn't be that bad - I just checked and apparently the impedance of the ADC inputs is 100M ohm, so if I were to use something in the 5 M ohm range I'd be looking at power consumption in the lower µW range, which is tolerable. Or I could use really large resistors and run them through a buffer. (thus I wouldn't have to worry about the ADC input drawing current making the divider inaccurate). I have no idea which is more efficient - I suppose I'd have to read some datasheets...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Or I could use really large resistors and run them through a buffer. (thus I wouldn't have to worry about the ADC input drawing current making the divider inaccurate). I have no idea which is more efficient - I suppose I'd have to read some datasheets...

There are two issues here. One, the adc input is indeed high impedance, but when a
sample is taken, a small internal capacitor must be charged by whatever is connected
to the adc pin. A high resistance divider can be used if a small capacitor is added to
provide the needed energy to charge the adc's sampling cap. The other and possibly
more troublesome issue is that the avr's adc pins have leakage currents that will
contribute errors to a high resistance signal source. I am using a tiny26 as a battery
management system, and these leakage currents are a problem. I have pretty much
decided to add a buffer amp to deal with the problem. I notice that some of the newer
avrs have lower leakage currents, but they are still there.

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tpappano wrote:
Quote:
Or I could use really large resistors and run them through a buffer. (thus I wouldn't have to worry about the ADC input drawing current making the divider inaccurate). I have no idea which is more efficient - I suppose I'd have to read some datasheets...

There are two issues here. One, the adc input is indeed high impedance, but when a
sample is taken, a small internal capacitor must be charged by whatever is connected
to the adc pin. A high resistance divider can be used if a small capacitor is added to
provide the needed energy to charge the adc's sampling cap. The other and possibly
more troublesome issue is that the avr's adc pins have leakage currents that will
contribute errors to a high resistance signal source. I am using a tiny26 as a battery
management system, and these leakage currents are a problem. I have pretty much
decided to add a buffer amp to deal with the problem. I notice that some of the newer
avrs have lower leakage currents, but they are still there.

Tom Pappano
Tulsa, Oklahoma


I hadn't been aware that current flowing into the adc input was actually necessary. Sounds like a buffer is what I need then. Now I guess I have to find a really small analog buffer chip - any reccomendations?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I hadn't been aware that current flowing into the adc input was actually necessary. Sounds like a buffer is what I need then. Now I guess I have to find a really small analog buffer chip - any reccomendations?

I have been trying out two inexpensive Maxim parts, the MAX4092 (dual) and MAX4094
(quad) OP amps. These are rail to rail low power devices that are only about $1. Specs
are pretty decent, considering the cost.

TP

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Geez, if you are going to go through this much fuss to measure ~12VDC battery level, how much fuss are you going to have doing a real app and measuring AC current and voltage with much higher levels, etc.?

Use a resistor divider and fuggeddabout it.

What are your concerns? It seems like you keep jumping from one fatal concern to another. IIRC:

--First, you were concerned about the lost power through the resistor divider. (more on that later)
--So, you proposed using huge resistance values, and some of the drawbacks on doing that were pointed out to you.
--Then, you became concerned about the actual juice needed to charge the sample-and-hold of the ADC
--So now you are running around putting in an op amp circuit.

We've got lots of op amp circuits interfacing real-world signals to AVRs; cleaning up the signals is one reason, providing drive is another, but saving power is NOT one of the reasons.

Have you penciled ANY numbers? 10V into 10k is 1mA, right? Let's use that simple case as the starting point. Is that too much current draw for your application?

Let's say yes. It is in many applications when running off the battery. Are you going to hook up the circuit continually? Are you going to do continuous A/D conversions to monitor the battery voltage? If so, the AVR power to run the ADC continually is about--wait for it--1mA. I haven't seen a mention of the power-saving measures you are taking inside the AVR app. Look close to home first. Then consider the miniscule sips that the ADC takes into its sample and hold, once per conversion. You won't have enough decimal places on your calculator to see the significant digits with all the leading zeros to see the mW.

If the 1mA is a problem, then use 100K and get 100uA. Still plenty of drive for good ADC readings with a cap near the pin (which should be there anyway). Still don't like it? Run the tail of the resistor divider into an I/O pin. Make a low output for reading, and floating input otherwise. Virtually no power drain.

And BTW: Your op amp circuit will probably draw more current than what you are apparently trying to save.

If the answer to the first question is "No, 1mA isn't too much because I'm charging the battery and there is lots of power available", then you were finished about three posts ago.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

nleahcim wrote:
Wow - could you all actually try to stay on topic instead of inflating your own bubbles? kthx

Hey school boy ..... you don't get it do you ?
If I saw some other dickhead crossing the road into the path of a bus, I'd be trying to warn him too, irrespective of whether I was on topic or not.
Overcharging lipols can kill... maybe you, but more importantly your innocent family. Lipols are f.u.c.k.i.n.g dangerous, hence the repeated (no apologies) warnings.
As for s.h.i.t.t.i.n.g on those who are trying to help you, I don't see too bright a future for you in this game. Maybe a parking warden job or something like that might suit your attitude better.
Anyway, if you're still f.u.c.k.i.n.g around trying to figure out resistive dividers, then you really do need all the "academic" help you can get.
Now f.u.c.k off so we can help someone else.

JimK

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JimK wrote:
nleahcim wrote:
Wow - could you all actually try to stay on topic instead of inflating your own bubbles? kthx

Hey school boy ..... you don't get it do you ?
If I saw some other dickhead crossing the road into the path of a bus, I'd be trying to warn him too, irrespective of whether I was on topic or not.
Overcharging lipols can kill... maybe you, but more importantly your innocent family. Lipols are f.u.c.k.i.n.g dangerous, hence the repeated (no apologies) warnings.
As for s.h.i.t.t.i.n.g on those who are trying to help you, I don't see too bright a future for you in this game. Maybe a parking warden job or something like that might suit your attitude better.
Anyway, if you're still f.u.c.k.i.n.g around trying to figure out resistive dividers, then you really do need all the "academic" help you can get.
Now f.u.c.k off so we can help someone else.

JimK


Wow. Do you kiss your mother with that mouth?

I'm well aware of the dangers of li-polys. An acquaintance of mine burned down his shed last summer when he accidentally set the wrong number of cells on his li-poly charger and took with it thousands upon thousdands of dollars in rc airplanes.

It was a typo. End of discussion.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
Geez, if you are going to go through this much fuss to measure ~12VDC battery level, how much fuss are you going to have doing a real app and measuring AC current and voltage with much higher levels, etc.?

Use a resistor divider and fuggeddabout it.

What are your concerns? It seems like you keep jumping from one fatal concern to another. IIRC:

--First, you were concerned about the lost power through the resistor divider. (more on that later)
--So, you proposed using huge resistance values, and some of the drawbacks on doing that were pointed out to you.
--Then, you became concerned about the actual juice needed to charge the sample-and-hold of the ADC
--So now you are running around putting in an op amp circuit.

We've got lots of op amp circuits interfacing real-world signals to AVRs; cleaning up the signals is one reason, providing drive is another, but saving power is NOT one of the reasons.

Have you penciled ANY numbers? 10V into 10k is 1mA, right? Let's use that simple case as the starting point. Is that too much current draw for your application?

Let's say yes. It is in many applications when running off the battery. Are you going to hook up the circuit continually? Are you going to do continuous A/D conversions to monitor the battery voltage? If so, the AVR power to run the ADC continually is about--wait for it--1mA. I haven't seen a mention of the power-saving measures you are taking inside the AVR app. Look close to home first. Then consider the miniscule sips that the ADC takes into its sample and hold, once per conversion. You won't have enough decimal places on your calculator to see the significant digits with all the leading zeros to see the mW.

If the 1mA is a problem, then use 100K and get 100uA. Still plenty of drive for good ADC readings with a cap near the pin (which should be there anyway). Still don't like it? Run the tail of the resistor divider into an I/O pin. Make a low output for reading, and floating input otherwise. Virtually no power drain.

And BTW: Your op amp circuit will probably draw more current than what you are apparently trying to save.

If the answer to the first question is "No, 1mA isn't too much because I'm charging the battery and there is lots of power available", then you were finished about three posts ago.

Lee


Yes I've looked at the numbers. In every step of the design process for this project I've done everything possible to save the last ma. Saving a couple ma in one place will not make that big of a difference overall. Saving a couple ma in 100 places will.

Anyways, I don't plan on running it continually. Maybe a sample per second at most.

About the op-amp - I'm not sure which solution would be more efficient - low impedance resistive divider directly into adc input, or high impedance resistive divider into buffer into adc input. Haven't had a time to check just yet. but if I can save power with an op-amp then by all means I'll do it, even if it means only half a ma saved.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't think you are getting the point, and I don't think you >>have<< done the math--the sip of watts taken by the A/D converter in doing a conversion is immaterial--unmeasurable--compared to the other stuff that is floating around in your app.

Next, I outlined a very simple method of disconnecting the load except during conversions.

And, the "solution" you are exploring will consume more watts than you are trying to save.

But suit yourself--it is your app.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Still don't like it? Run the tail of the resistor divider into an I/O pin. Make a low output for reading, and floating input otherwise. Virtually no power drain.

A slight glitch here, maybe. When you release the bottom of the voltage divider, the
adc pin will pull up to Vcc, being limited by the clamp diode. Current will still be drawn
by the upper resistor- I=(Vbatt-Vcc)/R.

I also do not see any reason not to just use a simple voltage divider of about 100k or even
higher. Even with leakage errors there still should be sufficient accuracy for simple
battery voltage monitoring. (My situation is different, I'm reading a high side current
shunt with voltage dividers to obtain voltage and current readings, and leakage causes
practical errors mainly in the shunt readings rather than the battery voltage readings)

It would help if the OP would mention his battery capacity, typical operating loads,
and desired service between charges. It is still fun though, to brainstorm about
poorly defined problems 8-)

TP

Tom Pappano
Tulsa, Oklahoma