123 Main Street, New York, NY 10001

← Back to: Battery Charging / Gauging / Protection / BMS

Battery Black-Box Logger (Charging-Domain)

This page focuses on charging-domain black-box logging — capturing what happened during charging cycles (state transitions, thermal derating, current limiting, power-path arbitration), so service teams can read the last N events and decide whether the issue came from the battery, the adapter, the environment, or the user load.

Why do we need a dedicated logger if the charger IC already exposes status and fault bits? Because most charger ICs only tell you the current condition, not the history. A charging-domain black box keeps short, service-oriented records that answer “what actually happened during the last few charges?”.

It is not a SOC/SOH logger, not an eFuse/protection logger, and not a vehicle-level flight recorder. It only watches the charging path.

  • Not SOC log → state-of-charge evolution stays in the gauging line.
  • Not protection log → pack/open/short events stay in the protection line.
  • Charging-only → CC/CV/termination/power-path anomalies.

Typical placements:

  • Portable / wearable / medical devices that see changing adapters.
  • In-vehicle 12 V battery maintenance where cabinet temperature is high.
  • Small energy/storage modules that charge in hot racks.
  • Lab / small-batch validation where charger IC is being swapped.

Why service teams need it more than hardware? Hardware can often reproduce the fault on bench; field teams cannot. They need to read “the last N charging attempts” to know whether the fault was thermal, input-side, or load-induced.

Typical short-lived problems to capture:
entered CC then dropped after 2 s; entered CV but current stayed low because system pulled VSYS; JEITA derating triggered but user never noticed; USB-C/adapter unstable and restarted several times.
Charging-domain battery black-box logger overview Left: charging state machine (CC, CV, terminate, recharge, thermal regulation). Right: log buffer with timestamped entries. Charging state machine Attach / VBUS ready CC (constant current) CV (constant voltage) Terminate / Recharge Thermal Reg / JEITA Black-Box Log Buffer ts=10:32:05 · EVT=CC start I=1.8 A · T=41°C · src=IC ts=10:33:12 · EVT=Thermal derating=on · T=63°C ts=10:34:27 · EVT=Input limit V_in=4.65 V · I=1.0 A ts=10:40:02 · EVT=Terminate cycle=12 · ok=true
Figure: Charging-domain battery black-box logger — charging state machine on the left, timestamped service log on the right.

Charging Event Hooks to Log

Once we freeze the event set, implementation is just polling the charger, translating vendor-specific status bits into these normalized events, and committing them into a nonvolatile buffer. This chapter defines that event set.

Mandatory events (always log):

  • CHG_ATTACH — power/adapter/USB-C sink detected and accepted.
  • CHG_START_CC — charger entered constant current phase.
  • CHG_START_CV — charger transitioned to constant voltage.
  • CHG_TERMINATED — normal end-of-charge or termination current met.
  • CHG_RECHARGE — charger restarted after voltage drop.
  • CHG_ABORTED — watchdog, unstable VBUS, user-forced detach.

Conditional events (log if available in silicon / system):

  • THERMAL_REG — JEITA or internal thermal regulation was active.
  • INPUT_CURRENT_LIMIT — adapter or port could not deliver configured current.
  • POWER_PATH_PRIORITY — system rail took priority (VBAT ↔ VSYS arbitration).
  • SAFETY_TIMER_EXPIRED — safety timer or charge watchdog fired.
  • BATTERY_NOT_PRESENT / NTC_OPEN — battery missing or NTC disconnected.
Normalized log entry (minimum fields):
ts (tick or RTC), evt (one of the above), T (charger or external NTC), I_chg (actual or configured), V_in, V_bat, src (ic_reg / mcu_adc / ext_ntc). Do the normalization once at the MCU level, not at the service tool.
Charging events timeline written to logger Timeline from attach to recharge with thermal, input-limit and abort anomalies, all pushed into the log buffer. Attach CHG_ATTACH CC CHG_START_CC CV CHG_START_CV Terminate CHG_TERMINATED Recharge CHG_RECHARGE Log entries THERMAL_REG INPUT_CURRENT_LIMIT CHG_ABORTED ts=…, evt=CHG_ATTACH V_in=5.0 V · src=ic_reg ts=…, evt=THERMAL_REG T=63°C · src=ext_ntc ts=…, evt=INPUT_LIMIT I=1.0 A < 1.8 A cfg
Figure: Charging events and anomalies are normalized and pushed into a single log buffer, so different vendor chargers can still be diagnosed the same way.

Data Point Design: Cycles, Peak T/I, Anomaly Timestamps

Logging only event names is not enough. Service teams need to see how many times a charge was attempted, what the temperature/current peaked at, and when exactly an anomaly occurred. This section defines how to attach counts, peaks and timestamps to each charging event so field engineers can tell whether the board was always hot or just occasionally throttled.

Cycle definition. A charge can be:

  • full cycle: CC → CV → terminate completed, battery considered charged.
  • partial cycle: CC started but was interrupted by thermal/input drop/user detach/safety timer.

This distinction lets you see “5 attempts, 0 full” instead of just “5 charges”.

Peak temperature (T_peak). Always prefer the charger IC’s own thermal/derating indication. If unavailable, fall back to an external NTC read via MCU ADC. Store it as:

T_peak = 63°C @ ts=10:32:05 · src=charger_ic · jeita=45_60

When JEITA was the cause, record which band was active to show it was normal derating, not IC self-heating.

Peak current (I_peak).

  • IC supports actual charge current read-back → record actual.
  • IC does not support read-back → record configured value and a flag.
I_peak = 1.8A @ ts=10:32:01 · measured=1

I_peak = 1.5A · measured=0 · note=no_readback

Timestamp source. Without RTC, use MCU tick; with USB-C/PD, start from PD session time; during export, re-base ticks to real time on PC/app.

Storage-constrained mode: keep full-detail entries for the latest 10–32 charges; collapse older ones to “summary buckets” like >24h: thermal_reg ×3, input_limit ×1. This preserves patterns while staying inside small EEPROM/FRAM.
Log entry with cycle, peak T/I and anomaly timestamp A single charging-domain black-box record containing cycle number, peak temperature, peak charge current and an anomaly timestamp for serviceability. Cycle #12 type = full · attach→CC→CV→terminate T_peak = 63°C @ ts=10:32:05 src = charger_ic · jeita_band = 45_60 I_peak = 1.8A @ ts=10:32:01 measured = 1 · adapter_ok = true Anomaly = Thermal Reg ts=10:32:05 · V_in = 4.65 V · I_chg = 1.0 A export_hint: rebased_on=host_time; tick_unit=1s Why peaks? peaks show if throttling was thermal or input-side not just “now it looks OK”
Figure: Single-service entry showing cycle type, peak temperature, peak charge current and the exact anomaly timestamp — enough to explain “slow charge” after the fact.

Architecture and Implementation Options

This feature does not require a dedicated “logger IC”. It can be built today from an ordinary charger IC + a small MCU that polls status/fault registers + a piece of nonvolatile storage. Below are three common builds and how to choose among them.

Key questions to answer:

  • Can the charger’s own status registers survive power loss? (usually no)
  • What polling interval will guarantee we don’t miss short thermal/input-limit events?
  • Where should logs live — MCU internal flash, external EEPROM/FRAM, or system-level memory?
  • How will an upper BMS/host tool read these records — I²C, UART, USB-C, CAN/LIN?

Architecture A — Charger IC + MCU polling + MCU flash (lowest BOM)

  • MCU polls charger status/fault every X ms/s.
  • On change → normalize event → write to internal flash.
  • Do basic wear leveling.
  • Best for dev boards, portable devices, small batches.

Architecture B — Charger IC + MCU + external EEPROM/FRAM (recommended)

  • Logs survive power loss.
  • 32–128 full records possible.
  • Service teams can read storage directly.
  • Cost slightly higher but predictable for small-batch runs.

Architecture C — System-level PMIC / BMS MCU logger

  • For multi-charger / power-path / dual-battery systems.
  • Unified timestamp source (RTC / host / CAN time).
  • Can log “charging slowed because system took power”.
  • Can expose logs via CAN/LIN/UART/USB-C.
Safe write pattern: write-temp → verify → mark-committed. Add a log format version (log_ver=1.0) so firmware upgrades don’t break the service tool.
Charging-domain logger architecture Charger IC feeds events and measurements into an MCU; MCU writes normalized logs into external EEPROM/FRAM and exposes them to a service tool or host. Charger IC VBUS / USB-C / adapter status / fault / JEITA VBUS / IN Battery NTC MCU (poll + normalize) poll charger status / fault translate to CHG_ATTACH, THERMAL_REG… add cycle_id, T/I peaks, timestamps commit to NVM (safe write) EEPROM / FRAM 32–128 entries, survives power log_ver = 1.0 Service Tool / Host I²C / UART / USB-C / CAN export + rebasing timestamps Timestamp sources • MCU tick (simple) • RTC / host sync (rigorous) • PD session time (USB-C/PD) always log ts_src=…
Figure: Charger IC feeds events, MCU polls and normalizes them, external EEPROM/FRAM keeps them across power loss, and a service tool or BMS host can pull the history.

Vendor-to-Logger Mapping (TI / ST / NXP / Renesas / onsemi / Microchip / Melexis)

The goal is to keep your charging-domain black-box logger usable even when the front-end charger IC changes. We do this by classifying each vendor into direct status, MCU compose, or sensor assist, and then telling the MCU to export the same logger fields regardless of which IC was used.

Direct status (IC gives enough info)

IC itself exposes charge state, faults, thermal or input-limit flags.

  • TI — bq25600C, bq25895, bq24195, bq24192 (charger + power-path, good fault/status)
  • ST — STBC03, STNS01, L6924U (status pins + I²C config)
  • Renesas — ISL9241, RAA489118 (SMBus/NVDC, well structured)

MCU compose (MCU must assemble events)

IC provides only “I am charging / I am limited” signals, MCU adds cycle_id, T/I peaks, and timestamps.

  • NXP — PCA9422, PMIC-with-charger designs (data goes to main MCU)
  • onsemi — NCP1850, FAN54120 (industrial/automotive, needs MCU to normalize)
  • Microchip — MCP73831/2, MCP73871 (simple chargers, log sits in MCU/EEPROM)

Sensor assist (T feed-in)

Melexis devices add real temperature so the log can say “thermal derating at 63°C” instead of just “thermal”.

  • MLX90614 (contactless T)
  • MLX90632 (compact, high-accuracy)
  • Optionally: other MLX sensors as diagnostic channels
MCU translation rule:
TI.bq25600C.CHG_DONE → CHG_TERMINATED ST.STBC03.THRM → THERMAL_REG onsemi.NCP1850.VBUS_DROP → INPUT_CURRENT_LIMIT
Export always as: log_ver, ts, ts_src, evt, cycle_type, T_peak, I_peak, V_in, V_bat, src_ic
Charging-domain logger vendor mapping Horizontal mapping of TI, ST, NXP, Renesas, onsemi, Microchip and Melexis to direct-status, MCU-compose or sensor-assist roles. Vendor mapping for charging-domain black-box logger Direct status IC already exposes charge state / faults MCU compose MCU polls IC, normalizes events & cycles Sensor assist Add real T into log for serviceability TI — bq25600C / bq25895 / bq24195 ST — STBC03 / STNS01 / L6924U Renesas — ISL9241 / RAA489118 NXP — PCA9422 + main MCU onsemi — NCP1850 / FAN54120 Microchip — MCP73831 / MCP73871 MCU adds: cycle_id, T_peak, I_peak, ts, src_ic Melexis — MLX90614 Melexis — MLX90632 feeds real T → log can say “63°C @ ts”
Figure: Vendor mapping — TI, ST and Renesas can often be logged directly; NXP, onsemi and Microchip normally need MCU to compose the events; Melexis strengthens the temperature field.

Small-Batch Procurement and Serviceability Strategy

This chapter is for small-batch buyers who will face substitutions. The main idea is: even if the charger IC is changed, the logger fields, version, and export format must stay the same. We write it in the BOM so purchasing will not downgrade the charger to “charge-only”.

BOM remark template (copy/paste):

Charger IC must support readable charge state + fault + thermal/derating indication.

Do NOT substitute with charge-only ICs without status reporting.

If substituted, vendor must provide logger field map compatible with Logger v1.0.

Logger NVM (EEPROM/FRAM) is part of functional BOM, not optional.

Preferred ICs (log-rich):

  • TI — bq25600C / bq25895 / bq24195
  • ST — STBC03 / STNS01 / L6924U
  • Renesas — ISL9241 / RAA489118 (multi-cell, SMBus)

Substitute when out-of-stock:

  • onsemi — NCP1850 / FAN54120 + MCU logger
  • Microchip — MCP73871 + PIC/AVR internal EEPROM
  • Melexis — MLX90614 / 90632 as T-channel

Validation checklist:

  • 3 adapters → all log
  • Thermal / JEITA → at least 1 entry
  • Input drop / system power-path → 1 entry
  • MCU reset → log persists
  • Substituted IC → same CSV/JSON field names
Field-compatibility rule: logger must always export evt, ts, ts_src, T_peak, I_peak, V_in, V_bat, src_ic — even when the front-end IC was changed to a simpler, charge-only device.
Procurement flow for small-batch logger BOM card with logger remarks, substitution to alternative IC + MCU logger, final service read-out OK. BOM requirements • charger must output status/fault • thermal/derating indication • EEPROM / FRAM for 32–128 entries • logger format = v1.0 Substitution path 1) TI bq25600C OOS 2) → ST STBC03 + MCU logger 3) → onsemi NCP1850 + MCU logger logger fields stay: evt, ts, T_peak, I_peak… Service Read-Out OK same CSV/JSON fields T_peak / I_peak / src_ic present factory diag entry visible
Figure: BOM enforces logging capability; if the preferred charger IC is out of stock, use an alternative + MCU logger, but keep the export format so the service tool still understands it.

Validation, Read-Out and Field Workflow

This section defines a single, non-overlapping workflow for engineering validation, production test, and field service. Once this is in place, other charging-related subpages should reference it instead of redefining “how to test the logger”.

Engineering validation

Manually force 3 anomaly types and confirm they all land in the log.

  • Thermal / JEITA derating triggered
  • Adapter / VBUS drop or unstable USB-C
  • System-side load steals current (power-path arbitration)

Then read out and check: all 3 were recorded, timestamps are in order, and peak T/I look realistic.

Production / factory test

In the final station, inject a single factory event:

FACTORY_TEST_OK @ ts=0 · fw=1.0 · logger=v1.0

Read back once to make sure the logger is enabled. Mark the unit as “Logger: Enabled” before shipping.

Field / service workflow

Use the same export format everywhere. Client view shows only the latest N entries; engineer view exports full CSV/JSON with raw registers.

Interfaces: I²C→USB, UART→USB-C, or BLE short messages — but the JSON/CSV schema must stay the same.

Anti-tamper: critical events can be written twice (MCU flash + external EEPROM) and committed with CRC/version marks so customers cannot silently wipe the log.
Validation-to-field workflow for charging-domain logger Three-step flow from engineering test to production test to field service, each step confirming that the logger can be read. Engineering Test 1) force thermal derating 2) drop adapter / VBUS 3) make system steal current → read logger → check timestamps & peaks Read Logger OK Production Test last step: write FACTORY_TEST_OK read back to confirm mark unit “Logger: Enabled” Read Logger OK Field Service client = latest N, limited fields engineer = full CSV/JSON interfaces: I²C/USB, UART/USB-C, BLE Read Logger OK
Figure: Engineering creates anomalies and verifies logging; production injects a factory test event; field service reads the same format to diagnose issues.

Request a Quote

Accepted Formats

pdf, csv, xls, xlsx, zip

Attachment

Drag & drop files here or use the button below.

Charging-Domain Logger FAQ

All questions below are scoped strictly to the charging domain (CC/CV, thermal derating, input current limit, power-path arbitration). They do not cover pack-level BMS, vehicle loggers, or SOC-only histories.

Why do I need a charging-domain logger if the charger IC already exposes status bits?

Charger status bits tell you what is happening right now. A charging-domain logger tells you what happened across the last N cycles. That history shows whether every charge was throttled by heat, input limits, or user load, which is what service teams need.

Can I log only abnormal charge terminations to save memory?

You can store only abnormal endings, but keep at least one normal full cycle for comparison. Without a good sample, it is hard to tell if the unit never reached CV, or if it was always exiting due to thermal or unstable adapters.

How do I generate timestamps without an RTC on the board?

Log using a monotonic MCU tick and include a ts_src field (for example, “tick”). When exporting through USB, UART, or BLE, the host re-bases the ticks to real time. As long as events stay in order, after-sales can still reconstruct the sequence.

What’s the minimum set of events to capture for after-sales diagnosis?

A practical minimum is: CHG_ATTACH, CHG_START_CC, CHG_START_CV, CHG_TERMINATED, CHG_ABORTED, THERMAL_REG, and INPUT_CURRENT_LIMIT. With just these seven, you can explain most “slow charge” and “never finished” complaints from the field.

Can I capture peak temperature from an external NTC instead of the charger IC?

Yes. Read the NTC through the MCU, mark the source as ntc_ext, and store the highest value seen in that cycle. If you also mount a Melexis contactless sensor, save that too — it helps explain enclosure or cabinet heating problems.

How fast should I poll the charger to avoid missing thermal or input-limit events?

For typical charger ICs, a 100–500 ms polling window is enough. In noisy USB-C or dropping-adapter cases, shorten it to 50–100 ms so you catch brief current-limit or thermal flags. Balance the rate with MCU load and nonvolatile write frequency.

Can I store the log in MCU internal flash for small-batch builds?

Yes, but implement basic wear leveling and cap the depth to 10–32 entries. Internal flash is ideal for prototypes and low volume. For exported or long-life products, move to external EEPROM or FRAM so power loss will not wipe the history.

How do I keep the log format stable if I switch from TI to ST chargers?

Do translation in the MCU. Map each vendor’s status or fault to unified events like CHG_TERMINATED or THERMAL_REG, and always export the same CSV/JSON field names. Also write “logger format = v1.0” in the BOM so purchasing cannot change it silently.

Can I log power-path arbitration events (VBAT↔VSYS) as anomalies?

Yes. Log them as POWER_PATH_PRIORITY or similar and attach V_in, V_bat, and I_chg. These entries explain why a board stayed in low current even though the adapter was OK — the system side was taking energy away from the battery charger.

What depth is enough for field returns — 10, 32, or 64 entries?

For consumer or portable devices, 10 entries usually tell the story. For industrial, automotive, or cabinet deployments, 32 is safer. If the device ships overseas and may be serviced months later, 64 entries keeps enough history to see patterns.

How do I protect the log from being erased during brown-out or hot-plug?

Use a two-step commit: write the entry, verify, then mark it committed. Keep a tiny index in EEPROM/FRAM and, for critical events, write a duplicate copy. On the next boot, the MCU can detect incomplete writes and roll forward safely.

How do I expose the log to customers without leaking the whole register map?

Provide a limited public view that lists time, event, and whether the charger was derated. Keep raw register snapshots, source IC names, and internal timestamps for the engineering view only. Both views should still follow the same schema version.