[code] [blog] [Repos] [GPS Tracker] [Music] [VNC] [Restart VNC] [E-Mail me]
git clone https://coredump.ws/repos/m5din-hikoki.git
# push (client certificate):
git remote set-url --push origin https://coredump.ws:8443/repos/m5din-hikoki.git

Branches and tags

diag-calibration-and-dumpbranch6 days agozip
mainbranch22 days agozip

Files at HEAD (ba8a9376b5) · download zip

Arduino/
docs/
firmware/
images/
LICENSE34.3 KB
README.md5.5 KB
wiring.jpg258.6 KB

Recent commits · all

ba8a9376Diagnosis: hold the button to reset a locked pack; drop the Events pageno-body-in-particular22 days ago
4ddc143bAdd a screen with charges by start voltageno-body-in-particular22 days ago
abd0ecf5Document the write requests in full, with examples; map R1016no-body-in-particular22 days ago
bb204bf2Document the write requests and R1016no-body-in-particular22 days ago
7cdf71a3Show the histograms whenever R1011 answers; document the calibrationno-body-in-particular23 days ago
28d70383Document the Bluetooth packs' firmware; add current and temperature screensno-body-in-particular23 days ago
823572e5Judge the lock like HiKOKI's Battery Analyzer; add its full datano-body-in-particular27 days ago
ff5a3164Colour the screens and lay out the diagnosis like m5din-makitano-body-in-particular27 days ago
d63f6dc3Add a Diagnosis screen that says what to repairno-body-in-particular27 days ago
2bc44331Add a step-by-step wiring diagramapol2026-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.

  1. Model, serial, charge count, dates, run time, state of charge
  2. Bank voltages, cell voltages L1-L5, temperatures
  3. 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
  4. Error log, with HiKOKI's own names for all error codes
  5. Usage per tool
  6. Error flag, fuse error, earlier overcharge, charge-side counters
  7. Discharge-side counters
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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.

  1. 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.
  2. 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.
  3. Broken temperature sensor: below -20 °C or above 100 °C, or the two NTCs more than 15 °C apart.
  4. Hot: above 40 °C.
  5. 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.
  6. 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

Wiring diagram

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.

  1. Ground: battery − to the DinMeter's DC input −, Port A's black wire and Port B's black wire (all three).
  2. Power: battery + to the DinMeter's DC input +. The DinMeter runs off the battery you are testing.
  3. T: to Port B's white wire (G1).
  4. Pull-up: the 4.7 kΩ resistor goes between Port B's white wire (G1) and Port B's red wire (5V).
  5. V: to Port B's yellow wire (G2).
  6. 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:

Annotated photo of the wiring on the battery