Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Designing a Power Bank (Part 2/9)

By Diksha January 8, 2022

As the popularity and use of smartphones and tablets have grown, the demand for portable and hands on power supplies have also increased. The smartphone and tablets come with a battery which gets discharged in 4 to 5 hours of use. As a solution to this problem, power banks have been introduced in the market for the frequent users. These power banks also come to resort when the user is on a long journey and has no facility to charge up his phone or tablet. A power bank is basically a portable device which can supply power to the gadgets like smartphones and tablets through the USB port. Power bank itself can be charged by USB port and stores charge which later can be used to power up other devices.
In this experiment, a power bank will be designed which can provide a 5V/4A power output. The power bank will be constructed using a 3.7V Li – ion battery and will have a charger circuit built using TP056 IC and power booster circuit at the output. The Li-ion battery will store the charge and then the stored charge in the battery will be used to supply power to the devices. For storing the charge, the Li-ion battery first itself needs to be charged using a charger circuit for which TP056 IC is used. This IC is commonly used for charging the Li-ion batteries. The IC is specially designed to charge a single 3.7 V Li-ion battery and can provide maximum charging current of 1A.
The mobile phones and most of the electronic gadgets need 5V to power up but the Li-ion battery will provide a maximum voltage of 4.2 V. Therefore, a power booster circuit will be needed which can amplify the output power to 5V. For amplifying the power stored in the battery XL6009 regulator IC is used which will boost the DC power from the battery to a regulated 5V DC. The XL6009 provides maximum 4 A current at the output (as per its datasheet). Therefore, the power bank designed in this electronics project will provide an output power of 5V / 4 A.

Components Required

List of Components required for Power Bank
Fig. 1: List of Components required for Power Bank

How the circuit works – 

Prototype of Power Bank designed on a breadboard

Fig. 2: Prototype of Power Bank designed on a breadboard

The circuit of the power bank has two building blocks – 1) Battery recharge circuit and 2) Output amplifier circuit. If the output voltage required would have been 3.7 V or 4 V only, the amplifier circuit would not have been required. But, the required output voltage is 5V, that is why amplifier circuit at the output of the device is a must. As per the circuit sections, the device also operates in two stages – 1) Charging of the battery and 2) Taking the output from the battery through amplifier circuit. 

1) Charging of the Li-ion battery with TP4056 charger

In this electronics project, a 3.7 V Li-ion battery is used to store the charge which is fully charged when its terminal voltage reaches 4.2 V. As any battery charges, the voltage output across its terminals keeps on increasing. Every battery has a peak terminal voltage value for which the battery is fully charged. So, the charging percentage of battery is also estimated by measuring the terminal voltage. The Li-ion battery needs to be handled carefully as the battery may catch fire due to overcharging. Therefore for charging the Li-ion battery, special ICs like TP4056 IC are used which automatically disconnect the battery from input supply as the battery is fully charged.
The TP4056 is a specially designed IC to charge the 3.7 V Li-ion batteries. This is a linear battery charger controller with constant current and constant voltage. By adding a single programmable resistor the IC can be used to charge a 3.7V Li-ion battery. The charge voltage is fixed at 4.2V and charging current can be set by adding some resistor and capacitor according to the battery to be charged. The IC also provides internal thermal protection and current limitation. There is no need to add extra blocking diode due to internal P-MOSFET which blocks the reverse current.
The TP4056 IC comes in SOP package which makes it ideal for use in portable devices. It also requires less external components, none other than few resistors and capacitors. The IC has 8 pins with the following pin configuration –
Table listing pin configuration of TP4056 IC
Fig. 3: Table listing pin configuration of TP4056 IC 

The IC needs minimum 4V to 8V voltage for its operation. It can provide maximum 1000mA charging current to the battery and a fixed 4.2 V at the output. The circuit as given in the datasheet of the IC is used to design the charger.

Circuit Diagram of TP4056 IC based Power Bank Battery Charger

Fig. 4: Circuit Diagram of TP4056 IC based Power Bank Battery Charger

For deciding the value of charging current of the battery a Rprog resistor has to be connected at the PROG pin as described the function of the PROG pin in the datasheet.

For 1000mA charging current Rprog can be calculated as follows –

Ibat = ( VPROG/RPROG )*1200  (VPROG = 1V)

Rprog = (Vprog/Ibat)*1200

Rprog = (1/1)*1200

Rprog =  1.2k

The battery should be connected as per polarity indicated on the IC because the TP4056 IC does not have any reverse polarity protection circuit.

o Battery Charging Indicators

For visual indication of charge termination and charging state of the battery, LEDs can be connected to pin 6 and pin 7 of the IC. When the input supply is provided to the circuit then the Red LED at pin 7 lights up which will indicate the charging state of the battery. When the battery voltage will reach to 4.2V then the battery will draw less current. The charging current when drops down to 1/10th of the programmed current (1000mA) then charging will be terminated. The Green LED at pin 6 will light up and give a visual indication that the battery is fully charged (as terminal voltage has reached 4.2V).

2) Drawing output from the battery through Voltage amplifier and regulator circuit –

Once the battery is fully charged by the TP4056 charger circuit, it is ready to supply output. The output voltage from Li-ion battery needs a boost converter which will increase the output voltage of the battery to 5V.
A boost converter is used to convert the input DC signal to the higher voltage level. The XL6009 regulator IC is used for boost converter circuit which provides regulated and amplified voltage. This boost converter amplifies the signal to around 1.6 times the input signal from the battery with an efficiency of 94%. The XL6009 is a DC to DC converter which is capable of generating either positive or negative output voltages with the input voltage in the range from 5V to 32V.
The IC has built-In N-Channel Power MOSFET and fixed frequency oscillator which allows providing a stable output over a wide range of input voltages. The IC is specially designed for use in automotive Boost, Inverting converters, Notebook car adapters, and portable electronics equipment. The IC has features like frequency compensation, thermal shutdown, current limitation and soft start. It comes available in the T0263-5L package. The XL6009 will work on input supply voltage of -0.3V to 36V and can provide an output in the range of -0.3V to 60V. The IC has five pins with following pin configuration –
Table listing pin configuration of XL6009 Regulator IC
Fig. 5: Table listing pin configuration of XL6009 Regulator IC 

The circuit specified in the datasheet of the IC for typical boost converter application is used in this project.

Note: You can find the XL6009 Boost Converter Circuit under the “Circuit Diagram 2” tab.

At input and output of the regulator, the capacitors (Cin and Cout) are used which reduces the unwanted ripples and noise from the signal.The Cout provides a regulated and smooth DC voltage at the output. A small value of the capacitor 1uF (C4) is also connected in parallel with the high-value capacitor Cout to reduce the ESR (equivalent series resistance) at the output (as high-value capacitors have high ESR).
The inductor connected between pin 3 and 4 plays an important role in the boost converter. The main function of the inductor is to store the current. The higher the value of the inductor, the higher will be the current stored in it but a high-value inductor also has an increased size. So an inductor should be selected which can provide the desired current at the output. In the project, an inductor (L1) of 47 uH and a Schottky diode (D3) are used. The SS34 diode is chosen as this diode has a less forward voltage drop and works fine in high frequency. A list of suitable Schottky diodes for the IC according to the current demand and input voltage can be found in the data sheet of the XL6009 IC. For the convenience, the table is precisely repeated below –
Table listing Schottky Diodes Suitable for XL6009 Regulator IC
Fig. 6: Table listing Schottky Diodes Suitable for XL6009 Regulator IC 
Circuit Diagram of Inductor and Schottky Diode connected to XL6009
Fig. 7: Circuit Diagram of Inductor and Schottky Diode connected to XL6009

Internally the XL6009 has N-channel power MOSFET with fixed frequency of the oscillator (as in below fig 4). This MOSFET acts as a switching transistor and oscillator which generates a square wave of around 400kHz (as per the datasheet). During the positive half-cycle of the square wave, the inductor stores some energy and generates a magnetic field so the left terminal of the inductor is a positive voltage and right one is at negative. Therefore the anode of the diode is at lower potential and acts like an open circuit.

The base of the MOSFET gets positive voltage and the MOSFET turns ON. So all the current from the supply flows through the inductor to MOSFET and finally to the ground.
Circuit Diagram showing Negative Charge Cycle of Internal MOSFET of XL6009
Fig. 8: Circuit Diagram showing Negative Charge Cycle of Internal MOSFET of XL6009
During the negative half cycle, the MOSFET turns off. Due to this, the inductor does not get a path to charge up. Now the current at the inductor generates a back emf (as per the Lenz law) which reverses the inductor polarity (as shown in below image). Therefore the diode gets forward biased. Now the charge stored in the inductor starts discharging through the diode and a regulated voltage is obtained at the output.
In this case, the output voltage now depends upon the stored charge in the inductor, the more the stored charge, the more the output voltage is. Therefore if the charging time of inductor is more then the stored charged in the inductor also increases. So there become two sources of voltage as input, one is an inductor and another one is input supply. Therefore there is always an output voltage greater than the input voltage.
Circuit Diagram showing Positive Charge Cycle of Internal MOSFET of XL6009
Fig. 9: Circuit Diagram showing Positive Charge Cycle of Internal MOSFET of XL6009
 Resistive Voltage divider circuit:
For setting the 5V at the output of XL6009, an external resistive voltage divider circuit is used at feedback pin (pin 5) of the regulator IC (as in below image). This feedback pin senses the output voltage and regulates it.
Circuit Diagram of Voltage Divider connected at output pin of XL6009
Fig. 10: Circuit Diagram of Voltage Divider connected at output pin of XL6009
o Calculating output voltage
As the internal feedback threshold voltage of XL6009 is 1.25V. This means there is a constant voltage at pin 5 and a constant current will flow through R4 as well as R5. Therefore, sum of resistor drop across R4 and R5 gives Vout as

Vout = 1.25*(1+(R4/R5))

As R4 =4.1k and R5= 1.3k

Vout = 1.25*(1+(R4/R5))

By putting R4 and R5 values in above equation

Theoretical observation, Vout = 5.2V (approx.) 
The output voltage is not exactly 5V because any device which requires 5V not exactly operates on 5V. It needs some higher voltage than the 5V due to some resistive losses and drops in the device. For boosting the input signal to 5V, any boost converter modules available in the market can also be used. Like XL6009 booster board are also available which gives a constant and regulated voltage of 5V at the output.

Testing – 

After connecting all the components together, 5V is supplied to the TP4056 IC which starts charging the Li-ion battery. The output voltage of the battery acts as an input to the boost circuit. So, the input voltage at boost circuit/Li-ion Battery voltage, Vin= 4.2V when the battery is fully charged. The boost circuit amplifies the input and give output voltage of 5.18 V. Now by connecting different load at the output, different values of load current are observed which are as follow – 
Table listing output current of power bank for different loads
Fig. 11: Table listing output current of power bank for different loads
The power bank designed in this project can be used to charge any electronic device which needs a regulated 5V and 4A maximum current for its operation. The power bank designed in this project has efficiency around 94% and due use of suitable ICs has Internal overvoltage and thermal protection. The power bank is automatically cut off from the supply as it is fully charged and has the LED indicators for the charging and full charge indications. It should be taken care that the battery should not be discharged by connecting a load, during the charging process of the battery. Simultaneous charging and discharging can reduce battery life and can harm TP4056 IC. 

You may also like:


  • What battery chemistries are used in electric vehicles?

  • What is the Modbus protocol and how does it work?

  • What is 3D scanning?

  • What are different types of biometric sensors?

  • What is TinyML?

  • What is Cryptocurrency?

Circuit Diagrams

Circuit-Diagram-Charger-Power-Bank-
Circuit-Diagram-Power-Bank-


Filed Under: Electronic Projects

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Redundant XORs
  • No Output Voltage from Voltage Doubler Circuit in Ansys Nexxim (Harmonic Balance Simulation)
  • Discrete IrDA receiver circuit
  • ISL8117 buck converter blowing up
  • I²C Ground Isolation with Series Battery Cells (ULIN13-01 + PIC18LF4520)

RSS Electro-Tech-Online.com Discussions

  • Help with finding unique wire lug(s)
  • Simple LED Analog Clock Idea
  • Kawai KDP 80 Electronic Piano Dead
  • Saga 1400sv vinyl cutter motherboard issue
  • using a RTC in SF basic

Featured – LoRa/LoRaWan Series

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices

Recent Articles

  • What is the LoRaWAN network and how does it work?
  • Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe