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

Branches and tags

mainbranch27 days agozip

Files at HEAD (c3245a9800) · download zip

images/
MakitaXGT/
LICENSE34.3 KB
makita_xgt.ino23.8 KB
README.md4.2 KB
xgt_bms.ino325 B

Recent commits · all

c3245a98Read and rate XGT packs the way Makita's own XGT software doesno-body-in-particular27 days ago
91d71be6Colour the screens and lay out the diagnosis like m5din-makitano-body-in-particular27 days ago
003f042eAdd a Diagnosis screen and the BTC04's XGT readsno-body-in-particular27 days ago
23909c4cLicense under GPL-3.0-or-laterno-body-in-particular27 days ago
37605dc6Add a step-by-step wiring diagramapol2026-10-06
59e48ba5Keep the README pictures in the repoapol2026-10-06
5ca235beMerge pull request #4 from zaprodk/patch-1no-body-in-particular2026-03-09
de9c0d8cUpdate makita_xgt.inoPer Jensen2026-03-08
66bcd9ecUpdate makita_xgt.inono-body-in-particular2026-03-02
1cc274d7Update makita_xgt.inono-body-in-particular2025-10-01

README.md

m5din-makita-xgt

Lockout flag reset tool for makita XGT - based on https://github.com/twaymouth/XGT-Tester .

Screens

Turn the knob to change screens:

  1. Info: model, charge count, capacity (full-charge / rated), life, charge, failure, pack voltage and layout (e.g. 10S2P), battery temperature.
  2. Voltages: pack, spread, the ten cells, temperature sensors T1/T2.
  3. Diagnosis (below).
  4. Current histogram and 4. temperature histogram: how often the pack's maximum current and temperature fell into each band. The band labels are approximate; the bars use Makita's 0-12 scale.
  5. Tools used: the tools the pack was used with (2-letter Makita series code, a name for common ones, and how many times it was connected).
  6. Reset lockout (press the button to reset).

The values and how they are rated follow Makita's own XGT software, Makita Tool Management 1.2.21 (the PC app for the ADP12 adapter), which reads the same battery registers this sketch does:

Checked on a BL4080F.

Diagnosis

Screen 2 reads the pack once when you turn to it and lists what to repair, most safety-relevant first: Diagnosis k/N, what was found, two lines of advice, and Valid after 1h rest when the finding is judged from cell voltages (let the pack rest an hour off the charger and the tool first). Press the button for the next finding. It checks, in this order:

  1. Broken balance tab or sense wire (a cell under 0.5 V next to one over 4.5 V, a cell over 4.5 V, or the cell sum more than 0.3 V off the pack voltage).
  2. Dead (under 1.0 V) or deeply discharged (under 2.5 V) cell groups, or the whole pack flat.
  3. Temperature sensors out of -20..100 °C, or T1 and T2 more than 15 °C apart.
  4. Overheated (over 40 °C).
  5. Makita's cell failure and circuit (PCB) failure.
  6. Worn cells: Makita's life gauge at 0 (capacity at its floor), or a warning at 1 of 4 bars.
  7. One group more than 0.10 V below the highest.

It says "Group n" when the pack has cells in parallel, "Cell n" otherwise; cell 1 is at the negative end. The 0.3 V, 15 °C and 0.10 V thresholds are proposals, not Makita's, and still need a faulty pack to confirm. Only the Reset lockout screen writes to the battery.

Wiring

Wiring diagram

You only need the Grove cable for Port B (bought separately on AliExpress or from M5Stack). Strip the ends of its wires and push them straight into the battery's contacts. The numbers below match the blue markers in the diagram.

  1. Ground: black wire (GND) into the battery's GND contact.
  2. Data: yellow wire (G2) into the battery's DT contact.
  3. Only if the battery is completely dead: run a wire from the battery's + to the contact directly above DT. That restarts the BMS so it can answer.
  4. Power the M5Din separately, for example over USB-C. A full XGT pack is 40 V, so check that against the M5Din's DC input rating before ever powering it from the pack.

The white and red wires of the cable are not used.

Where DT and GND are on the battery:

XGT battery contacts: DT (data) and GND

What it looks like connected:

M5Din connected to an XGT battery

You will also likely need to solder over the fuse, the easiest way to do this, is to use a dremel or similar tool to scrape off the insulation layer on the top of the PCB as explained on my youtube: https://www.youtube.com/watch?v=0eV-fzQYKgs

License

My code is GPL-3.0-or-later, see LICENSE. It is based on twaymouth/XGT-Tester, which has no licence of its own, so the parts taken from it remain its author's. The OneWire_direct_*.h pin helpers are from Paul Stoffregen's OneWire library and keep its MIT-style licence.