Power Bank - Portable Battery Charger By: Ganesh Raja and Pushek Madaan

Power Bank - Portable Battery Charger By: Ganesh Raja and Pushek Madaan
Power Bank – Portable Battery Charger

By: Ganesh Raja and Pushek Madaan

With an increasing number of features, mobile devices like smart phones tablets etc are requiring more
power. To extend operating life, manufacturers try to use bigger batteries but are limited because of
the weight and size. To provide users additional power when their devices are running low, many users
are learning to rely upon power banks, a portable energy source that can be carried in a pocket or
backpack. Power banks store energy in an internal Lithium Ion battery and can charge the mobile
devices.

In this article, we will discuss the basics of a power bank, various specifications and features and how it
can be implemented using a system-on-chip.

Figure-1 shows the various parts of a power bank. The power bank has a switch to turn on the output
and charge a mobile device. The status LEDs indicate the amount of charge left in the power bank and
also indicate charging/discharging operation. A Micro-USB connector is used to connect the charging
source to charge the internal battery. The power bank can either be connected to a PC/Laptop or to a
wall power source to charge the battery. A USB-A connector is used to connect the mobile device for
charging.




                                            Figure 1: Power Bank

Figure-2 shows the high level block diagram of the power bank. The main component of the power bank
is a Lithium Ion battery that stores energy to charge the mobile devices. The battery is first connected
to a battery protection circuit that continuously monitors the battery voltage and current and
disconnects the battery in case of various events like over charge, over discharge, over load and short
circuit.
Power Bank - Portable Battery Charger By: Ganesh Raja and Pushek Madaan
POWER BANK


                                                                                    STATUS LEDs
                                                                           VLOAD / ILOAD
                                SWITCH                  CONTROLLER
                                                                           ON/OFF
                                                     VBAT        IBAT

                    MicroUSB



                                CHARGING




                                                                                                  USB-A
 Wall power or                   CIRCUIT             BATTERY PROTECTION               BOOST
                                                                                                          Load
 Laptop USB                       BUCK                     CIRCUIT                  CONVERTER
                               CONVERTER




                                                    BATTERY




                                         Figure 2: Block diagram of Power Bank




The input voltage from the Micro-USB connector is fed to a charge controller. This usually is a buck
converter that converts the 5V input voltage into either a constant current or constant voltage to charge
the Lithium Ion battery.

The boost converter converts the battery voltage – which can range from 3.0V to 4.2V – to 5V which is
used to charge the external mobile devices.

A microcontroller performs control functions like turning on the boost converter when the switch is
pressed, measuring the battery voltage and controlling the LEDs to indicate state of charge and turn off
the boost converter when the external mobile device stops drawing current.

Now let us take a look at each of these blocks.

Charge Controller

The charge controller implements the charging algorithm to charge the internal Lithium Ion battery. It is
usually based on a buck converter topology.

The charging process passes through several stages to ensure battery is charged to its full capacity; but
at the same time the battery is charged safely. During these stages, the battery has to be charged using
either a Constant Current (CC mode) or a Constant Voltage (CV mode). Figure-3 shows the various stages
involved in charging a Lithium Ion battery.
Figure 3: CC-CV battery charging profile




Battery Protection Circuit

Lithium ion batteries are extremely hazardous if not handled properly. When the voltage of the battery
is allowed to rise beyond 4.2V, the battery gets hot. There have been numerous incidents where lithium
ion batteries have caught fire because of poor protection logic. Thus, from safety point of view, battery
protection becomes extremely important. The battery protection circuit implements some or all of the
following protections.

   Over charge protection – Disables charging when battery voltage goes above a safe threshold
   Over discharge protection – Disables discharging when battery voltages goes below a threshold
   Short circuit protection – Disables discharging if a short circuit is detected
   Temperature protection – Disables charging and discharging if the battery temperature goes above
    or below pre-determined thresholds.


Boost Converter

Lithium ion battery operating voltage typically ranges between 3.0V to 4.2V and almost all of the mobile
phones available need 5V for the charging. The boost converter steps up the 3.0V to 4.2V battery
voltage to 5V required to charge the mobile devices.

Controller

The controller in a typical power bank performs basic house-keeping tasks. Some of the tasks performed
by controller in a power bank are as follows:

   Detect if the switch has been pressed and enable output of the boost converter.
   Measure the current drawn by the load and turn off the boost converter when the load stops
    drawing current.
   Measure the battery voltage and drive the status LEDs to display battery level during charging and
    discharging.

In the following section, we’ll have a look at how to implement power bank using SoC (System On Chip)
but before getting into details of implementation, let us have a quick look of some of the advantages
offered by SoCs over conventional microcontrollers.

SoCs enable integration by providing peripherals like PWMs, Timers, ADCs, Comparators, Amplifiers and
many more all within one device. One such very popular SoC available is the PSoC 1 from Cypress
Semiconductors. This device provides configurable digital and analog blocks which can be used to
implement most of the digital and analog functionalities. Using such SoCs, design of a complicated
system like power bank becomes extremely simple. These SoCs can integrate all the smart functions
within the controller, leaving only discrete components like MOSFETs, Inductors, Diodes and Capacitors
off the chip, thus giving high control over system performance and BOM reduction. We’ll now have a
look at detailed implementation of each block discussed in the previous part.

SoC Implementation

Charger

As discussed in the earlier section, a charger should implement both constant current (CC) and constant
voltage (CV) control. To implement the Li-Ion charging profile, following functional blocks are required.

    1. A switching regulator that can control either the output current or output voltage

    2. Battery parameter (Voltage, current, temperature) measuring circuit

    3. Charging algorithm (for implementing CC-CV profile)

This is shown in block diagram below (figure-4):

                                  Switching
                                  Regulator
                        Supply                              charging current



                                                                   +


                                  Charging      Battery            T
                                  Algorithm    parameter
                                              measurement
                                                                    -


                                                                        Battery Pack




                           Figure 4: Block diagram of a Li-ion battery charger
Figure-5 shows the switching regulator implemented using a buck converter topology. The buck
converter is formed by the MOSFET T, Inductor L, Diode D and Capacitor C. R1 and R2 form a potential
divider to measure the battery voltage and RS is the shunt that is used to measure the battery current.
The output of the switching regulator is controlled by the duty cycle of the PWM. To implement
constant current output, the PWM duty cycle is controlled based on the current measured through RS.
To implement constant voltage control, the PWM duty cycle is controlled based on the voltage
measured through R1 and R2.

                                                    L

                              VSupply   T

                                                                            R1
                                                                 Li-Ion
                                                                 Battery
                   PWM
                         Gate Driver
                                                                                       Voltage
                                                                            R2
                                                                                      Feedback
                                               D             C


                                                                            Current
                                                                      Rs
                                                                           Feedback




                                 Figure 5: Switching buck regulator topology



Battery parameters measurement circuit: Figure-6 shows the circuit to measure all the battery
parameters viz., voltage, current and temperature. R1 and R2 provide the battery voltage and RS
provides the battery current. The battery temperature is measured using a thermistor RT. Rref and RT
form a potential divider. With Rref being constant, the value of RT can be calculated by measuring the
voltage from this potential divider. Once the value of RT is calculated, the temperature can be easily
calculated either by using a lookup table method, or by using Steinhart-Hart method.

Each of these signals requires a different gain. SoC’s being flexible, make it possible to change the gain
of the amplifier during run time.

Once the battery voltage, current and temperature are measured, the CPU implements the charging
algorithm to either control the output current or output voltage of the switching regulator by controlling
the duty cycle of the PWM.
Current control circuit
                VSupply




                                                              SoC
                      PWM
                                                                                             R1
                                                                       Voltage                     Li-Ion
                                                                                                   Battery
                                                                       Temperature
                          CPU      ADC        PGA                                            R2
                                                                     Vbias

                                                Vss
                                                                                 Rref   RT
                                                                       Current
                                                                                                  Rs




                                Figure 6: Measurement using single ended ADC



Charging algorithm:

The CPU implements the charging algorithm by reading the battery voltage, current and temperature
and implements the following charging profile:

    1. During main charging, the CPU measures the battery current and adjusts the PWM duty cycle to
       keep the current constant. At the same time, the CPU monitors the battery voltage to
       determine if the battery has reached the full charge threshold.

    2. Once the battery reaches the full charge threshold, the CPU measures the battery voltage and
       adjusts the PWM duty cycle to keep the battery voltage constant. At the same time, the CPU
       monitors the battery current and terminates the charging when the current goes below the
       termination current threshold.

The constant voltage or constant current control can be implemented using any of the digital control
methods like P, PI or PID, depending on the system requirements and the available CPU bandwidth.

ADC and PWM parameters: Some of the parameters that need to be considered during the design are
the ADC resolution, ADC accuracy and PWM resolution.

ADC resolution defines how precisely you can measure the feedback signals. This in turn will have an
impact on the ripple on the battery current and battery voltage.

ADC accuracy defines how accurately you measure the feedback signals. For Li-Ion batteries, the battery
voltage measurement is very critical. The maximum tolerance allowed for the full charge threshold is
4.2V + 50mV. This will require an ADC accuracy of at least 0.5%.
PWM resolution defines how precisely you can control the output voltage or current and this also
affects the ripple on the output voltage or current. Higher the resolution, lower the ripple. However,
there is a limit to how high the PWM resolution can be. Higher the resolution, lower is the output
frequency of the PWM which results in bigger inductors and capacitors. As power banks get more and
more compact, size is an important design issue. So, a tradeoff has to be made between the size and
PWM resolution.

Charging Source Detection

Auto detection of charging source – It is possible to charge the internal Lithium ion battery of the power
bank through various sources like PC / Laptop or wall powered adaptors. Before we dive further on
this, let us have a look at various charging sources as defined in Battery Charging Specifications BC1.2

SDP (Standard Downstream Port): This is the regular USB port present in desktop PCs and laptops. It
can provide a maximum current of 500mA with enumeration and 100mA without enumeration. If a
device tries to draw more than 500mA of current, this could lead to BSoD(Blue Screen of Death) or port
failure.

CDP (Charging Downstream Port): This is a special USB port present in some PCs. This USB port can
provide a current of upto 1.5A to peripherals.

DCP (Dedicated Charging Port): This is an USB port meant only for charging and does not perform any
communication functions. This port can supply upto 1.5A of current to a charging device.

It is important to distinguish between the type of charging source the power bank has been connected
and draw the appropriate power. BC1.2 spec defines a method to detect the type of charging source
(SDP, DCP or CDP) that the power bank is connected to.

   I.   Primary Detection: Connect 0.6V on D+ line and measure signal on D- line. If signal on D- line is
        less than 0.4V, then we are connected to SDP. If the signal is greater than 0.4V then we are
        connected to either CDP or DCP and we need to perform secondary detection to determine
        between CDP or DCP.
  II.   Secondary Detection: Connect 0.6V on D- line and measure signal on D+ line, if signal on D+ line
        is greater than 0.4V then it is DCP else it is CDP.

The above logic may be implemented using the DACs and the ADC in SoCs. Figure-7 provides the block
diagram for charging source detection. Two DACs are used to generate the 0.6V bias for the D+ and D-
lines and the voltage on the other line is measured by the ADC. Once the type of charging source is
detected, the maximum charging current drawn by the charger section can be set.
VSupply                        DAC D-                        SoC


                      VBus                          DAC D+
                      D-
                      D+
                      Gnd
                                                      PGA             ADC         CPU




                                      Figure 7: Charging source detection



Boost Converter

The Boost Converter converts the battery voltage to a constant 5V output to charge the external mobile
device. As the efficiency of the boost converter is required to be >85% under full load condition, a
synchronous boost converter is preferred in power banks. Figure-8 shows a synchronous boost
topology. A brief description of the boost converter is given below.

                                 L
                                                             D


                                                            T2
                                                                                          R1
    Li-ion
                                                                                   Load
   Battery                                     T1                      C
                  PWM1
                             Gate Driver       PWM2
                                                        Gate Driver
        Rs1                                                                        Current       Voltage
                                                                            Rs2   Feedback
                                                                                           R2   Feedback




                               Figure 8: Synchronous boost converter topology

PWM1 and PWM2 are out of phase signals that drive the low side and high side MOSFETs of the boost
converter. When T1 is on, current flows through the inductor L1 and the inductor stores energy. When
T1 is turned off (and T2 is turned on), the current through the inductor collapses, which in turn produces
a back emf across the inductor. This back emf in series with the battery voltage presents a higher
voltage at the drain of T1. At this state, T2 is on and charges the capacitor with the higher voltage. By
controlling the duty cycle of T1, the amount of voltage delivered to the capacitor, and hence the output
voltage can be controlled. The CPU measures the output voltage through potential divider R1/R2 and
adjusts the duty cycle of the PWM to regulate the output voltage.
Boost Converter feedback control: Figure-9 shows the feedback control circuit for the boost converter.
The CPU measures both the voltage and load current of the boost converter. Output voltage is
measured through potential divider R1/R2. The CPU implements a PI or PID control loop and adjusts the
duty cycle of the PWM. The loop response of the control loop should be fast enough to prevent
overshoot or undershoot in the output when the load current changes.

                                            Synchronous Boost
               VBat                           Control Circuit




                                                          SoC
                  Dead Band
                    PWM
                                                                             R1
                                                                   Voltage
                                                                                       Load

                      CPU       ADC           PGA                            R2

                                                                   Current
                                               Vss


                                                                                  Rs




                                      Figure 9: Boost network circuit

The CPU also measures the load current from RS to implement overload cutoff and to stop the boost
converter when the external mobile device is fully charged and stops drawing current from the boost
converter.



Battery Protection

As discussed earlier, power bank application needs protection for various parameters like over charge,
over discharge, short circuit and temperature protection.

SoCs can easily implement all of the above battery protections, as the CPU measures the battery voltage
and current during the charging and discharging. However, power bank manufacturers prefer to use
dedicated battery protection circuits outside the CPU. This is to ensure that battery is always protected
even if the CPU has failed for some reason. This provides two levels of protection in power banks that
use SoCs.

As mentioned earlier, PSoC 1 is a very popular SoC which provides high integration through configurable
digital and analog resources. Figure-10 shows the block diagram of the power bank design implemented
using CY8C24423A device from PSoC 1 family.
Buck Converter circuit                                         Boost Converter circuit


                                                                                                                                           LOAD




                                                                                                                   VLOAD

                                                                                                                            ILOAD
                                                   VBAT
                                                                                                           BOOST PWM P




                                                          IBAT
                                 BUCK PWM
                                                                                             BOOST PWM N




                                                                 MUX
                                                                                                     BUCK                           Dead Band
                                                                                                     PWM                              PWM
               VSupply                                           PGA


        VBus
        D-                                         VBAT SENSE
        D+                                         VLOAD SENSE

                                                                          MUX
                                                                                    10 BIT
    Gnd                                            TEMPERATURE                                                                                    TO
                                                                                   SAR ADC
  USB                                                                                                                                             STATUS
                                                                                                                                                  LEDS


                                                                                                                   M8C
                                                                   D-




                                                                                DAC D-


                                                                  VREF
                                                                   D+




                                                                                DAC D-


                                            RREF
                                                                   Vref




                                                                                                                            PSoC
                                                                                               Vss                          CY8C24423A
                     THERMISTOR




                         Figure 10: Block diagram of Power Bank using integrated approach

Conclusion

Following table summarizes the advantages of implementing a power bank solution using a SoC
compared to conventional solutions based on discrete devices.

                               System on Chip (SoC) solution                                                               Conventional solution
Charging source                Integrated – automatically detects the                                                      Not available. Fixed charging
detection                      charging source and configures the                                                          current.
                               charging current.
Charging current               Configurable                                                                                Fixed
Boost regulator                Scalable to different output ratings.                                                       Fixed. For changing the output
Output Power                   Requires change to only the external                                                        power, the complete switching
                               switching components.                                                                       regulator circuit has to be changed
Battery protection             Two levels of protection- SoC + Battery                                                     Battery protection IC
                               protection IC
Auto-load                      Auto detects the load and enables the                                                       Not available
detection                      output.
Stand by current               < 60uA – AFE is integrated, thus during                                                     200uA (typical)
(System current)               sleep AFE can be disabled and even lower
                               current consumption can be achieved.
You can also read
Next part ... Cancel