Author Topic: battery management with microcontroller  (Read 3797 times)

0 Members and 1 Guest are viewing this topic.

Offline mr3141Topic starter

  • Newbie
  • Posts: 6
battery management with microcontroller
« on: July 08, 2015, 07:24:28 pm »
Hi all,

I have no prior experience with battery charge and cell management and I want to build a li-ion battery powered device with 2 cells that has a microcontroller.

Now, here is my question:
Is there any fundamental reason why not to do charge management and cell balancing with the microcontroller inside the firmware?
Do I really need to add cell balancing and charge management ICs?
The device has a microcontroller anyways and I have free ADC lines.

Thanks,
Michael
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: battery management with microcontroller
« Reply #1 on: July 08, 2015, 09:25:31 pm »
Why not use a single cell and then a DC/DC step-up switcher? Saves all the balancing needs, plus you end up with a regulated DC voltage source for your device.
 

Offline mr3141Topic starter

  • Newbie
  • Posts: 6
Re: battery management with microcontroller
« Reply #2 on: July 09, 2015, 07:10:18 am »
Thank you for the suggestion. However, I need approx. 15V to drive a magnetic coil. I already need to boost up, even if using 2 or 3 cells. I guess the effiency for boosting from 3.6V to 15V will be not good anymore. I'll check that option in any case.

I would still be interested in opinions about battery management with an already available micro controller:

Pros: no additional parts, i.e. simpler layout. Everything (e.g. charge current) can be changed later. Design will work with different cells.

Cons: getting critical if what the firmware hangs.

Anything else?
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 9479
  • Country: fi
Re: battery management with microcontroller
« Reply #3 on: July 09, 2015, 07:53:31 am »
Boosting from 3.6V to 15V is not a problem, just do it.

Then you can simply run the MCU off the cell, and measure the MCU's own Vcc (many MCUs have this possibility) so you have zero extra hardware. Also, no need for balancing. Then, the management algorithm can be simple:

At 4.2V: Cut charger (use a FET, for example, or if the MCU itself is a PWM controller for charging converter, then just cut the control)
At 2.5-3.2V: Cut load (use FET, or even easier, enter sleep mode, whatever, as long as you can guarantee consumption of less than 1-2 µA per 1 Ah of battery)

Now the low voltage cut is a little bit of a variable. If you do have a large load, the voltage sags near the low-voltage cut and you may want to use lower cutoff like 2.8V to 2.0V, depending on cell specifications and load. If you have no data, use 2.8V cutoff for loads > 0.5C. With small load (<0.1C), I prefer to use higher cutoff voltage (like 3.2V), so that you don't completely drain the cell but leave a percent or two of charge.

Charging doesn't need a CV phase, just cut the charging when voltage is reached. If charging is slow (<0.2C), you'll end up with a practically full cell. With quicker charging (0.5C), you'll get to 90%-95% depending on battery. Of course, if you design a proper CC-CV source, then you can as easily detect a low current level (like 0.05C ... 0.1C) for cutoff.

If you end up doing multiple cells, I suggest you first forget about balancing; it's usually not needed, as long as you don't unbalance the cells by external connections -- make sure your measurement load is equal on all cells; equal resistance (current linearly depending on voltage) is even better, as it will slightly balance the cells. But don't do that classic mistake of draining the cells too quickly with measurement resistors; think about running the battery down to 5% SoC and then leaving it there for a year without charging. You don't want to overdischarge it.

So, with multiple cells, you'll just use highest voltage of the pack to check against end-of-charge limit (HVC), and the lowest voltage of the pack for end-of-discharge limit (LVC). Not having the CV phase makes multi-cell control easier.

Start from this and think about balancing and CV phase later, if you really need those, but many products don't do that.
« Last Edit: July 09, 2015, 07:57:54 am by Siwastaja »
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3405
  • Country: gb
Re: battery management with microcontroller
« Reply #4 on: July 09, 2015, 11:15:52 am »
Hi all,

I have no prior experience with battery charge and cell management and I want to build a li-ion battery powered device with 2 cells that has a microcontroller.

Now, here is my question:
Is there any fundamental reason why not to do charge management and cell balancing with the microcontroller inside the firmware?

You can certainly do this, but firmware is just a part of the required solution.  If you want cell balancing then you are going to need MOSFETs and load resistors and you'll have to consider the thermal design.  The majority of commercial products (e.g. laptops) don't do cell balancing, they simply stop charging when any individual cell has reached the maximum permissible voltage, and shuts down when any cell reaches the minimum permissible voltage.  This inevitably means the cells become unbalanced after a while, so you effectively lose capacity, but it takes a good number of charge discharge cycles before this becomes an issue provided you start with decently matched cells.

Is this a one-off device for your own use, or are you intending to get this manufactured and sold in volume?
 

Offline peter.mitchell

  • Super Contributor
  • ***
  • Posts: 1567
  • Country: au
Re: battery management with microcontroller
« Reply #5 on: July 09, 2015, 12:10:38 pm »
if using "matched" cells you can just use a high-ish power opamp to buffer a resistive divider between the two cells and source/sink current to the centre tap.
i say matched cells because its only good for probably 100ma~ of balancing.
 

Offline mr3141Topic starter

  • Newbie
  • Posts: 6
Re: battery management with microcontroller
« Reply #6 on: July 09, 2015, 04:16:37 pm »
Is this a one-off device for your own use, or are you intending to get this manufactured and sold in volume?
It is for a two-off device, no volume production. Part cost is not an issue, but I want to have it simple and robust. Battery life is not critical in the sense that there is room for a  larger cell. No need to use 100% of the capacity.

At 4.2V: Cut charger (use a FET, for example, or if the MCU itself is a PWM controller for charging converter, then just cut the control)
At 2.5-3.2V: Cut load (use FET, or even easier, enter sleep mode, whatever, as long as you can guarantee consumption of less than 1-2 µA per 1 Ah of battery)

Now the low voltage cut is a little bit of a variable. If you do have a large load, the voltage sags near the low-voltage cut and you may want to use lower cutoff like 2.8V to 2.0V, depending on cell specifications and load. If you have no data, use 2.8V cutoff for loads > 0.5C. With small load (<0.1C), I prefer to use higher cutoff voltage (like 3.2V), so that you don't completely drain the cell but leave a percent or two of charge.

Charging doesn't need a CV phase, just cut the charging when voltage is reached. If charging is slow (<0.2C), you'll end up with a practically full cell. With quicker charging (0.5C), you'll get to 90%-95% depending on battery. Of course, if you design a proper CC-CV source, then you can as easily detect a low current level (like 0.05C ... 0.1C) for cutoff.

If you end up doing multiple cells, I suggest you first forget about balancing; it's usually not needed, as long as you don't unbalance the cells by external connections -- make sure your measurement load is equal on all cells; equal resistance (current linearly depending on voltage) is even better, as it will slightly balance the cells. But don't do that classic mistake of draining the cells too quickly with measurement resistors; think about running the battery down to 5% SoC and then leaving it there for a year without charging. You don't want to overdischarge it.

So, with multiple cells, you'll just use highest voltage of the pack to check against end-of-charge limit (HVC), and the lowest voltage of the pack for end-of-discharge limit (LVC). Not having the CV phase makes multi-cell control easier.

Start from this and think about balancing and CV phase later, if you really need those, but many products don't do that.

I had a MCU PWM controlled charge converter in mind. Thanks a lot for the ideas. that was definitely useful.

Cheers
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 9479
  • Country: fi
Re: battery management with microcontroller
« Reply #7 on: July 10, 2015, 07:41:59 am »
If 18650 format is viable in your mechanical design, get some genuine Samsung/LG/Panasonic/Sanyo/Sony cells. These will be matched so well that you get full capacity from all cells, and also you won't have much leakage mismatch causing imbalance over time. They will also have PTC polyfuses so that they won't blow up from accidental shorting (still, don't do that). These cells also have the best energy density on the market; for the extreme, 270 Wh/kg, look at Samsung INR18650-35E or the LG MJ1.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf