battery indicator

Want to just shoot the breeze? Forum 42 is the place!

Moderator: Moderators

timmeh87
Senior Member
Posts: 3047
Joined: Mon Nov 14, 2005 10:19 pm
Location: Ontario, Canada

battery indicator

Post by timmeh87 »

the other day someone came forward and asked me if i could build them a battery indicator for their portable. i dont have time right now with exams and everything else to really be worrying about it, but i was thinking... if at some point next year i developed a simple circuit that could read the voltage off of a pack of nimh batteries, and determine (roughly) their state of discharge, would enough people want to buy one off of me to make it worthwhile? (since i will be using li-ion batteries in my portable i would be doing this entirely to make a profit)

what i envision is a simple board about 2x2 inches with a 12 pin microncontroller thats already installed, programmed, and ready to go. it would have some terminals to hook up the batteries, and would come with like... 5 or so LED's. like a blue, two greens, a yellow and a red. the led's would all be lit for a full charge, and would turn off in sequence to indicate the increasing state of discharge...

this is just a rough idea, if i decide to do this there are definitely some problems i will have to work though and the end product may be different. but is anyone interested? how much would you pay. i was thinking like $20 + shipping
Last edited by timmeh87 on Sat Dec 03, 2005 5:08 pm, edited 1 time in total.
Image

"Linux is only free if your time is worthless"
daleighan
Posts: 671
Joined: Wed May 04, 2005 3:13 pm
Contact:

Post by daleighan »

I'd pay $15
sniper_spike
Posts: 761
Joined: Tue Nov 22, 2005 8:41 am
Location: Ontario, Canada
Contact:

Post by sniper_spike »

Interesting idea.. I was thinking about this before. And came up with this; to make some sort of device, that would read the capacity of the batterys, and the mA that the portable takes, calculate it all with some crazy mumbo jumbo, and then be able to give you an accurate readout on how much time you got left to play.

(keep in mind I have no idea what to do with it, so if it sounds good you can try it timmeh)
Dr. Gregory House wrote:Good lord, are you having a bowel movement or a baby?
timmeh87
Senior Member
Posts: 3047
Joined: Mon Nov 14, 2005 10:19 pm
Location: Ontario, Canada

Post by timmeh87 »

im not sure what the chips have as far as non-volatile memory. if they dont have any, then this wouldnt work, since they would have to remember things even when the power was turned off. if there exists a chip with such a memory it would be sort of possible. execept that the mAh that your portable draws is somewhat unpredictable (for a n64 its like 1.2 - 1.8 amps, depending what you are doing). for now, im going to stick to a simple voltage-based battery meter

also, the chip would have to be hardcoded with the exact capacity of your batteries. which is not always what they say it is, and also varies with the rate of discharge. for example, at high levels of discharge, nimh battereies only provide ~85% of their normal capacity, due to internal resistance.

with all these things combined, it probably wouldnt be accurate enough to justify all the work put into it.
sniper_spike
Posts: 761
Joined: Tue Nov 22, 2005 8:41 am
Location: Ontario, Canada
Contact:

Post by sniper_spike »

Alright then. But then about yours, I was under the impression that NI-MH batteries keep there voltage steady untill they are almost out of juice, then a big drop. So wouldn't there only be an indication of voltage dropping when it's already almost too late?
Last edited by sniper_spike on Sat Dec 03, 2005 6:18 pm, edited 1 time in total.
Dr. Gregory House wrote:Good lord, are you having a bowel movement or a baby?
timmeh87
Senior Member
Posts: 3047
Joined: Mon Nov 14, 2005 10:19 pm
Location: Ontario, Canada

Post by timmeh87 »

with my comptuer, i recorded a discharge curve of two of my own "AA" nimh battereis in series, using a rather shantily set up microcontroller/serial driver. i got about 15,000 data points over 5 hours, and graphed them in excel. you are correct that it is a fairly flat discharge curve, but there is definitely a small slope. i was actually hoping to post that graph on this thread a little later

this project will be a challenge for me, that is for sure. it might not work well enough to sell, but im hoping i could work something out. i was thinking that if the chips indeed have some non-volatile memory, i could add a "calibration" feature, which involve the end-user evenly discharging the batteries from a full charge. the chip could measure the voltage every 10 minutes, and figure out the characteristic curve of the particular battery pack that it is hooked up to. that would certainly make the predictions more accurate.
sniper_spike
Posts: 761
Joined: Tue Nov 22, 2005 8:41 am
Location: Ontario, Canada
Contact:

Post by sniper_spike »

That sounds like a grand idea, I just might buy one of these :D
Dr. Gregory House wrote:Good lord, are you having a bowel movement or a baby?
timmeh87
Senior Member
Posts: 3047
Joined: Mon Nov 14, 2005 10:19 pm
Location: Ontario, Canada

Post by timmeh87 »

here is the graph.

https://muss.cis.mcmaster.ca/~bernast/img/nimh.gif
*warning. incredibly huge image. its a 13Kb .gif, but its like 1200x900*

you can see definate steps in the graph, that is the resolution of a 10-bit ADC.

so you can see that from this graph, it wouldnt be that hard to make a program to indicate the charge level on -my particular batteries-. but i think it might differer from pack to pack. so that would be the challenge.

id set it up (based on this curve) something like

blue light == > 2.49v
green 1 == >= 2.47v
green 2 == >= 2.45v
yellow == >2.4v
red == > 2.3v
flashing red == > 2v

there would definitely be some fluctuation between the two green lights, but thats why they are both green.
gannon
Moderator
Posts: 6974
Joined: Sun Apr 04, 2004 4:48 pm
Location: Near that one big lake
Contact:

Post by gannon »

I think you could make a pretty simple battery monitor out of just diodes, resistors, and leds. The setup would be different for every different sized battery pack though.
sniper_spike
Posts: 761
Joined: Tue Nov 22, 2005 8:41 am
Location: Ontario, Canada
Contact:

Post by sniper_spike »

I see now. It may not be that large, but there is definitely a drop in the battery's voltage.

And for some packs that might have less of a voltage drop, thats what the calibration feature would be for. I suppose after being calibrated with a more stable battery pack, the stages between the different lights would become smaller.
Last edited by sniper_spike on Sat Dec 03, 2005 6:25 pm, edited 3 times in total.
Dr. Gregory House wrote:Good lord, are you having a bowel movement or a baby?
timmeh87
Senior Member
Posts: 3047
Joined: Mon Nov 14, 2005 10:19 pm
Location: Ontario, Canada

Post by timmeh87 »

it is true that LED's will cut out at a certain current, and you can get current related to voltage by using a resistor, but i like my way better. more accurate, less messing around with v=ir equations. IMHO.
Harshboy
Portablizer
Posts: 3610
Joined: Tue Oct 11, 2005 3:44 pm

Post by Harshboy »

I would buy 1 or 2 for my almost completed GCP
SNESguy
Posts: 278
Joined: Sun Jan 16, 2005 10:59 pm
Location: Raleigh, North Carolina

Post by SNESguy »

That sounds awesome if you can make 'em!!!

I would definitely pay $25 or more for something as nice as that!

It sounds a lot better than the analog meter I used!!

Good luck with it, I hope to see you actually come through with it!!!

-SNESguy
If all else fails, take it apart!
timmeh87
Senior Member
Posts: 3047
Joined: Mon Nov 14, 2005 10:19 pm
Location: Ontario, Canada

Post by timmeh87 »

look what i found:

http://www.microchip.com/stellent/idcpl ... e=en020243

<i>The PS501 combines a high-performance, low-power Microchip PIC18 microcontroller core together with proprietary monitoring/control algorithms and 3D cell models stored in 16 Kbytes of on-chip reprogrammable Flash memory. Analog resources include a 16-bit sigma-delta integrating A/D and mixed signal circuitry for precision measurement of battery current, temperature and voltage. On-chip EEPROM is provided for storage of user customizable and “learnedâ€
Image

"Linux is only free if your time is worthless"
Skyone
Moderator
Posts: 6390
Joined: Tue Nov 29, 2005 8:35 pm
Location: it is a mystery
Contact:

Post by Skyone »

I'd pay $20, and I'm the guy who asked you!
Thanks for once again taking interest in this, because I have NO clue what to do with it.
Keep us updated!
Post Reply