Lithium Ion battery discharger

Thread Starter

Top-Dog

Joined Mar 1, 2013
36
Designing a Lithium Ion (Li-Ion) battery discharger with current and voltage sense.

Hi, I'm trying to design a discharger for a two cell Li-ion battery. The purpose of the discharger is to measure the capacity of the battery, so in addition to the discharger I'll need a current sense and voltage sense circuit.

I have already found a circuit from Sparkfun that does pretty much what I want (see the attachment - contains a saved webpage that doesn't seem to be up any more), but it uses a lot of active components (op-amps). I am trying to make this circuit as cheap as possible while also maintaining accuracy when calculating capacity, so I am looking for ideas/suggestions on achieving this, mainly using discrete components (basically alternative designs). For example using a current mirror to sense the current ect. If you also have suggestions about improving the accuracy and filtering the ADC values so that they are clean that would be good too.

I am going to be using this discharger with a Beaglebone Black (BBB), so I am aware that I am going to need to change the voltage dividers for a start (BBB has 1.8 V tolerant ADCs and has 3.3 V IO pins).
 

Attachments

GopherT

Joined Nov 23, 2012
8,009
You can buy op amps for $0.13 each, why discrete?

If the web page is not up anymore, how did you get it? We prefer links. .zip files are nasty.
 

Thread Starter

Top-Dog

Joined Mar 1, 2013
36
I could be making a few of these units and it's a pretty high criteria point for me to get the cost as low as possible (from past experience using discrete parts is about 1/5 the cost and sometimes less PCB space), but I know that you would end up trading performance... so it is getting a good balance in that means the most to me in this project. I had to email them about the webpage and they sent me a downloaded copy. I found the link in one of their tuts, but it didn't work for me. You can try: sparkfun.com/tutorials/316
 

bountyhunter

Joined Sep 7, 2009
2,512
I could be making a few of these units and it's a pretty high criteria point for me to get the cost as low as possible (from past experience using discrete parts is about 1/5 the cost and sometimes less PCB space), but I know that you would end up trading performance... so it is getting a good balance in that means the most to me in this project. I had to email them about the webpage and they sent me a downloaded copy. I found the link in one of their tuts, but it didn't work for me. You can try: sparkfun.com/tutorials/316
You will need a fairly accurate current sink and a timer. IMHO, some kind of uP based solution would be best (and cheapest).
 

Thread Starter

Top-Dog

Joined Mar 1, 2013
36
You will need a fairly accurate current sink and a timer. IMHO, some kind of uP based solution would be best (and cheapest).
What's a uP based solution?

In terms of current sensing it can be done (and mixed in software) from the rate of the discharge (PWM controlled) i.e. a particular PWM duty cycle corresponds to a certain discharge current. Secondly, the detected current can be measured from the current sensor/control loop on the MOSFET/s i.e. using a current mirror or a voltage drop across a resistor on the input to an op-amp and then measuring the variable output voltage across a set load. The uComputer can handle the timing easily enough. That's what I was thinking anyway. Do you have ideas/circuits about a more accurate current sensing?
 

bountyhunter

Joined Sep 7, 2009
2,512
What's a uP based solution?

In terms of current sensing it can be done (and mixed in software) from the rate of the discharge (PWM controlled) i.e. a particular PWM duty cycle corresponds to a certain discharge current. Secondly, the detected current can be measured from the current sensor/control loop on the MOSFET/s i.e. using a current mirror or a voltage drop across a resistor on the input to an op-amp and then measuring the variable output voltage across a set load. The uComputer can handle the timing easily enough. That's what I was thinking anyway. Do you have ideas/circuits about a more accurate current sensing?
uP = uProcessor = uComputer

same thing.
 

MikeML

Joined Oct 2, 2009
5,444
I have a West Mountain CBAII. It would do all you want and more. It uses a PC to do the control and data aquisition and plotting.

I have home-brewed one to test the capacity of lead-acid aircraft batteries. It needs to discharge the battery at ~30A to determine how long the battery could run the aircraft avionics in the event of an alternator failure while flying on instruments (in the clouds). By FAA mandate, you are supposed to do an annual test to make sure your battery will last >30min to enable you to get on the ground.

Discharging a 12.6V battery at 30A requires a high-power resistor of 12.6/30 = 0.42Ω @ 12.6*30 = 378Watts. I found some "locomotive braking resistors" on line that are rated at 1200W, so I used those.

To determine battery capacity in Ah, I need to compute ∫(I) dt while the battery voltage is >11.5V (the cutoff voltage). I use an old lap-top computer with a parallel port to do the computation, control, data-aquistion, and data display; software written in Basic.

Using the parallel port for I/O, I used relays for switching, and used a two-channel serial DAC to measure the instantaneous battery voltage, and the discharge current. The DAC data is fed to the computer via the input pins on the parallel port.

The software periodically samples the discharge process, checking to see if the battery voltage has dropped below 11.5V, and adding the latest current reading to a running sum of previous currents. Since I'm using a resistor as the discharge method, the current through it naturally drops as the battery voltage drops. Also, I found that the resistor changes resistance as it self-heats. That is all taken care of in the way I do the integration.

I build this >ten years ago; and I still use it during aircraft annual inspections...
 
Last edited:

Thread Starter

Top-Dog

Joined Mar 1, 2013
36
I just realised that I own a accucel 6 and that has a discharge circuit. I found the schematic (or something very close) - see the attached pdf. I wonder if anyone can explain how it works (DA1:1 and DA1:2)?

I can see the IRFZ44N and 0.5 ohm sense resistor and the PWM input on header "14(0C1A)" and these seem to be doing the same thing as the Sparkfun circuit I mentioned first. But I don't see how the rest of that control loop works. Also, why is that PWM signal not being Low pass filtered, or is that 100 K voltage divider on the non-inverting input to DA1:2 meant to attenuate high frequency signal components or something? I assume that the capacity is measured from the PWM input since there doesn't seem to be a current sense circuit in there..?

There is also the OverLoad programmable dummy load that I've seen on Dangerous Prototypes and its schematic: http://web.archive.org/web/20120521...mentDiagnostic/Overload/sch-overload_V1.0.pdf
 

Attachments

ronv

Joined Nov 12, 2008
3,770
Since you have some processing power and there is no need for speed, what do you think about closing the loop with the micro instead of hardware?
Oh, and what voltages do you have available?
 
Last edited:

Thread Starter

Top-Dog

Joined Mar 1, 2013
36
I'd prefer a hardware solution, as the IO library I'm using on the BeagleBone doesn't allow for pin change interrupts (only polling for events), but it would be the lowest cost solution. And if I was polling the discharge current would not be as finely controlled as a closed loop hardware solution.

I have 0, 3.3 and 5 Volts available (the 5 V is only available from the VCC rail, not logical) and the ADCs max out at 1.8 V. I could also get 12 V from the supply.
 

ronv

Joined Nov 12, 2008
3,770
Not much more stuff anyway. Take a look at this one. It uses about a 10KHZ PWM from your micro. You will probably need to calibrate it either in software or with a pot. Right now it is ~ 50% = 2amps. The voltage and current outputs are switched to 1 D to A pin so the micro will need to select which to look at.
 

Attachments

Thread Starter

Top-Dog

Joined Mar 1, 2013
36
Thanks. I've chosen to develop based on the SFE design mainly because of it's simplicity. My simulation results showed that the second design I mentioned (battery schematic) has some kind of converging integral control, but with the default gains seems very sensitive to high frequency signal components in the PWM input (i.e. PWM not being filtered properly)
 
Top