In my Musical Death Star tutorial, I used a TP4056 lithium battery charger board and a lithium polymer battery to power the project. In this tutorial, I will show you how to use the TP4056 charger board and a lithium-ion battery with a boost converter to power a breadboard Arduino.
You can view this tutorial on YouTube then read the rest of this post for additional details.
Bill of Materials
- TP4056 Charger Board
- 5-volt Boost Converter Board
- 18650 Battery
- 18650 Battery Holder
You can buy the boards on eBay or Amazon.
The TP4056 charger board uses the TP4056 lithium ion charge controller IC. This board is very cheap, you can buy it on eBay for about $1 with free shipping. Its small size makes it easy to add to any of your projects. There are a couple of different versions of the TP4056 charger board. The two most common ones are pictured below.
Both are capable of charging single cell lithium batteries using the constant current to constant voltage charging method. The board on top adds additional circuitry which provides over-discharge, overcurrent, and short circuit protection. It also uses a micro USB connection instead of mini USB. The boards feature two indicator LEDs, a green or blue LED to indicate that the battery is fully charged, and a red LED to indicate that the battery is charging.
You have the option to power the board via a USB cable or by attaching an external power source to the IN+ and IN- pads on the left-hand side. The lithium battery is connected to the BAT+ and BAT- pads on the right-hand side. If you are using the board with the protection circuit, you can connect the output to the OUT+ and OUT- pads. Connect the output wires to the BAT+ and BAT- if your board does not have a protection circuit.
The charging current is set to 1 A. This setting is fine for 18650 and similar style lithium batteries but is too high for lower capacity lithium polymer batteries. You can lower the charging current by changing the R3 resistor.
This is a small 0805 SMD resistor that can be tricky to replace if you have never soldered SMD components before. The good news is that you can use a 1/4 watt resistor like I did in another project here:
You just need to figure out which resistor will work for your particular battery, see your batteries datasheet for the maximum charging current. The TP4056 datasheet contains a table with resistor values and resulting charging current. Here is a screenshot of that table:
The TP4056 IC can recondition a lithium battery that has been discharged below 2.9 V. The charger will switch to trickle charge mode at 130 mA until the voltage reaches 2.9 V.
The breadboard Arduino project that we will be powering requires 5 V, the 18650 battery produces 4.2 V when fully charged with a nominal voltage of 3.7 V. That is not enough to power the breadboard Arduino. We need to boost the voltage using a boost converter.
This is a 5 V boost converter board that will step-up the voltage from the 18650 battery to give us enough voltage to power the breadboard Arduino. You can find boost converter boards like this on eBay for about $1.
These boost converter boards are very simple to use. They will usually have two pads to connect the input and two pads for the output. Some will include an indicator LED.
This is an easy project to build since we are working with pre-made boards.
Step 1: Add wires to the TP4056 board.
Solder the positive and negative wires from the 18650 battery holder to the B+ and B- pads on the TP4056 board.
Add wires to the OUT+ and OUT- pads.
Step 2: Connect Boost Converter
Solder the OUT+ wire to the IN+ pad and the OUT- to the IN- pad on the boost converter.
Step 3: Add Output Wires
Solder two wires to the output pads on the boost converter. Use your multimeter to find the correct pads if they are not labeled. I used thicker 22 AWG solid wires since I will be connecting to a breadboard.
Step 4: Power!
Connect the output wires to the power rails of the Arduino breadboard and watch the LED light up. Connect a USB cable to the TP4056 charger board, and you should see the red LED turn on to indicate that the battery is charging. You can use this method on any of your projects that require 5 V.
What About 3.3 V?
The voltage on a lithium battery ranges from 4.2 V when fully charged to 2.7 V (this varies by battery). You’ll need a circuit that will lower the voltage when the battery voltage is higher than 3.3 V and boost the voltage when the battery voltage is below 3.3 V.
A 3.3 V buck-boost converter solves this problem. You can buy pre-made buck-boost converter boards on eBay. Follow the same instructions but swap the boost converter board with a buck-boost converter board.
The TP4056 charger board is an amazing tool that can be used for powering projects that are completely enclosed or would benefit from having a built-in charger.
I hope this has spurred some ideas for how to power your own projects with a lithium battery and TP4056 charger board. My next tutorial will show you how to replace the charging current resistor so you can use smaller lithium polymer batteries to power your projects.
How do you power your projects? Leave a comment below and remember to check out this tutorial on YouTube.