Creative Commons images are CC BY-NC-SA 3.0


SparkFun Battery Babysitter - LiPo Battery Manager
project on
hackster.io project

The Autonomous Home Robot
by Alexis Paques

Description: The SparkFun Battery Babysitter is an all-in-one single-cell Lithium Polymer (LiPo) battery manager. It’s half battery charger, half battery monitor, and all you’ll ever need to keep your battery-powered project running safely and extensively.

The Battery Babysitter features a pair of Texas Instruments LiPo-management ICs: a BQ24075 battery charger and a BQ27441-G1A fuel gauge. The charger supports adjustable charge rates of up to 1.5A, as well as USB-compliant 100mA and 500mA options. It also features power-path management, guaranteeing power to your project even if the battery has died. The self-calibrating, I2C-based BQ27441-G1A measures your battery’s voltage to estimate its charge percentage and remaining capacity. It’s also hooked up to a current-sensing resistor, which allows it to measure current and power! It’s a handy IC to have, if you ever need to keep an extra eye on your project’s power draw.

Get Started With the Battery Babysitter Guide!

Features:

  • LiPo Charger and LiPo Fuel Gauge combined into one board
  • DIP-switch-selectable charge rates of 100mA, 500mA or 1.5A
  • MicroUSB port for charging, or external options
  • Dynamic power-path managment maintains a reliable output supply
  • On/Off switch disconnects the battery for more power saving
  • 5V-tolerant I2C interface to fuel gauge
  • Fuel gauge measures voltage, percentage, and current

Documents:

Recommended Products

Customer Comments

  • Just want to say great job to Sparkfun for breaking out all the capabilities of these ICs. I know most of the use cases won’t need a thermistor, but it is infuriating when you have a board with a capable part but it isn’t in an accessible area since the designer didn’t think it would get used.

    Great job guys.

  • When I first saw this, I was worried about a problem we ran into at a company I used to work for, to wit, that the “smart” lithium ion battery charger would completely shut down after being “on” for roughly 24 hours. Our customers would leave their systems plugged in for weeks on end, then decide to “untether” and get a nasty surprise that the battery was dead.

    So I started looking through the datasheet for the chip (the BQ27075) and was pleased to find section 9.3.5.4 which talks about recharge voltages.

    I know that in many of my apps (“IoT” type gadgets) I like to use a LiPo battery for backup, and around here, I’d guess (I haven’t measured it) we average roughly 6 months between power outages. I’ll have to consider this one for future projects!

  • I was wondering if I can use this module to power a raspberry pi 3, since it seems that it cannot deliver a steady 5V (depending the battery state)?

    Maybe I must combine it with a boost converter?

  • What if I wanted to combine this with a boost converter so I could get the output to 5V at 1A? (i.e. TPS61200) Is that possible and if so how would it be wired?

  • I know the Raspberry Pi likes a 2A supply, but would this work as a long term (continuously running on grid power) battery backup option for a Raspberry Pi? I’ve been running one in a stable config on a 1.5A adapter for a while, now. Any thoughts or other suggestions are welcome.

  • I see that the minimum input voltage is 4.35V. If you used something like a solar panel (or array) that may drop below that voltage would it be bad for the chip or would it just cutoff? I’m interested in coming up with a LiPo solar charging solution that allows for unattended operation (assuming sun during the days).

    Is there a good chip already designed for this that anyone’s familiar with?

    Thanks.

    • It should be well-protected against a lower-than-specced input voltages. If the input voltage is below the battery voltage, the BQ24075 will essentially disconnect the input supply from the battery-charging and output sections. There’s also an an undervoltage lock-out feature, which shuts the chip off if the input voltage dips below ~3.3V. (More on that in section 9.3.1-2 of the BQ24075 datasheet.)

      The Sunny Buddy might be up your alley, if you’re looking for a more solar cell-specific LiPo charger.

  • adamj537 / last month * / 1

    Hello! The BQ27441 Fuel Gauge is a flash-based part, which means it has its own firmware that can be updated if you want to better suit your particular battery or application. My former employer has allowed me to open-source a project I made that allows you to use an Arduino or Energia compatible processor to program flash-based gauges. Here it is.

    If you want to do this, or want more information about this chip and why you’d want to program it, see the Technical Reference Manual, which should probably be added to the product description.

    One word of warning: flash-based gauges can be permanently bricked if you program them with bad firmware. TI recommends that if you try to program a flash-based gauge, you should have several on hand in case one is rendered inoperable. I probably destroyed at least 10 gauges when I was debugging the sketch.

  • Is it ok to have the battery always in here? As in, while charging, under load, on standby.

  • Is it possible to talk to more than one BQ27441-G1A on the same I2C bus , I looked through the data sheet but don’t seem to see if its possible .

    • Not easily, unfortunately. Unlike a lot of I2C chips, the BQ27441 doesn’t have an address-select pin or otherwise configurable I2C address. In lieu of separate I2C buses you could use an I2C multiplexer (for example) between a microcontroller and the pair of BQ27441’s.

  • I purchased this an a TeensyLC for a project I’m working on. I was wondering if it is reasonable to split an incoming USB connection to feed the data lines directly to the Teensy, the power lines to the Babysitter, and have the Babysitter provide power to the Teensy, regardless of the USB connection?

  • I am curious why my battery is not being detected? Has anyone else had any issues with this? If I could get it to be detected (BIE status pin = 1 in the Control () Flags register) then I could take measurements on my device!

    I NEED HELP!

    Sincerely, Michael

  • Is anyone else having an issue with the I2C interface where sometimes the Pi will read the board after using i2cdetect -y 1, and sometimes the 0x55 register will not show on the grid?

    There

  • Trying to use a Raspberry PI to talk I2C to this board to get the device_type. I would expect the value to be 0x0421 per the datasheet, but, I am receiving 0x7400 and wondering what I am doing wrong on reading a simple address:

    Here is my simple code:

    #include <stdint.h>
    #include <stdio.h>
    #include <errno.h>
    #include <stdlib.h>
    #include <wiringPi.h>
    #include <wiringPiI2C.h>
    
    #define I2C_ADDRESS 0x55
    
    
    int main()
    {
        int fd=0;
    
            if ((fd=wiringPiI2CSetup(I2C_ADDRESS)) < 0)
            {
             fprintf (stderr, "Unable to open I2C device: %s\n", strerror (errno)) ;
                 return 0;
            }
            delay(100);
    
            int x4 = wiringPiI2CReadReg16(fd,0x0001);
    
            printf("read from I2C: 0x%04x\n",x4);
    
    return 0;
    }
    

    Output: read from I2C: 0x7400

    Wonder if someone could give me assistances. I want to make sure I understand the I2C communications before trying to incorporate the library.

  • Does the GPOUT Pin always go to the SDA Pin of the I2C section of the RPi or Arduino (Specifically RPi)?

    It seems that if we want to measure anything this pin has to be setup as such. Yet in his video it doesn’t look like he’s using the GPOUT pin. Just curious!

  • The main battery charger supports an input up to 28V, how come did you limit it to 5V (or 4.6 to 6.4 as stated on the board?)? Can it be powered using a 12V input?

  • I have a 2W solar panel with an open-circuit voltage of ~6V, when I connect it to VIN of the BQ24075, it drops to about 4.5V and the CHG LED indicates it is charging. However, there is no change in mA,mV,mW of the charge circuit (BQ27441). After about 30 minutes of charging (no load), there is no change in the State of Charge (soc %). I am using a 3.7V 2Ah LiPo battery. Is my battery charging?

    I have tried all three modes on EN1, EN2… the full 1.5A does not seem to work as it loads the solar cell below the VDDO threshold of 4.35, but both 500mA and 100mA hold a steady voltage at the solar panel. The datasheet of the 24075 indicates it likes to regulate the voltage at VOUT at 5.5V, whereas the 24072 tracks VBAT + 225mV. I had assumed this chip would still be able to charge the battery as long as the VIN was above VDDO (4.35). Can anyone help me understand what is going on?

  • Double post, sorry.

  • I’d like to use this for one of my Teensy projects, supplying power when the USB cable is disconnected to the Teensy. When the USB cable is plugged in, I would like the USB port to power the Teensy instead of the battery. Would this let that happen?

  • I think I found a bug in the code - line 343 in SparkFunBQ27441.cpp:

    while ((timeout--) && (!(status() & BQ27441_FLAG_CFGUPMODE)))
    

    The CFGUPMODE bit is not in the status register, but rather the flags register. This causes this bit of code to fail. The correct line of code would be:

    while ((timeout--) && (!(flags() & BQ27441_FLAG_CFGUPMODE)))
    

    This works as expected. You state in the hookup guide after mentioning the setCapacity function:

    Expect a short delay – 1-to-2 seconds – before your Arduino completes the execution of this function.

    I suspect this delay is because setCapacity calls this function and it times out on this line because it is checking the wrong register! :)

  • The hookup guide shows the following charge currents incorrectly, in relation to the datasheet and your schematic:

    EN1 EN2 Charge Rate

    0 0 Suspend Mode (no charging)

    1 0 Fast Charge (1500 mA default)

    0 1 500 mA

    1 1 100 mA

    Should be:

    EN1 EN2 Charge Rate

    0 0 100 mA

    1 0 500 mA

    0 1 Fast Charge (1500 mA default)

    1 1 Suspend Mode (no charging)

  • I need something like this that then automatically rotates through around 8 single cells. Round-robining a top off/state check on each battery. ideally a channel expansion board, maybe 4 each, so you could just add as many ports as you needed. I2C controlled or such.

  • Hello, I’ve some questions:

    • What happen if I select 1.5A charging but the power supply only can give 500mA?

    • What is the max output that can handle at 3.3v? I need power enough to power a GSM/GPRS that need 2A sometimes.

    • Can I use this circuit for ultra low power applications? What power consumption it have?

    Best regards

      • They Babysitter’s charge rate is ultimately limited by what your supply can deliver. So in your example, the battery would charge at a max of 500mA.
      • The BQ24075’s max output current is 5A, which the board should be able to handle. It should be able to pull the ~2A from the battery and deliver it to the V<sub>OUT</sub> pin for your GSM module.
      • I haven’t fully measured the sleep mode current, but looking at the quiescent currents for both chips is a good place to start. The BQ27441 will consume anywhere between <1 to ~100µA, depending on the mode. And the BQ24075 will pull <10µA. You could also disable the power indicator LED by cutting SJ5 to save a big chunk of power.
      • “They Babysitter’s charge rate is ultimately limited by what your supply can deliver. So in your example, the battery would charge at a max of 500mA” So if I leave it in 1.5A charging mode forever, then I can safely charge the battery from a USB 1 / 2.0 port or from a 1.5A USB charging port without tripping the USB port? And the BQ24075 will automatically adjust the charge current? Can you point me to this info in the datasheet? I see 9.3.4.1.1 in datasheet, but it is only applicable if configured in USB mode.

      • A lot of Thanks Jimb0.

        I tried to cut SJ5 and the power consumption is 0.8mA, do you know more methods to save power?

  • I see that the maximum input current rating for the chip is 1.5 A, which I am assuming is based on the charging current rating also being 1.5 A. However, the maximum output current rating is 5A, which is from Battery to Output. My question then is this: What is the maximum current rating from “Input” to “Output”? Is the Path managment IC only capable of directing 1.5A from the input to the output? Phrased as a scenerio: Given a 6A input, a 3A load on the output and a battery (battery specs irrelevent for this case), is this “Battery Babysitter” capable of directing the full 3A required by the load from the input - or will it only direct 1.5A from the input and the remaining 1.5A it will pull from the battery?

    • From the BQ24075 datasheet the output pin is capable of 4.5A, but that’s when drawing from the battery. The input pin is restricted to 1.5A regardless.

  • Can this be used with this Polymer Lithium Ion Battery - 6Ah ?

    Also, how would you wire this if you needed this Polymer Lithium Ion Battery - 6Ah in series for 7.2v ?

    • It can definitely charge one of those 6Ah batteries. It won’t be able to reach the max charge current (6A), but the 1.5A charge rate would still work its magic a lot faster than our USB chargers.

      The ICs on this board only work with single-cell LiPo’s (with voltage ranging from ~3.6-4.2V), so you won’t be able to use it to charge a pair of LiPo’s in series.

Customer Reviews

5 out of 5

Based on 1 ratings:

Currently viewing all customer reviews.

Perfect as expected

Work realy fine. Exemple code work well to and permit and quick use.

Related Tutorials

Battery Babysitter Hookup Guide

June 23, 2016

An introduction and getting started guide for the Battery Babysitter - a flexible LiPo battery charger and monitor.