Using the HT45FH5N in Type-C Quick Charge Power Bank ... Using the HT45FH5N in Type-C Quick Charge...

Click here to load reader

  • date post

    23-Jan-2021
  • Category

    Documents

  • view

    0
  • download

    0

Embed Size (px)

Transcript of Using the HT45FH5N in Type-C Quick Charge Power Bank ... Using the HT45FH5N in Type-C Quick Charge...

  • AN0456E V1.00 1 / 15 April 25, 2017

    Using the HT45FH5N in Type-C Quick Charge Power Bank Applications

    Using the HT45FH5N in Type-C Quick Charge Power Bank Applications

    D/N: AN0456E

    Instruction Quick charge technology now exists as a mature technology resulting in huge improvements

    to mobile phone charging speeds. The Type-C interface provides a bidirectional power supply

    function, which allows power bank applications to charge or discharge via a single port.

    Additionally, quick charge technology has an improved effect on the charging/discharging

    current. Holtek’s special purpose power bank management ICs provide solutions for all of

    these functions. This text will initially introduce the power bank charge and discharge

    principles after which it will explain the control flowchart for each process, allowing users to

    have a deeper understanding of Holtek’s power bank management ICs.

    Functional Description

    Power Bank Charge Functional Description

    USB interfaces all require a 5V operating voltage However Lithium batteries, which are

    the usual type of battery used in power banks, have a voltage of 3.7V, a buck converter is

    required to implement the voltage reduction when using external USB power sources to

    charge the power bank battery. This voltage conversion buck converter management is

    implemented using the device’s integrated PWM function. The integrated OUVP and

    OCP functions within the device also provide further over/under voltage protection and

    over current protection during the charging process. There are three charging control

    modes, trickle current charge mode, constant current charge mode and constant voltage

    charge mode. The required charging voltages and currents for these modes differ

    according to different user designs. These charging modes are described below.

    Trickle Current Charging Mode: used for completely discharged batteries which have a

    voltage of less than 3V. In this mode the battery will be pre-charged using a typical

    0.1C(Note) constant trickle current during this first stage of charging.

    Constant Current Charging Mode: when the battery voltage is greater than 3V, the charging

    current will then switch to a typical 1C(Note) constant current during this second charging

    stage.

  • AN0456E V1.00 2 / 15 April 25, 2017

    Using the HT45FH5N in Type-C Quick Charge Power Bank Applications

    Constant Voltage Charging Mode: once the battery voltage has exceeded 4.1V, it will be

    charged using a constant voltage during this third stage. The charge current decreases

    gradually as the constant voltage charge time increases. Typically, the constant voltage

    charge stage is completed when the charge current reduces to a value of less than 0.1C.

    Note: taking a 1000mAh Li-battery as an example, a value of 0.1C means charging the battery

    using a 100mA current and 1C means charging the battery using a 1000mA current.

    Power Bank Discharge Functional Description

    The power bank system includes a detection circuit to identify whether any external

    devices such as a mobile phone is inserted or not. As the power bank USB interface

    output voltage is 5V but as the Li-battery voltage is only 3.7V, a voltage boost conversion

    process is required to implement the discharge process. This voltage boost conversion

    management is implemented using the device’s integrated PWM function. The integrated

    OCP function also provides over current protection for this process. There are two

    discharge control modes, constant voltage discharge mode and constant current

    discharge mode, which will be described below.

    Constant Voltage Discharge Mode: the internal PWM function is used to control the

    voltage boost circuit to ensure a constant 5V output. In this stage, current detection is

    implemented to monitor the present discharge status. If the output current is too small, the

    system will conclude that the mobile phone or other connected device has been removed

    and will consequently switch off the power bank. If the output current is too large, the

    system will switch to the constant current discharge mode to avoid any current overload

    conditions.

    Constant Current Discharge Mode: when the output current is too large, the system will

    maintain a constant current output to avoid overload conditions. In this stage, current

    monitoring is continued. Under normal conditions, the mobile phone or other connected

    device will conclude that the current is fixed and will not further increase the loading.

    However, if under abnormal conditions the mobile phone or other connected device

    continues to increase the load resulting in a large current output, this will be detected by

    the power bank system resulting in the corresponding protection function being

    implemented.

    Power Bank QC and MTK Discharge Functional Description

    During discharging, the power bank will implement a quick charge recognition operation

    on the connected device. If the connected device contains a quick charge function, the

    power bank will supply a corresponding voltage output of 5V~12V according to the

    device’s requirement.

  • AN0456E V1.00 3 / 15 April 25, 2017

    Using the HT45FH5N in Type-C Quick Charge Power Bank Applications

    Hardware Block Diagram

    HT45FH5N Type-C Quick Charge Power Bank Hardware Block Diagram

    1. As the Type-C IN/OUT interface and the USB IN/OUT interface both operate at 5V

    but as the power bank battery voltage is 3.7V, a voltage conversion operation is

    required. Management of this voltage conversion is implemented using an MCU

    together with an output complementary PWM circuit to control the PMOS+NMOS

    power transistors and inductor components to form the charging buck and

    discharging voltage boost conversion circuit.

    2. Regarding the internal OUVP circuit, during normal operations the OUVP pin input

    voltage is sampled by the ADC and controlled by the charge buck control management

    system. When an over/under voltage situation occurs, the MCU will respond

    immediately to disable the PWM outputs to protect the battery.

    3. Regarding the internal OCP circuit, during normal operations the sensor current is

    input via the corresponding OCP pin, amplified by an OPA and then sampled by the

    ADC. When an over current situation occurs, the MCU will respond immediately to

    disable the PWM output to protect the battery.

    4. Battery Voltage Detection: during charging, the charge mode will be determined to be

    either a trickle current, constant current or constant voltage mode, according to the

    present battery voltage condition. During discharging, the remaining battery capacity

    will be determined and discharging will cease if the power level is too low.

    5. LEDs and Buttons: use a button as the power bank on/off control and use four LEDs

    to display the present battery capacity level, 25, 50, 75 or 100%.

  • AN0456E V1.00 4 / 15 April 25, 2017

    Using the HT45FH5N in Type-C Quick Charge Power Bank Applications

    Hardware Circuit

    HT45FH5N Type-C Quick Charge Power Bank Circuit

    MCU Operating Conditions  Sleep status: VDD =3.0V~4.2V, Work status: VDD=5V

     Oscillator: 8MHz

     Low Voltage Reset: 2.55V

     Watchdog Timer timeout: 500ms

    Software Description  Program Memory: 4K×16 -- uses 3201×16, usage: 78%

     Data Memory: 256×8 -- uses 122×8, usage: 47%

     ADC: used for voltage and current sampling during charging/discharging

     PWM: used to control boost and buck circuits during charging/discharging

     PWM ADJ: PWM duty auto adjustment by the hardware during discharging

  • AN0456E V1.00 5 / 15 April 25, 2017

    Using the HT45FH5N in Type-C Quick Charge Power Bank Applications

     Timer: use the STM as a Timer Counter to generate an interrupt every 4ms and set a

    variable to increment by one each time an interrupt is generated.

    4ms: update the LED power capacity display

    8ms: set the D_stateCheck_f flag for QC discharge recognition

    8ms: set the Check_Mtk_f flag for MTK discharge recognition

    8ms: set the TYPEC_Check_f flag for Type-C recognition

    8ms: set the Check_Vin_f flag for input voltage monitoring

    8ms: set the Det_Out_f flag for load detection

    8ms: set the Det_Cap_f flag for battery capacity detection

    1s: set the Usb2_in_Time flag for QC discharge recognition

    500ms: Type-C detection count flag

    Software Main Flowchart Description

    HT45FH5N Type-C Quick Charge Power Bank Software Main Flowchart

  • AN0456E V1.00 6 / 15 April 25, 2017

    Using the HT45FH5N in Type-C Quick Charge Power Bank Applications

    1. Initialisation: RAM clear, pin function initialisation, WDT setup, OUVP calibration.

    2. Sleep flag judgement: when the Sleep_f flag is set, operations such as stopping the

    PWM function, turning off the charge/discharge port, configuring the pin function and

    clearing the Data Memory will be implemented before entering the sleep mode. If the