Many of your projects may need a lithium battery charger. If that’s your case, you’ll need a module like the TP4056. This circuit allows you to connect an electrical power source to its input and a battery to its output so that it can be properly charged. Something very practical because more and more devices need a battery to work.
The sources of electrical energy can be various, from a mains adapter, a power supply, a solar panel, a generator, etc. The same components are not required in all cases, as in some cases the signal from that source has to be adapted to be suitable for this TP4056 module. But this is something that depends on each case and you will have to evaluate it according to your needs…
All about the TP4056
The TP4056 is a SOP-8 encapsulated chip that is capable of managing the charge of a battery. That is, it matches the power input to the 1A standard of most lithium batteries used in the electronics industry, and is also capable of temperature control.
From the previous diagram of the TP4056 module, you have to keep in mind only:
- The miniUSB port if you want to use it to power your battery through this type of cables.
- If you don’t want to use a miniUSB cable you can use its terminals (they are at the side of the port) to connect a solar panel, or any other source you want. Another option is to buy a miniUSB cable and connect its internal cables to the power supply you need…
- Its two Charging and Completion LEDs will let you know when the battery is charging or when the process is finished.
- BAT+ and BAT- are the other output terminals that will be connected to the terminals of the battery you need to charge. That’s how simple their connection scheme is.
This IC can be made by several manufacturers, and its pin-out is very basic. It usually comes mounted on a much more complete module. In the case of these TP4056 modules, which , they come ready to connect the source from a microUSB. However, you can manipulate it and connect the source you want to their terminals in a very simple way.
More information – Datasheet TP4056
Create a charger with the TP4056
To understand it better, let’s see an example of how this TP4056 module would be connected to a project to charge a small Li-Ion battery by means of a small solar photovoltaic plate.
In this case, we will not use the miniUSB port, instead we will use a solar panel that will power the TP4056 module to charge our battery. In this case, we will need these elements:
- Diode 1N4004
- 3.7v Li-Ion 18560 battery with 4200 mAh capacity (although this last one will not affect the circuit if you want to vary its capacity).
- for the output (it is not necessary, it is only necessary in case you want to connect to the battery a device that needs a specific voltage. In this case, the battery would feed a USB device and therefore you need to adapt the battery output to 5v DC.
- Cables for connection and a protoboard. You can use red cable for the positive and black cable for the negative.
How to connect
Once you have all the necessary ingredients, your connection is quite simple. Just follow the next steps and you can start charging your battery:
BAT+ to the positive terminal of the battery and BAT- to the negative terminal of the battery. By the way, like the solar panels, the batteries can also be connected in parallel (their capacity is added), serial (same capacity, but the voltages are added) or mixed if you have several. That is to say, if you have two batteries of 2000mAh and 3.7v and you connect them in parallel, a battery with 4000mAh and 3.7v is created. On the other hand, with a serial connection, the 2000mAh is kept, but 7.4v is supplied.
- The outputs of the solar cell must be connected to the input of the TP4056 charger. These are the terminals next to the miniUSB that are marked as N+ and N-, respecting the polarity. If you have several solar panels, you know that you can connect them in parallel (their powers are added), in series (their voltages are added) or with mixed systems. For example, if you have 2 panels that give 4w and 3.7v each and you connect them in parallel, you will have 8w and 3.7v at their output. In series you would have 4w and 7.4v.
- But you must take into account something important, and that is that you must use a zener diode 1N4004 for the connection to the positive pole of the solar cell. That is, the negative of the solar cell would go directly to the N- of the module, but the other should have a diode between the + output of the solar panel and the N+ terminal. This allows the current to pass in only one direction and limits the voltage to protect the circuit.
- Once these connections have been made, the TP4056 module must now be connected to the battery. To do this, connect a cable from BAT+ to the positive terminal of the battery and BAT- to the negative terminal of the battery. By the way, like solar panels, batteries can also be connected in parallel (their capacity is added), in series (same capacity, but the voltages are added) or mixed if you have several. That is, if you have two 2000mAh and 3.7v batteries and you connect them in parallel, a battery with 4000mAh and 3.7v is created. On the other hand, with a serial connection, the 2000mAh is kept, but 7.4v is supplied.
- In this case, the boards are 3.7v like the battery, but if you want to connect a circuit to this battery to power it at, for example, 5v DC, like many USB devices, then you need the converter circuit. For that, you simply need to connect the battery terminals to the USB Booster converter module . In case you want to power something with its 3.7v directly, you could save the converter circuit.
- Now you can connect to the USB port of the converter any device which you want to power. For example, the Arduino board itself.
And once it is done, it will be ready for use. Remember that you can also use the outputs of the Arduino board as a power supply, etc. And remember that depending on the level of the battery, and its capacity, it could take more or less time to be complete .