BatOne - Li Ion battery charger and DC buck regulator

From Electronic Sweet Peas
Jump to: navigation, search



Available in our web shop

BatOne is a +One module that will allow you to run your ESP210 and other boards in the stack from a single cell Li Ion battery.

It has an advanced Li Ion charger circuit with indicator LED's that indicate the status of the charging cycle. Obviously when the device is running from a battery these indicator LED's are disabled to minimize power consumption. The status from the charger can also be read by the ESP8266 via an I2C bus allowing the processor to send messages to a user when the charging status changes.

The board is also equipped with a 3.3Volt synchronous boost converter that provides the power to the node.IT stack. The linear on board regulator on the ESP210 is disabled automatically when the BatOne is mounted to further reduce the power consumption.

The Board


This is a detailed technical description of the BatOne board.

Important Notice !

This module was designed with a stationary battery in mind. This means that you should not plug in or unplug batteries while the device is operating. We have seen on a few boards in our lab that the switch mode power supply device breaks down when doing so. So please, do not unplug or plug in batteries while the device is powered on.

Charger Circuit

The Li Ion charger circuit on the module is a Microchip device called MCP73871. The MCP73871 device is a fully integrated linear solution for system load sharing and Li-Ion/Li-Polymer battery charge management from an AC-DC wall adapter or USB port power sources. It is also capable of autonomous power source selection between input and battery.

The input voltage source can be either directly from pin 17 (+5V) or from the USB port. By default the BatOne module will comply with all applicable USB specs and allow charging up to 500mA. If you need to have a higher charge current the module can be programmed to allow up to 1A charge current

Boost Converter

To convert the varying voltage from the battery cell we have used a synchronous boost converter called TPS61200. This converted is capable of supplying up to around 300mA from a 3volt battery voltage at over 90% efficiency. Efficiency will of course vary with battery voltage and power consumption from your node.IT stack. The TPS61200 will supply 3.3V all the way down to were the Li Ion battery protection circuit cuts off, making sure you get the maximum from your battery.


Three LED's are available to indicate the status of the charging process.

The first LED (LED1) is a power good (PG) indicator. It will shine when the power applied to the system is good enough to be used as charge current for the battery. It is up to you as a user to make sure that the power that you apply to the system is no lower than 4.5 Volt and no higher than 6 Volt. This is normally not a problem when running the system from the USB cable but when you feed pin 17 you self you have to make sure that those limits are adhered to.

The second LED (LED2) is the charge complete LED. This will go on when the charge cycle is complete and the battery is considered full by the charger. You can now detach the USB cable or any other power supply that you have and the system will continue operating undisturbed.

The third LED (LED3) indicates that the charging process is running.

These LED's can also indicate that an error has occurred during charging. The table below gives you the different states that the LED's can end up in.

Charge Cycle State LED3 LED2 LED1
Shutdown OFF OFF OFF
Charger Disconnected OFF OFF OFF
Charging ON OFF ON
Charging Done OFF ON ON
Error State ON ON ON

The LED's are all powered by pin 17 (+5V) on the module, so when external power is removed from the system the LED's will not light up any more. This will reduce the power consumption of the system.

I2C registers

The BatOne is equipped with a PCA9536 device. The PCA9536 is a I2C based GPIO port expander that have two purposes in the system.

The first thing it allows is to from the software read the status of the LED's. This way your software can know when the battery is being charged and what the current charge status is. It can also be used to detect when the charger is removed.

The second purpose is to put the charger in non a non USB compliant mode that will allow the charger to charge batteries with currents up 1A.

The following table describes how the IO pins of the PCA9536 is connected to the system:

GPIO Connected to Direction Function
0 LED1 INPUT Reads the state of LED1
1 LED2 INPUT Reads the state of LED2
2 LED3 INPUT Reads the state of LED3
3 Mode Select OUTPUT Sets the charger in high current (1A) mode


The board have a number of PCB solder bridge jumpers that can be used to configure the board. This is a listing and explanation of what the jumpers do.

  • SJ1 - This jumper shorts the GPIO16 pin with the reset input allowing the ESP210 to be operated in deep sleep mode (Component side / Default not bridged).
  • SJ2 - Bridging the jumper enables the battery voltage to be measured on the analog input of the ESP210 (Solder Side / Default not bridged).
  • SJ3 - Bridging this jumper enables the SCL pull up (Solder Side / Default bridged).
  • SJ4 - Selects what GPIO pin to use as the SCL signal (Solder Side / Default GPIO14).

Supported Batteries

The BatOne supports most one cell Li Ion batteries. Remember though that the charge current can not be higher than 1A so very large batteries will take a very long time to charge. We have tested batteries with capacities ranging from 140mAh up to 2000mAh, both inexpensive Chinese batteries as well as branded Sony cells and they work equally well.

If you experience any problems you should immediately disconnect your battery and investigate what has gone wrong. If you are unsure on how to investigate please contact us and we will try to help you.

Final Words

Please keep in mind that charging a Li Ion can potentially be a dangerous operation. Always make sure that your battery is intact and has no visible damages. A damaged battery can catch fire and cause irreparable damage to goods and/or humans and animals


Tips, Tricks and useful links

Nothing yet