Many of your projects may require a charger for lithium batteries. If that's your case, you will need a module like the TP4056. This circuit allows you to connect a source of electrical power to its input and a battery to its output so that it can be charged properly. Something very practical because more and more devices need a battery to work.
Companies that sources of electrical energy can be diverse, from an adapter connected to the electrical network, a power supply, a solar panel, a generator, etc. Not in all cases the same components are needed, since in some cases the signal from that source has to be adapted to make it 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
El TP4056 is an encapsulated chip in SOP-8 format which is capable of managing the charge of a battery. That is, it adapts the power input to the 1A standard of most lithium batteries used in the electronics industry, and it is also capable of temperature control.
Share previous schematic of the TP4056 module, you have to keep in mind only:
- El miniUSB port if you want to use it to power your battery through these types of cables.
- If you don't want to use a miniUSB cable you can use its terminals (They are on the sides of the port) to connect a solar panel, or whatever source you want. Another option is to buy a miniUSB cable and connect its internal cables to the source you need ...
- Their two LEDs for Charging and Completion They will notify you when the battery is charging or when the process has finished.
- BAT + and BAT- These are the other output terminals that will be connected to the battery terminals that you need to charge. That's how simple your connection scheme is.
This IC can be manufactured by various manufacturers, and its pin-out is very basic. Usually it comes mounted on a much more complete module. In the case of these TP4056 modules, that you can buy in stores, they come ready to connect the source from a microUSB. However, you can manipulate it and connect the source you want to its terminals in a very simple way.
More information - TP4056 Datasheet
Create a charger with the TP4056
So that you understand it better, we are going to see an example of how this TP4056 module would connect to a project with which to charge a small Li-Ion battery by means of a small photovoltaic solar panel.
In this case, the miniUSB port will not be used, 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:
- 6v solar panel
- Diode 1N4004
- TP4056 module
- Li-Ion 18560 3.7v battery and 4200 mAh capacity (although the latter will not affect the circuit if you want to vary its capacity).
- USB voltage converter for the output (it is not essential, it is only necessary if you want to connect a device that needs a specific voltage to the battery. In this case, the battery would power a USB device and therefore you need to adapt the battery output at 5v DC.
- Cables for connection and a breadboard. You can use red wire for the positive and black for the negative.
How do you connect
Once you have all the necessary ingredients, its connection is quite simple. You just have to follow the following steps and you can start charging your battery:
- Companies that solar cell outputs You must connect them to the TP4056 charger input. 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 already 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 plates that give 4w and 3.7v each and you connect them in parallel, you will have 8w and 3.7v 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 1N4004 zener diode for 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 current to flow in only one direction and limits the voltage to protect the circuit.
- Once these connections have been made, now the TP4056 module needs to be connected to the battery. To do this, join a cable from BAT + to the positive battery post and BAT- to the negative battery post. By the way, like solar panels, batteries can also be connected in parallel (their capacity is added), series (same capacity, but the voltages are added) or mixed if you have several. That is, 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 remains, 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 feed it to, for example, 5v DC, like many USB devices, then you need the converter circuit. For that, you simply have to connect the battery terminals to the USB Booster converter module… In case you want to feed something with its 3.7v directly, you could save the converter.
- Now you could connect any device you want to power to that USB port of the converter. For example, the Arduino board itself.