SLUAAL4 August   2022 BQ21040

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
  4. 2How Temperature Sensing Works on the BQ21040
    1. 2.1 With Adapter Present
    2. 2.2 Without Adapter Present
  5. 3Example Application
    1. 3.1 Required Devices
    2. 3.2 Setup
  6. 4Procedure
    1. 4.1 Detecting Adapter Removal
    2. 4.2 Detecting Adapter Insertion
    3. 4.3 Logical Flowchart
  7. 5Summary
  8. 6References

Detecting Adapter Removal

As the 50 uA bias from the TS pin turns off upon adapter removal causing the voltage across the NTC to drop to zero, one pin from the MCU can be used to monitor voltage across the NTC and determine if an adapter is connected. When an adapter is connected and the TS pin is supplying 50 uA, the voltage drop across the thermistor will be non zero. The exact value is dependent on the thermistor being used and it’s temperature. For example, assume that the voltage drop of the thermistor is 0.02 V at its max temperature. If the voltage reading across the NTC is ever below 0.02 V it can be assumed that either the temperature has exceeded the max temp supported by that NTC or that the 50uA bias from TS has stopped due to an adapter removal. The adapter removal condition will cause the change in voltage to be near instantaneous so a simple algorithm can be written to the MCU to check for a large jump in VTS.

Once the voltage across the thermistor (VTS) has dropped below this threshold and the 50uA from TS has stopped, the output pin from the MCU will then be used to supply 50 uA. The VTS GPIO pin from the MCU will continue measuring VTS. This 50 uA from the MCU can be constant or in pulses. For example, a pulse of 100 ms may be used, just ensure that the voltage measurement is taking place during that 100ms window. Also, if using pulses, ensure that the device is not configured such that the TS pin is being used to disable charge when pulled low.

Once a voltage measurement has been made across TS, the MCU needs to then use ohm’s law to derive the resistance of the NTC and correlate that resistance to a temperature.