Skip to content

Instantly share code, notes, and snippets.

@somebox
Created June 28, 2025 10:38
Show Gist options
  • Save somebox/b6cd88731a4b4acb6d2a2f2a00b18c7f to your computer and use it in GitHub Desktop.
Save somebox/b6cd88731a4b4acb6d2a2f2a00b18c7f to your computer and use it in GitHub Desktop.
BQ25895 Supplemental Community guide

This is a supplemental reference guide for the bq25895, focused on practical advice, common problems, and information that goes beyond the core datasheet. It was created by summarizing forum and article posts and processed with a Gemini 2.5 pro documentation workflow.


bq25895 Supplemental Community Guide

For Circuit Designers and Firmware Engineers

A Note on This Guide

This document is intended as a companion to the official Texas Instruments datasheet, not a replacement. The datasheet provides the fundamental specifications and operational principles. This guide consolidates community knowledge, best practices, and lessons learned from real-world implementations to help you avoid common pitfalls and accelerate your design process.


1. The Golden Rules: Preventing 90% of Problems

Experience shows that a few key design choices are responsible for the majority of issues encountered. Follow these rules religiously.

  1. Ground the OTG Pin if Unused. This is the most critical rule. The OTG_CONFIG register bit defaults to 1 (enabled). If the OTG pin is left floating, it can drift high, causing the IC to unintentionally enter boost mode when VBUS is removed. This is a primary cause of unexpected system blackouts, as a fault in boost mode (like a temporary NTC fault) can cause the BATFET to turn off, cutting all power to the system. If you do not need OTG functionality, connect the OTG pin directly to ground.
  2. The PMID Capacitor is Mandatory. The PMID pin requires capacitance for stability, even if you never use OTG mode. In charging mode, it is the input to the buck converter. A missing PMID capacitor will lead to instability. Use a minimum of 8.2µF for standard operation; use 40µF-60µF if OTG will be used.
  3. Prioritize PCB Layout. This is a high-frequency (1.5 MHz) switching converter. A poor layout is a guaranteed source of EMI, thermal issues, and instability. Follow the datasheet's layout example, paying special attention to the high-frequency current loop (PMID -> SW -> Inductor -> SYS/BAT -> PGND). Use a solid ground plane, multiple thermal vias under the PowerPAD, and keep critical components close to the IC.
  4. Manage the Watchdog Timer. By default, if the I2C watchdog timer is not reset by the host, it will expire and reset most registers to their default values. This can undo your entire configuration, re-enabling OTG and changing current limits. For initial bring-up and systems without constant host intervention, disable the watchdog timer by setting REG07[5:4] = 00.

2. Hardware & Layout Best Practices (Beyond the Basics)

  • Thermal Management is Key to Performance: The bq25895 will reduce charge current (thermal regulation) if its junction temperature hits 120°C. To achieve the advertised 5A charge current, you must provide excellent heat sinking.
    • Use numerous thermal vias (e.g., 3x3 or 4x4 array) directly under the IC's thermal pad, connecting to a large, unbroken internal or bottom-side ground plane.
    • A 4-layer PCB with 2oz copper is highly recommended for applications pushing >3A continuously.
  • Component Selection Matters:
    • Inductor: Use a shielded inductor to minimize EMI. Pay close attention to the saturation current (I_sat) rating. For high charge currents, an inductor with a low DCR and an I_sat rating well above your max current is crucial. Inductor saturation is a common cause of instability at high currents.
    • BTST Capacitor: The recommended value is 47nF. Using a significantly different value can negatively impact efficiency and switching stability, especially during VBUS removal transients.
  • EMI Mitigation:
    • To reduce high-frequency noise, small 1nF capacitors can be placed very close to the PMID, SYS, and VBUS pins.
    • A small resistor (1-10Ω) in series with the BTST capacitor can slow the switching slew rate, reducing EMI at a slight cost to efficiency.
    • For stubborn EMI, an RC snubber network across the SW node and ground can be effective.

3. Common Pitfalls & Troubleshooting

This section is organized by symptom to help you quickly diagnose problems.

Symptom: System powers off (blackout) when VBUS is unplugged.

  • Most Likely Cause: Unintentional entry into boost mode followed by a fault.
  • Diagnosis:
    1. Is your OTG pin floating? If so, this is almost certainly the cause.
    2. Check if your watchdog timer is enabled but not being serviced, causing the OTG_CONFIG bit to reset to its 1 (enabled) default.
  • Solution:
    1. Ground the OTG pin.
    2. In your initialization code, disable the watchdog timer (REG07[5:4] = 00) and explicitly disable OTG (REG03[5] = 0) for maximum safety.

Symptom: The charger won't start charging or stops charging unexpectedly.

  • Likely Causes & Solutions:
    1. Check Faults First: Read the fault registers REG0B and REG0C. An NTC fault (TS Cold/TS Hot) is the most common reason. Ensure your thermistor circuit is correct and the TS pin voltage is within the valid window.
    2. Check BATFET_DIS: Read REG09[5]. If this bit is 1, the BATFET is forced off, and charging is impossible. This bit can be set autonomously by the IC due to an overcurrent fault or a fault during boost mode.
    3. Check /CE Pin: This pin must be actively pulled low to enable charging.
    4. System Load is Too High: The IC prioritizes the system load. If the load on VSYS is consuming all available power from VBUS (as set by IINLIM), there will be no current left to charge the battery.
    5. VINDPM Regulation: If the input voltage is sagging due to a weak adapter or long cable, the IC will reduce charge current to maintain VBUS voltage. Check the VDPM_STAT bit.

Symptom: VSYS voltage dips or collapses when plugging in VBUS.

  • Likely Cause: This is a characteristic of the NVDC architecture during the transition. The system may briefly attempt to draw a large inrush current.
  • Solution:
    1. Ensure adequate capacitance on VSYS (at least 20µF, consider up to 40µF).
    2. If the issue persists, especially in a no-battery scenario, try disabling charging (/CE=HIGH or REG03[4]=0) before the adapter is fully detected.

Symptom: OTG (Boost Mode) output collapses under load.

  • Likely Causes & Solutions:
    1. Weak Battery: The boost converter requires the battery voltage to stay above the VOTG_BAT threshold (~3.0V) under load. A battery with high internal resistance may sag below this threshold, causing the boost to shut down.
    2. Poor Layout: High-resistance traces between the battery and the VBAT pin will cause a significant voltage drop under load, mimicking a weak battery. Keep these traces short and wide.
    3. Insufficient PMID Capacitance: Transient loads require sufficient bulk capacitance on PMID to maintain stability. Use at least 40µF-60µF.
    4. Check BOOST_FAULT: Monitor REG0C[6] to see if a boost fault is being triggered.

4. Understanding Nuances & Limitations

These are behaviors that are by-design but may be counter-intuitive.

  • OTG Transition Delay: There is a ~30-40ms delay when switching from VBUS power to OTG boost mode. During this time, the PMID voltage will drop significantly. This is a known characteristic and can cause sensitive loads on PMID to reboot. This cannot be eliminated through configuration.
  • No-Battery Startup Current Limit: The datasheet states "Instant-on Works with No Battery," which is true. However, it fails to highlight that when VSYS is below ~2.2V, the input current is limited to ~200mA. If your system's startup load is higher than this, it will fail to power on. Your system must be designed to have a low initial current draw until VSYS is stable.
  • ADC is NOT a Fuel Gauge:
    • The ADC's charge current measurement (REG12) has a resolution of 50mA and is often inaccurate or reads zero for actual currents below ~150mA.
    • The ADC does not measure battery discharge current.
    • For accurate battery state-of-charge, an external fuel gauge IC (e.g., bq27xxx series) is required.
  • Input Current is AVERAGE, Not Peak: The 3.25A input current limit is the average current. The peak switching current will be higher. This is important for selecting input capacitors and understanding EMI.

5. I2C Communication Quirks

  • Reading Faults from REG0C: The fault register REG0C is latched. To get the current real-time fault status, you must read it twice. The first read returns the latched fault status since the last read, and the second read returns the live status. Also, REG0C does not support multi-byte reads.
  • SCL Pin is an Input Only: The bq25895 cannot perform I2C clock stretching. If you observe the SCL line being held low, it is being done by the host MCU or another device on the bus, not the charger.

6. Integration with Other Components

  • USB-C & Power Delivery (PD): The bq25895 does not have a built-in USB-C/PD controller. To properly negotiate power from a USB-C source, you need an external Port Controller IC (e.g., TPS25750). The controller will negotiate the power contract and the host MCU can then configure the bq25895's input current/voltage limits accordingly via I2C.
  • Solar Power (MPPT): The VINDPM feature can be used to implement a basic Maximum Power Point Tracking (MPPT) algorithm. The host MCU must periodically adjust the VINDPM threshold via I2C to find the "knee" of the solar panel's I-V curve, preventing the panel's voltage from collapsing while maximizing power transfer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment