# push (client certificate):
git remote set-url --push origin https://coredump.ws:8443/repos/m5din-hikoki.git
Branches and tags
| diag-calibration-and-dump | branch | 6 days ago | zip |
| main | branch | 22 days ago | zip |
Files at HEAD (ba8a9376b5) · download zip
Recent commits · all
| ba8a9376 | Diagnosis: hold the button to reset a locked pack; drop the Events page | no-body-in-particular | 22 days ago |
| 4ddc143b | Add a screen with charges by start voltage | no-body-in-particular | 22 days ago |
| abd0ecf5 | Document the write requests in full, with examples; map R1016 | no-body-in-particular | 22 days ago |
| bb204bf2 | Document the write requests and R1016 | no-body-in-particular | 22 days ago |
| 7cdf71a3 | Show the histograms whenever R1011 answers; document the calibration | no-body-in-particular | 23 days ago |
| 28d70383 | Document the Bluetooth packs' firmware; add current and temperature screens | no-body-in-particular | 23 days ago |
| 823572e5 | Judge the lock like HiKOKI's Battery Analyzer; add its full data | no-body-in-particular | 27 days ago |
| ff5a3164 | Colour the screens and lay out the diagnosis like m5din-makita | no-body-in-particular | 27 days ago |
| d63f6dc3 | Add a Diagnosis screen that says what to repair | no-body-in-particular | 27 days ago |
| 2bc44331 | Add a step-by-step wiring diagram | apol | 2026-10-06 |
README.md
m5din-hikoki
Hikoki battery analyzer based on m5stack din meter - allows you to view a lot more attributes than the official battery analyzer, and to reset the lockout byte.
Screens
Turn the encoder to move between screens (it wraps around); press the button to refresh.
- Model, serial, charge count, dates, run time, state of charge
- Bank voltages, cell voltages L1-L5, temperatures
- Diagnosis: what to repair (see below). Press for the next finding; when the pack is locked, hold the button for 2 s to reset the lockout right there (this writes to the battery), after which it reads the pack again
- Error log, with HiKOKI's own names for all error codes
- Usage per tool
- Error flag, fuse error, earlier overcharge, charge-side counters
- Discharge-side counters
- System: the battery's own detection errors (current, cell voltage, 12 V, NTC, upper-bank voltage), software version, LED code, raw error and I/O flags, and whether it is locked
- Current histogram: how long the pack has spent at each discharge current (0.5-2 A, then 10 A bands up to over 50 A), drawn like m5din-makita-xgt with one bar step per doubling of the time
- Temperature: how many charges started below -10 °C, at -10 to 0 °C or above 55 °C, how many discharges ended below -10 °C or at -10 to 0 °C, and the hottest the pack has been. The packs keep no full temperature histogram, so these bands are what there is
- Charge voltage: how many charges started at each lower-bank voltage (below 15 V, one bar per volt, 20 V and up). The lower bank is five cells, so the red bar is charges started below 3.0 V per cell and the yellow one at 3.0-3.2 V per cell: charges after a deep discharge
- Reset lockout (press the button; this one writes to the battery)
Screens 9 and 10 read R1011, screen 11 reads R1016. When the pack doesn't answer, they show "No histogram available". The Bluetooth packs' firmware answers both; whether other packs do is not known.
The Bluetooth packs' firmware
HiKOKI's TOOLS app carries the firmware of the Bluetooth packs. docs/firmware.md lists every reply it sends and what each value is, worked out from the image in firmware/ (BSL36A18B 25S, version 5.8, as shipped in HiKOKI TOOLS 1.4.1).
"Locked" follows HiKOKI's Battery Analyzer: per model it masks the error flags in R1004 [17..22] and also counts R1016 [69] bits 0-1. The masks, the model names and the error-code names come from the tables the Battery Analyzer ships with.
Diagnosis
The Diagnosis screen reads the battery once when you enter it (R1001, R1003, R1004, R1009 and R1016, the same read-only commands the other screens use; it never writes or resets) and lists findings ordered by safety. Each shows what is wrong and what to do; the button steps to the next one.
- Broken balance tab or sense wire: a cell below 0.5 V next to one above 4.5 V, a cell above 4.5 V, or the sum of L1-L5 more than 0.3 V off the bank voltage.
- Dead cell (below 1.0 V: replace, do not recharge), deeply discharged cell (1.0-2.5 V: slow-charge and retest), or the whole pack flat. On MultiVolt packs the upper bank has no single-cell readings, so it is judged as a whole: dead below 1.0 V per cell, low below 2.5 V per cell, and more than 2.5 V below the lower bank means a dead cell inside it.
- Broken temperature sensor: below -20 °C or above 100 °C, or the two NTCs more than 15 °C apart.
- Hot: above 40 °C.
- Overcharge 2 in the error log (replace the cells, do not reset), fuse error, locked (hold the button on the Diagnosis screen to reset, or use Reset lockout, the last screen). The battery's own detection errors: current or 12 V supply (PCB fault), cell voltage (sense wires, else PCB), NTC (replace it or its wiring), upper-bank voltage. Overcharge, extreme unbalance and temperature unbalance counts as things to check.
- Weak cell: the lowest of L1-L5 more than 0.10 V below the highest, or one bank more than 0.5 V below the other.
Cell 1 is L1, assumed to be at the negative end. "Group" is shown instead of "Cell" for models with two cells in parallel (BSL36B18 family, BSL1240M, BSL1830M/1840M/1850MA), judged from their rated capacity. Voltage findings marked "Valid after 1h rest" need a rested pack. The 0.3 V, 15 °C, 2.5 V bank and 0.10 V limits are proposals, not HiKOKI data. The battery reports no capacity or health, so worn cells are not judged.
Wiring

The DinMeter uses both Grove ports (Port A and Port B) plus its DC power input. The battery terminal names are the ones printed on the housing: C+, +, T, V, LS, −, LD. C+ and LD stay unconnected. Besides wire you need one 4.7 kΩ resistor. The numbers below match the blue markers in the diagram.
- Ground: battery − to the DinMeter's DC input −, Port A's black wire and Port B's black wire (all three).
- Power: battery + to the DinMeter's DC input +. The DinMeter runs off the battery you are testing.
- T: to Port B's white wire (G1).
- Pull-up: the 4.7 kΩ resistor goes between Port B's white wire (G1) and Port B's red wire (5V).
- V: to Port B's yellow wire (G2).
- LS: to Port A's yellow wire (G13).
Port A's white and red wires are not used.
These pins match HikokiSerial serial1(13, 2, 1) in HikokiSerial.ino. The constructor takes
(outpin, inv_outpin, inpin): the tool sends on G13 (LS) with an inverted copy on G2 (V), and listens on G1 (T).
The original annotated photo:
