Skip to content
NewA realistic 3D head for a free swim cap editor
Nov 27, 2026·5 MIN READ
A dead battery, a wireless charger and a tick twice a second

A dead battery, a wireless charger and a tick twice a second

A small location tracker with a fully flat battery ticked on its charger and never charged. The supply was collapsing every half second, and a debug probe sampling at one reading per second could not see it.

I work on a small battery-powered location tracker that charges on a wireless pad. One unit came back from the field because it ticked on the charger. Tik, tik, tik, about twice a second, and it never charged. Then my own development unit did the same thing after I let its battery run completely flat. Three different chargers, same sound.

The tick was the device starting and dying, again and again. Here is how I measured it, what fixed it, and where I fooled myself on the way.

What the tick really is

With a dead battery on the pad, the supply rail came up to 3.29 V, stayed there for about 0.45 seconds, fell to 0 V for about 0.1 seconds, and then came back. Every time the reset reason was a plain power-on.

One test told me where to look. When I halted the chip with the debug probe, the rail stayed up. So the charger could hold the supply. It was my own firmware, starting up, that pulled it down.

flowchart LR
    A["Pad powers<br/>the unit"] --> B["Rail up<br/>3.29 V"]
    B --> C["Firmware<br/>starts"]
    C --> D["Start-up load<br/>and beep"]
    D --> E["Rail falls<br/>to 0 V"]
    E --> A

The small beep at start-up is the tick. The buzzer never gets to finish it.

One reading per second sees nothing

My first watcher asked the probe for the target voltage once a second. It showed a healthy rail the whole time, because a 0.1 second gap almost never lands on a sample.

The probe can answer much faster if you stop it from connecting to the chip and feed it a file with thousands of status commands. That gave me about 1,500 voltage readings per second, with no extra hardware on the bench.

fast rail sampling with a J-Link
# st8k.jlink holds 8,000 lines, each one just: st
JLinkExe -device <your-chip> -if SWD -speed 4000 \
  -autoconnect 0 -CommandFile st8k.jlink | grep -o 'VTref=[0-9.]*V'

If a fault repeats faster than your tool samples, the tool will tell you everything is fine. Check the sample rate before you trust a flat line.

The fix is about order

Three small changes in the start-up code:

  • The charger is set up first, before anything else draws current.
  • The interrupt priority for the charger bus is set before the Bluetooth stack starts.
  • The start-up beep is skipped when the battery is flat and the unit is on the charger.
FirmwarePower drops in 5 sResult
Before8 to 9Ticks, never charges
After0Boots once, charges

I booted the fixed build three times on a dead battery, and it was clean each time.

I still cannot name the exact load that pulls the rail down. One cross-check was neutral: the old firmware, flashed back after 45 seconds of charging, did not tick. And a unit that is already ticking cannot take an over-the-air update, so the fix only protects units before they get there.

Where I went wrong

1. A confident wrong diagnosis
I wrote a charger fault theory into the issue before I had measured anything. I had to rewrite the issue later.
2. Silence is not success
After the first fix the ticking stopped. The unit had crashed and sat there dead, because a bus interrupt sat on a priority the Bluetooth stack keeps for itself.
3. The wrong pulses
Off the charger, a dying battery makes its own weak pulses: about 2.89 V, uneven, for a few minutes. I called that a reproduction. The real tick is 3.29 V and regular.
4. Waiting for a flat battery
Below 3.5 V the unit goes into a low-battery mode and draws very little. Getting to truly dead took 1 hour 45 minutes, so I built a hidden drain mode for the bench.

A flat battery is test equipment too

The slowest part of this bug was not the code. To test a fix for a dead battery you need a dead battery, and you need it again for every attempt. A healthy device fights you here: the lower the voltage, the less it draws, so the last few percent take the longest. My drain mode switched on everything that uses power, and even then the unit reset near 3.0 V and I had to wait for the rest.

A proper lab does not wait. As far as I know, there are three common ways around it:

MethodWhat it doesGood for
Battery simulatorA power supply that behaves like a cell at any charge level, with its internal resistanceRepeating the same "2.9 V and weak" start a hundred times
Electronic loadDrains a real cell at a set current down to a set voltageGetting a real cell to a known state fast
Pre-conditioned cellsA box of cells already taken to known levelsTests where the real chemistry matters

The simulator is the interesting one for a bug like this. A weak battery is not only a low voltage. It is a low voltage that sags when you pull current, and that sag is exactly what killed my rail. A plain bench supply set to 2.9 V will not show it.

Keithley and Keysight sell full battery simulators. Small teams often use a power profiler such as the Nordic PPK2 or an Otii in source mode. Those give you the voltage, but only part of the weak-cell behaviour.

There is a catch for a sealed product. The battery sits behind the charger chip inside a closed housing, so a simulator needs an opened unit with wires on the battery pads. That is my next step: with a simulated weak cell I can finally find which load pulls the supply down.

The whole thing took two days, and most of that time went on getting a battery flat enough and on trusting readings that were too slow. Next time I measure the rail fast on the first day, and I write the diagnosis into the issue only after the numbers agree with it.

Share
Mariusz Smenżyk
Written by

Mariusz Smenżyk

Builder for sport. Make. Test. Launch.

Related notes