# push (client certificate):
git remote set-url --push origin https://coredump.ws:8443/repos/m5din-makita-xgt.git
Branches and tags
Files at HEAD (c3245a9800) · download zip
| images/ | |
| MakitaXGT/ | |
| LICENSE | 34.3 KB |
| makita_xgt.ino | 23.8 KB |
| README.md | 4.2 KB |
| xgt_bms.ino | 325 B |
Recent commits · all
| c3245a98 | Read and rate XGT packs the way Makita's own XGT software does | no-body-in-particular | 27 days ago |
| 91d71be6 | Colour the screens and lay out the diagnosis like m5din-makita | no-body-in-particular | 27 days ago |
| 003f042e | Add a Diagnosis screen and the BTC04's XGT reads | no-body-in-particular | 27 days ago |
| 23909c4c | License under GPL-3.0-or-later | no-body-in-particular | 27 days ago |
| 37605dc6 | Add a step-by-step wiring diagram | apol | 2026-10-06 |
| 59e48ba5 | Keep the README pictures in the repo | apol | 2026-10-06 |
| 5ca235be | Merge pull request #4 from zaprodk/patch-1 | no-body-in-particular | 2026-03-09 |
| de9c0d8c | Update makita_xgt.ino | Per Jensen | 2026-03-08 |
| 66bcd9ec | Update makita_xgt.ino | no-body-in-particular | 2026-03-02 |
| 1cc274d7 | Update makita_xgt.ino | no-body-in-particular | 2025-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:
- Info: model, charge count, capacity (full-charge / rated), life, charge, failure, pack voltage and layout (e.g. 10S2P), battery temperature.
- Voltages: pack, spread, the ten cells, temperature sensors T1/T2.
- Diagnosis (below).
- 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.
- 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).
- 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:
- Charges: C0 0054. Charge: C0 0108 / 256.
- Life: full-charge capacity C0 0064 against 95 % of the rated capacity (DD 08 x DD 0A), with the pack's own floor C0 006A: (FCC - floor) / (0.95 rated - floor), shown as % and 0-4 bars like the app.
- Temperature: the lower of the two cell sensors (C0 031A / 031C) in whole degrees.
- Failure: Makita's cell and circuit failure symbols from the failure diagnosis bytes C0 005A-0060.
- Tools: series code and connect count per slot in register bank 1 (C0 0050 + 4 n).
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:
- 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).
- Dead (under 1.0 V) or deeply discharged (under 2.5 V) cell groups, or the whole pack flat.
- Temperature sensors out of -20..100 °C, or T1 and T2 more than 15 °C apart.
- Overheated (over 40 °C).
- Makita's cell failure and circuit (PCB) failure.
- Worn cells: Makita's life gauge at 0 (capacity at its floor), or a warning at 1 of 4 bars.
- 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

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.
- Ground: black wire (GND) into the battery's GND contact.
- Data: yellow wire (G2) into the battery's DT contact.
- 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.
- 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:

What it looks like connected:

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.