timl132
Posts: 8
Joined: Sat Sep 14, 2019 4:30 pm

Battery charger IC good for raspberry pi?

Sun Sep 15, 2019 12:34 pm

Hello,

I want to make a little hat for the raspberry pi that allows me to connect a lipo battery, charge it while the pi is running, and boosts the 3.7v to 5v for the pi. (I tried running the pi at 3.7v, it doesn't work)
Additionally, I would want to read the charge status and battery voltage over something like i2c, and would also like to be able to shut down the boost converter from the pi by use of some pin, and then be able to power it back up by the use of a button.

These are a lot of requirements, I know. But every phone, tablet and laptop in the world can accomplish this, so I feel like there's gotta be an IC that does this.
I looked at these UPS boards on ebay, but they all lack the features I need. They either can't be shut down from the pi, or they can't be charged while powering the raspberry pi.

I tried looking for an IC but without much luck. The best I could find was the ip5306 which is used by esp32 based boards. But it appears to only support shutting down at low power consumption or by the press of a button. And I don't want the pi to power off using the button, only power on using the button.(I want the button to send power on the board, and send a signal to the gpio so when I press it, the raspberry pi will shutdown safely by itself)

So my question is, does anyone know such an IC so I can design a board myself?

Thanks!

RattusRattus
Posts: 67
Joined: Sat Sep 29, 2018 11:27 am

Re: Battery charger IC good for raspberry pi?

Sun Sep 15, 2019 5:06 pm

Typically this is more than one IC

A coulomb counter IC / gas gauge coupled to the battery (i.e. inside the battery pack if it is removable) using either 1-Wire or I2C bus

A PMIC (Power Management IC) - This is typically the primary power supply for your product, providing multiple SMPS and LDO rails for the SoC and Subsystems.
Many of the rails will have programmable output voltages. The PMIC often has a front end Load switch to take power from an external power source or USB (it may even negotiate USB 3 Power delivery for you automatically). It will often include a the battery charger circuitry as well. The battery is then either switched in or out depending on available power source it is Float coupled to the front end buck/boost or SEPIC primary regulator (in your case you would want a 5V output here). The primary regulator can then feed numerous buck or LDO regulators to provide the required rails for the system


You should be able to find a battery charger to complement the gas gauge in place of the PMIC.
If you go down this route then you may also need a power supply between the battery and the Raspberry Pi (to provide 5V from your battery.)
You may also need a power supply in front of the charger IC as well.

I have used systems from both Ti and Maxim in the past. it is my experience that all gas gauges need quite a bit of configuring / experimentation to correctly match to your battery design - DO NOT BELIEVE the data sheets when they tell you that they can work correctly without additional microprocessor based support. You will always need to tell the gauge what your shutdown voltage is.


It may be worth your while to take a look at the smart battery specifications as well....

/Andy

User avatar
jcyr
Posts: 357
Joined: Sun Apr 23, 2017 1:31 pm
Location: Atlanta

Re: Battery charger IC good for raspberry pi?

Sun Sep 15, 2019 5:28 pm

Something like this https://www.adafruit.com/product/2465 might do if you don't need more than 1 AMP. As you can see designing one of these yourself is not trivial, and you'd likely not build it for less than $20.
It's um...uh...well it's kinda like...and it's got a bit of...

tpylkko
Posts: 382
Joined: Tue Oct 14, 2014 5:21 pm

Re: Battery charger IC good for raspberry pi?

Sun Sep 15, 2019 5:45 pm

https://uk.pi-supply.com/products/pijuice-standard

Or, you might consider using LiFePo batteries which many people use to run 3.3 v microcontrollers without a regulator at all (the voltage is lower than lipo).

https://lifepo4wered.com/lifepo4wered-pi.html

timl132
Posts: 8
Joined: Sat Sep 14, 2019 4:30 pm

Re: Battery charger IC good for raspberry pi?

Sun Sep 15, 2019 6:18 pm

jcyr wrote:
Sun Sep 15, 2019 5:28 pm
Something like this https://www.adafruit.com/product/2465 might do if you don't need more than 1 AMP. As you can see designing one of these yourself is not trivial, and you'd likely not build it for less than $20.
Powerboost doesn't have i2c to read charge status I believe, and it's way overpriced. I'm gonna need to make about 3 or 4 pi's battery powered. So something custom would be cheaper considering pcb's are just $5 and IC's are often only about $2.
tpylkko wrote: https://uk.pi-supply.com/products/pijuice-standard

Or, you might consider using LiFePo batteries which many people use to run 3.3 v microcontrollers without a regulator at all (the voltage is lower than lipo).

https://lifepo4wered.com/lifepo4wered-pi.html
It looks good, but I need it to work with li-po or li-ion. Also, it looks very expensive.
RattusRattus wrote: Typically this is more than one IC

A coulomb counter IC / gas gauge coupled to the battery (i.e. inside the battery pack if it is removable) using either 1-Wire or I2C bus

A PMIC (Power Management IC) - This is typically the primary power supply for your product, providing multiple SMPS and LDO rails for the SoC and Subsystems.
Many of the rails will have programmable output voltages. The PMIC often has a front end Load switch to take power from an external power source or USB (it may even negotiate USB 3 Power delivery for you automatically). It will often include a the battery charger circuitry as well. The battery is then either switched in or out depending on available power source it is Float coupled to the front end buck/boost or SEPIC primary regulator (in your case you would want a 5V output here). The primary regulator can then feed numerous buck or LDO regulators to provide the required rails for the system


You should be able to find a battery charger to complement the gas gauge in place of the PMIC.
If you go down this route then you may also need a power supply between the battery and the Raspberry Pi (to provide 5V from your battery.)
You may also need a power supply in front of the charger IC as well.

I have used systems from both Ti and Maxim in the past. it is my experience that all gas gauges need quite a bit of configuring / experimentation to correctly match to your battery design - DO NOT BELIEVE the data sheets when they tell you that they can work correctly without additional microprocessor based support. You will always need to tell the gauge what your shutdown voltage is.


It may be worth your while to take a look at the smart battery specifications as well....

/Andy
Do you have like a reference design of something like this I can look at so I can kinda understand it? The way I understand it is I need something to charge the battery, and something to boost from 3.7 to 5v. Preferably I would be able to communicate with the charger IC which would then be able to turn of it's output, turning off the boost converter.

But I'll look into PMIC's. Thanks!

tpylkko
Posts: 382
Joined: Tue Oct 14, 2014 5:21 pm

Re: Battery charger IC good for raspberry pi?

Sun Sep 15, 2019 7:05 pm

It looks good, but I need it to work with li-po or li-ion. Also, it looks very expensive.
Right, but the first one was for LiPo.

Although it might be considered expensive (not going to judge that) it meet all your criteria, I believe, as it has the auto shut down option, is a HAT, does charging while powering, rtc wakeups etc.

Another option, to bring down the price, is to use separate booster/regulator circuitry and another one for charging. Then you get something like Adafruit powerboost, but slightly lower cost. Although, it is hard to keep the price down, because even if you use cheap chinese parts, you need quite many parts, you need a usb port, a charger (like maybe tp4056), the regulator, some way to measure battery (can be done with analog pin of mcu for example samd21) and control circuitry, plus hours of work assembling it. Plus adafruit safety tests and certifies the products, something you cannot do.

Return to “General discussion”