SLUAA04A june   2020  – may 2023 BQ25150 , BQ25155 , BQ25618 , BQ25619 , TS5A12301E , TS5A3157 , TS5A3159A , TS5A6542

 

  1.   1
  2.   High-Efficiency Charging for TWS Using a 2-Pin Interface
  3.   Trademarks
  4. Introduction
  5. System Overview
    1. 2.1 Charging Case
      1. 2.1.1 BQ25619
      2. 2.1.2 TLV62568P
      3. 2.1.3 TPS22910A
      4. 2.1.4 TS5A12301E
      5. 2.1.5 MCU
    2. 2.2 Earbuds
      1. 2.2.1 BQ25155
      2. 2.2.2 TPS22910A
      3. 2.2.3 TS5A12301E
      4. 2.2.4 BT/SOC
  6. Charging Case Algorithm Implementation
    1. 3.1 Initialization and Main Code
    2. 3.2 UART Interrupt and Output Voltage Adjustment
  7. Earbud Algorithm Implementation
    1. 4.1 Initialization and Main Code
    2. 4.2 Interrupt and Transmission
  8. Test Procedure
  9. Test Results
    1. 6.1 Dynamic Voltage Adjustment
    2. 6.2 BQ25619 with 4.6-V Output
    3. 6.3 Standard Boost with 5V Output
  10. Summary
  11. Schematics
  12. PCB Layout
  13. 10Software
    1. 10.1 Charging Case main.c
    2. 10.2 Earbuds main.c
  14. 11Revision History

Initialization and Main Code

For the communication implemented by this system the earbud acts as the slave. This prevents the earbud from entering communication mode while the case is in power mode. The earbud will only enter communication mode and transmit a message if it detects that the VIN_PGOOD_FLAG (register address 0x3) has been asserted and the internal ADC of the BQ25155 reads 0 V. This signals that the case has entered communication mode. Figure 4-1 is a flow chart of the earbud algorithm.

GUID-81F28E2F-F12D-4A10-932B-FEA2A008435B-low.svgFigure 4-1 Earbud Algorithm

The earbud is first initialized to meet the user’s system requirements. Settings here include the charge current of the BQ25155, ADC conversion rate, etc. After Initialization the interrupts for the system are enabled. At this point the system is ready to start a charging cycle when it is connected to the case.

The following two tables show the registers that have been modified.

Table 4-1 Earbud BQ25155 Registers
NameValuePurpose
ICHG_CTRL0x50Sets ICHG to 100 mA
CHARGERCTRL00x92Disable Watchdog Timer
ADCCTRL00x58Sets ADC to Continuous read at 3 mS per conversion
ADCCTRL10x00Disable Comparators
ADC_READ_EN0xFEEnable ADC read channels
Table 4-2 Case BQ25619 Registers
NameValuePurpose
REG01(Charger Control 0)0x3AEnable Boost Mode
REG05(Charger Control 1)0x8EDisable Watchdog timer
REG06(Charger Control 2)0xC6Set boost voltage to 4.6 V

After the system is initialized and connected to the case it will begin charging and wait to respond to communication cycles triggered by the case. While waiting on a communication cycle the earbud stores its battery voltage every .5 seconds. This must be done because when Vin goes to 0 to trigger a communication cycle the earbud battery voltage will sag slightly, taking a reading during this time will result in transmitting a voltage that is lower that charge voltage that is needed.

When case enters communication mode the input voltage will drop to 0 this will cause the BQ25155 to set a flag to indicate that Vin has dropped below an acceptable voltage and trigger an interrupt on its INT pin. This will trigger the ISR.