## How To Achieve 'use-while-you-charge' Functionality with a Li-Ion Battery Powered Calculator.

12 posts / 0 new
Author
Message

I'm in the very early planning stages of designing my first calculator using an AVR microcontroller. This will be my first project using a rechargeable Li-Ion battery (4.2V).

I'm having a hard time conceptualizing how I will be able to charge a battery using an external source (5VDC) while simultaneously using the calculator. You see this functionality all of the time in cell phones; as long as it's plugged into the wall, it will continue to increase in battery life despite using it at the same time.

As of right now, this is my very basic one-line diagram for the calculator.

As you can see, there is nothing between the battery and 5VDC 'wall' source that charges it besides the Charger IC. Right now the Charger IC that I'm looking to use is Unitrode bq2054. I don't see anything in the spec sheet that hints to a "use-while-you-charge" functionality.

My main question is - Am I missing something required to achieve this desired functionality? Does there need to be some interfacing between particular components? Is it sufficient to just leave the battery in parallel with a 5VDC source as it's charging and the calculator is turned on and being used?

I feel like there's some fundamental ideas that I'm overlooking here, but the question had to be asked.

justin2021 wrote:
I feel like there's some fundamental ideas that I'm overlooking here, but the question had to be asked.
Your intuition is correct.

Battery University

Charging Lithium-Ion Batteries

http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries

(near article's bottom is the summary)

Simple Guidelines for Charging Lithium-based Batteries

...

Some voltage regulators will have two inputs with lossless switching between the two; wall wart or 5V, battery.

Some Power Management IC (PMIC) will contain all (charger, voltage regulator, lossless switching)

"Dare to be naïve." - Buckminster Fuller

As long as the charger chip is measuring & controlling the net positive battery current (and voltage in voltage portion of the chg pattern), then it should charge properly.

For example, say your load was 2A & the battery was to be charging at 1.5A...the charger should measure (by controlling production) 1.5A net flowing into the battery, achieved by providing 3.5A to the system.

The article mentioned, notes that continually cycling into charge too often (due to steady loading and continual topping-off charging) can degrade the battery, so best to  turn off unit (if possible)  and give a complete charge.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Sat. Mar 17, 2018 - 04:04 AM

you can do 2 things, give the charger enough current drive to charge the battery and also power the system, or you can make the schematic such that when USB power is connected USB power feeds the charger and the system in parallel.

The problem is the load may fool the charger. Not somthing you want with a LiIon battery! If the battery is charging, you power the electronics from the power source. If the power source is removed, you switch over to battery.

I think all the main charger chip makers have chips which manage charging the battery & powering the load at the same time.

Look for chips with "power path control" or similar terms ...

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

The problem is the load may fool the charger

Well, that's why it is important for the charger to (primarily) monitor the battery current, not the load current or the charger current---the others can be monitored for secondary  actions.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

which is exactly what "power path" devices do ...

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

I imagine with a calculator the device current is going to be tiny WRT the charge current.  Unless I am miss understanding what a "calculator" is.

If the device current is an order of magnitude below the charge current and you have a single cell, then just always have the device connected to the battery.  The charger is not going to get fooled by the extra tiny amount of load.

If the IC was something fancy that counted the electrons going in and out - that would not be ideal, but the IC shown is just a dumb CV/CC type thing.

andrewm1973 wrote:
something fancy that counted the electrons going in and out

called a "coulomb counter" or "gas gauge"

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

andrewm1973 wrote:
I imagine with a calculator the device current is going to be tiny WRT the charge current.
The range for the calculator's display current is three orders of magnitude (100microA, 100mA) (Sharp Memory LCD, OLED)

andrewm1973 wrote:
Unless I am miss understanding what a "calculator" is.
The calculator could be an always-on function of several functions (ie it's there for the operator of a fuel management system)

andrewm1973 wrote:
If the device current is an order of magnitude below the charge current ...
For PV, there's the rule of tens for mostly sunny mid-latitudes (yearly average of 3h of peak Sun equivalent per day) (California Central Valley, not the Northwest US temperate rain forest) :

24h average load current, PV current is 10 * load current, battery's capacity is 10 * load current * 10h

andrewm1973 wrote:
... and you have a single cell, then just always have the device connected to the battery.
The following is a 50mA max shunt regulator Li-ion charger :

via

LTC4071 - Li-Ion/Polymer Shunt Battery Charger System with Low Battery Disconnect - Linear Technology

http://www.linear.com/product/LTC4071

Would disconnect the source to disable charging below freezing, and, evaluate if the charge current range is a match for the cell's charge current limits (might instead have a CCS instead of a current limiter by a constant voltage source and the current-limiting resistor)

"Dare to be naïve." - Buckminster Fuller