Assembly effect :
-------------------------------------------------- -------------------------------------------------- --------------------------
-------------------------------------------------- -------------------------------------------------- --------------------------
The material of the acrylic shell looks a little out of place. I made the SW fixing hole and mounting hole a little bigger... ........... Follow-up In improving functionality and optimization.
Schematic part:
On the original basis, a new battery management part is added, which has strong battery life and a maximum output current of 1A. Other functions need to be improved.
TP5400 is a single-cell lithium-ion battery charger and constant 5V boost controller dedicated to mobile power supply. The charging part integrates functions such as high-precision voltage and charging current regulator, pre-charging, charging status indication and charging cutoff. It can Outputs a maximum charging current of 1A. The boost circuit uses a VFM switching DC/DC boost converter with extremely low no-load current manufactured using CMOS technology. It has extremely low no-load power consumption (less than 10uA), and the boost output driving current capability can reach 1A. No external keys required, plug and play.
typical application:
For the battery charging current, use a resistor connected between the PROG pin and ground to set the position of R4 in the figure above.
RPROG(Ω) |
IBAT |
10k |
130mA |
5k |
245mA |
2k |
560mA |
1.5k |
740mA |
1.1k |
1000mA |

The battery is installed in the bottom package to protect the battery
While charging When charging:
When the charger charges the battery, the CHRG pin is pulled low by the internal switch, indicating that charging is in progress.
A transient load on the BAT pin can cause the PROG pin voltage to briefly drop below 200mV while the DC charge current drops to 1/5 of the programmed value. The 1.8ms filter time (tTERM) on the termination comparator ensures that load transients of this nature do not cause premature termination of the charge cycle. as follows:
TP5400 has two open-drain status indication outputs , CHRG and STDBY. CHRG is pulled low when the battery is charging.
When fully charged:
When the battery charging is completed, STDBY is pulled low by the internal switch, indicating that charging is completed.
Generally, there is no charging under-voltage lockout when charging with Type-C. When the charging power is not connected and the lithium battery voltage is 3V-4.2V, the boost circuit automatically starts and continuously outputs a 5V constant voltage source. In addition, when the BAT voltage is between 3V-4.2V, and the input power supply Vcc is less than 3.8V, or Vcc<Vbat+50mV and the PROG terminal is floating, the boost will also work. The boost circuit has a lithium battery low-voltage protection function . When the lithium battery voltage drops to 3V , the TP5400 will automatically shut down the boost .
When no battery is charging :
When the battery is not connected to the charger, CHRG outputs a pulse signal to indicate that no battery is installed. When the external capacitor on the BAT pin of the battery connection is 10uF, the CHRG flashing period is about 0.5-2 seconds.
charging |
Red light CHRG |
Green light STDBY |
Charging state |
Bright |
destroy |
Battery fully charged |
destroy |
Bright |
No battery status |
flashing |
Bright |
When working with boost |
destroy |
destroy |

Working voltage when fully charged:
When VBAT=3.8V IOUT=500mA, the boost efficiency reaches 90%, please refer to the data sheet for the remaining extensions. The functional part is too useless. Let’s optimize it later when we have time.
For software installation and firmware burning, please refer to the official link:
Precautions: