Simple Li-Ion monitor.

Shafto

Senior Member
I'm making an LED flashlight with 6 10440 size (AAA) cells. You can get many cells these days with protection circuits, unfortunately these smaller ones aren't available with onboard protection. I've already made a switching CC LED driver to run from 6 cells.

I've also already built a Li-Ion charger that's very accurate, so I don't need to worry about overvoltage, I'm not making a battery pack that will be charged in series. I just need to make sure the batteries don't drain too far in the device. I'd like to cut them off at ~2.75V.

My initial idea is to use a switching 5V reg to supply a picaxe, and since space is a concern (working with a 23mm bore) I want to use the 18pin SOIC picaxe, it's the only SMT picaxe that the Canadian picaxe supplier has, but I could also fit a 28pin SOIC if I needed to.

I'd like to keep the battery drain as low as possible, and I'd like to also add a hall effect sensor to read the current to the LEDs and display it on a 7 segment LED display. I don't have a lot of room so I'll only use 2 segments to display the first 2 digits of the 100-999mA. I suppose I could go LCD, but I think that's more complicated than I'm up for. This stuff I'll read more about though.. just giving reference for what else I'll want to do with the picaxe.

My main goal here is to be able to monitor the voltage of each cell, and just use something like a NC relay to the LEDs, blink it open 3 times to warn when the batteries are depleted. I did a search for battery monitoring and saw a few different methods being discussed. I suppose it would even be safe enough to monitor 3 sets of 2 cells in series, then I could get away with 1 chip as I would have enough ADCs.

I'm looking for input on how easiest I can read a dying voltage and simply send a signal to a relay while being least wasteful with the batteries. I don't suppose you can use the digital inputs as a ground for reference to individual batteries? Then I could just tie ADCs to corresponding grounds and read the voltage? I'm not sure if that's possible, I'm still very new with the whole picaxe thing.
 

Andrew Cowan

Senior Member
To read voltage, run the picaxe of a 5V regulator, then just connect a battery to the ADC. If the input could be greater than 5V, then you should use an input divider.

You will have a problem measuring the current using a hall effect sensor - generally this only works accuratly with large currents (10A up).


I'm not sure how you could read the voltage from an individual cell from a pack - maybe someone more experienced can help.

Andrew
 

hippy

Technical Support
Staff member
There was some previous discussion on monitoring individual cells in a pack which you seem to have found.

One solution is to use a separate PICAXE across each cell ( or set of cells ) so each are measuring their own 0V/+V supplies or use a single PICAXE ( for three cells ABC in series ) read A, read AB subtract A, read ABC subtract AB etc. 0V would be -Ve of battery A.

You could also find what protection a Li-Ion battery would normally have and add that for each cell.

Do you need to measure the voltage of each cell ? I guess you're trying to cover the case of three batteries, 3V5+3V5+2V for example showing 9V even when one is below what it should be. Is that necessary or the situation likely to happen ? What do commercial battery pack suppliers do; monitor the whole pack or single cells ? It may be worthwhile researching how others do it.
 

hippy

Technical Support
Staff member
That's a good deal. Most people couldn't buy the components for that price. $5.67 + free shipping - not sure that applies to overseas ! Shame there's no circuit diagram but it looks like they've taken the three battery feeds straight into the ATmega's ADC.
 
Another link for battery protection circuit http://www.batteryspace.com/index.asp?PageAction=VIEWPROD&ProdID=2771. These things must be seriously mass produced.

The shipping from DealExtreme is supposed to be worldwide. The quality control on Chinese goods, can be suspect at times, evaluate accordingly. Once had to reposition an smt inductor, on a constant current led driver, to get it working.

Have not dealt with the rechargeable Lithium batteries, but the 3.6V per cell, and the energy density look attractive.
 

kevrus

New Member
Shafto,
Slightly off topic (a long way off in fact...), did you ever finish your strobing brake light project?

Apologies if I missed any updates.
 

Shafto

Senior Member
Thank you nickelflipper, that's exactly what I've been looking for. Some premade protection circuits are the way to go, so cheap, and they will drain the battery less. Unfortunately that company only listed $50 express shipping to Canada. I emailed them to see if there's another option.

As for sensing current, I just realized something that would be very obvious to someone more experienced. The switching constant current LED driver I made has a very low value current sensing resistor that goes from the LED cathodes to GND. This value varies from 0.3ohm to 3ohm. By measuring the resistance I could tell what the current through the LEDs is.

Kevrus, I've been working on the actual tail light assemblies themselves on and off, waiting for parts.. it's been somewhat backburnered, but I do plan to finish it. I did make the PCB board, These pics were taken just as I started populating it.





This was one of the first boards I made, it was a little ambitious with some pretty small traces. I had to make a couple repairs but it looks pretty good, although I haven't actually used it yet.

Everything I've done since, and everything I will do from now on will be SMT, I love SMT, I hate drill holes, and I like making things small.

Here are the boards for the Li-Ion chargers I made:



 
Last edited:

Dippy

Moderator
That looks very smart, well done. I seriously hope it works out.
A large home-made d/sider is pretty brave.

I might have to send you a nailbrush though :)
 

Shafto

Senior Member
Haha! they're not so bad for working in the shop. You should see what they look like after wet sanding some aluminum on the lathe.
 

Shafto

Senior Member
Well, after emailing batteryspace to see what their Canada shipping practices were I was disappointed to find out that they will only ship express for $50.

But they did help in some way. I searched the chip used in most of their protection circuits and found it on digikey. It's very simple, although it'll cost me more to make them myself than buy the premade ones, there's no way I'm paying that shipping charge.

Here's the datasheet:

http://dl.sii-ic.com.edgesuite.net/spd_dtst/dt_sht_e/lithium/S8241_E.pdf

I've never actually built anything with a FET that wasn't inegrated, and I don't really know much about FETs, but this datasheet doesn't seem to be too specific, the only criteria it mentions:

N channel MOSFET
greater than 0.4V threshold but less than cell cutoff voltage.
withstanding voltage between gate and source has to be higher than charging voltage. (doesn't really apply to me, I won't be charging these with the protection in place)
And, not mentioned, but obvious I suppose that the FET has to be able to handle whatever current you want to be able to draw from the battery.

I imagine a good low on resistance would be good as well. I'm thinking that this FET will probably work well:

http://www.onsemi.com/pub_link/Collateral/NTR4501N-D.PDF

Does that look like a good choice?
 
Last edited:
Top