M5Stack Tab5 battery and power in Home Assistant: charger, level and safety¶
The Tab5 takes an optional two-cell (2S) lithium battery. This page says what the firmware does with it, with and without one: detection, charger, safety locks, level, charge limit, energy saving, alerts, and the measurements behind each number. Everything below is in the stable release 3.9.0 (2026-10-25) unless a version says otherwise: « since 3.8.0 » means the 3.8.0 release and every later one, « up to 3.8.1 » means the earlier releases only. The last section lists what each release changed. The pins used by the charger are in the Tab5 pinout; the rest of the hardware is in the hardware reference.
At a glance¶
| Topic | Without a battery | With a battery | Since | Setting or entity |
|---|---|---|---|---|
| Detection | the charger is switched off and the voltage read with it off is under 5.5 V | 5.5 V or more with the charger off | reading under 6.0 V over 10 minutes in 3.7.0; charger-off reading in 3.8.0; 5.5 V in 3.8.1 | diagnostic Battery detected (on by default), switch Battery fitted (off by default) |
| Charger | stays off: no hiss, no false « charging » | switched on only after a reading that saw a battery; waking a battery in protection is a last resort | off without a battery since 3.8.0; reading before any switching on since 3.9.0 | diagnostic Battery charging |
| Safety locks | none needed (charger off) | thermal lock (CPU 55 °C), electrical lock (above 8.45 V, or no current for 30 s); two cut-offs within an hour lock the charger until the next restart | thermal 3.8.1; kept in flash, electrical and visible in 3.9.0 | diagnostic Charger safety, event esphome.tab5_securite_chargeur |
| Level | « unknown » | estimated from the voltage on a discharge curve measured on a Tab5 | straight line since 3.6.0; measured curve since 3.9.0 | diagnostics Battery, Battery voltage, Battery current (current since 3.7.0), disabled by default |
| Charge limit | – | 100 % (default) or 80 %: stops at 80 %, starts again at 70 % | 3.8.0 | device setting Charge limit |
| Charge mode | – | Classic (default) or Fast (the charger's quick-charge input) | 3.8.0 | device setting Charge mode |
| Energy saving | never | on battery: brightness capped at 50 %, minimum after 30 s without a touch and at 35 % of battery or less, animations off, 30 frames per second | 3.7.0; 60 % return threshold in 3.9.0 | device setting Power saving (« On battery » by default), diagnostic On battery |
| Eco Wi-Fi | only with « Always » | light Wi-Fi power save on battery (or always) | 3.8.0 | device setting WiFi power saving (« Never » by default) |
| Low battery alert | – | at 20 % then 10 %, on battery | 3.8.0 | event esphome.tab5_batterie_faible |
| Power draw | unknown (the USB current is not measured) | watts, while the battery is discharging | 3.8.0 | Power draw, Power measurement |
| Status bar icon | a plug | a battery whose glyph and colour follow the level | 3.6.0; plug in 3.7.0 | switch Battery fitted |
What M5Stack says about the battery¶
From M5Stack's Tab5 page (read on 2026-11-06):
- The battery is a removable NP-F550, 7.4 V, 2000 mAh (14.8 Wh), charged by an IP2326 and monitored by an INA226. The standard Tab5 (SKU C145) comes without a battery; the Tab5 Kit (SKU K145) includes it.
- Battery life: about 6 hours from full (8.23 V) to the shutdown threshold (6.0 V), with the screen at 50 %, Wi-Fi always on and background tasks running. For comparison, the discharge measured below (screen off, about 1.2 W) lasted 13 h 23 min.
- Charging: the Tab5 charges only once it is switched on and initialised, not when it is off. Below 6 V the battery enters protection mode: M5Stack's advice is to take the battery out, reset the device, put the battery back and charge through the USB-C port; the charger then trickle-charges for a few minutes until the voltage is back above 6 V.
- Power supply: before disconnecting the power or changing the battery, shut the device down; if the power is cut directly, wait 5 seconds before switching on again, or the IMU may fail to initialise.
- Operating temperature 0 to 40 °C.
Power supply¶
The Tab5 is USB-C powered. Measured on a tablet with its battery on 2026-10-10: 2.6 W with the screen at 100 %, 1.7 W at 50 %, 1.2 W with the screen off (power consumption); the 1.5 A figure given here before had no source. The author's tablet runs without a battery on a PC's USB port; the history kept by Home Assistant (since 2026-09-30) shows a single brownout reset, on 2026-10-06 right after an OTA, cause unknown. A charger of 5 V / 2 A or more leaves some margin: advice, no longer a requirement. Without a battery, the tablet starts again by itself when USB-C power comes back, after a cable pulled while it runs as after a long-press power-off.
Power path, as read on the schematic (Jiuhai's notes in discussion #369, page 5 of the schematic, not checked by the author). Without a battery, the 5 V comes from USB-C or from the HVIN pin of the Ext.Port (pin 2): HVIN → D7 → FU4 (1 A polyfuse) → MP4560 buck converter (5.04 V) → MAX40200 ideal diode (1 A absolute maximum) → SYS_5VBUS; USB-C joins SYS_5VBUS through a second MAX40200; LPW5209 load switches then feed the screen, the P4, the C6, the speaker, the camera and the EXT 5V output. As far as that reading goes, every 5 V load shares one 1 A ideal diode: at peak load (full brightness, loud audio, camera, external sensors), a brownout seems more likely than damage. Whether it explains the brownouts above (on a PC's USB port) is not known. Jiuhai's devices run on 9 V through HVIN; the author has never powered the tablet that way. The measurements announced in the discussion (power-on from HVIN after a cut, input power at idle, at peak load and during an OTA, EXT 5V under load, twenty reboots and OTAs in a row, RTC drift) will be added here when they are published.
Backlight. Brightness is software-controlled via PWM (LEDC output on GPIO 22, light: monochromatic) and can be dimmed from Home Assistant to reduce power draw. Touching the screen while the backlight is off turns it back on (touchscreen: on_release). There is no ambient light sensor in this configuration.
Battery detection¶
The INA226 reads the battery itself, or the charger, or the USB: the firmware has to decide from the voltage whether a battery is there. A wrong decision means a charger charging into nothing.
Charger on, no battery (3.6.0 and 3.7.0). The charger charges into nothing. It says « charging », and the INA226 reads the charger or the USB, never a battery: 4.2 V on the tablet of a user whose fitted original battery reads about 7.2 V, with a charging status that follows reality (2026-10-05); on the author's tablet, which has none, 4.2 V and 8.39 V alternating every 1 to 3 minutes (evening of 2026-10-03), then a steady 5.71 V (2026-10-04), around 5.70 to 5.76 V on 2026-10-08. 8.39 V is therefore one of the values read without a battery, not a full battery. It also makes a faint continuous hiss, which stops when the charger is switched off (troubleshooting). In 3.7.0, « no battery » means a reading below 6.0 V in the last 10 minutes (rule written on 2026-10-05, discussion #278): the alternating case climbs back above 6 V between two low readings, and the steady 5.7 V case stays below.
Charger off (since 3.8.0). With the charger off, the INA226 reads the battery itself, or almost nothing: on the author's tablet, without a battery, 1.83 to 1.94 V (four readings, 2026-10-08), with the charging status at « not charging ». A 2S battery, even an empty one, reads more than 5 V. So, charger off, 5.5 V or more means a battery, less means none (3.0 V in 3.8.0: a residual 3.29 V read without a battery on 2026-10-11 passed it, and the charger then charged into nothing; 5.5 V since 3.8.1; a 2S battery never drops below about 6 V, its protection cuts off first). When the tablet looks:
- at boot (since 3.9.0), the charger stays off until a probe has read the voltage with the charger off (about 8 s after the end of
setup()); it is switched on only if that reading sees a battery (5.5 V or more). The 30 s wake-up of a battery in protection only follows a probe that saw nothing, when the previous boot had seen a battery (kept in flash,tab5_batterie_memoire: unknown, none, seen), and never after an abnormal restart (crash, brownout). Up to 3.8.1, that wake-up came first, at every boot until something was decided (3.8.0 and 3.8.1 only skipped it when the previous boot had seen no battery): 30 s of charging into nothing on the first boot of a tablet without a battery (the C145 model is sold without one), and at every turn of a restart loop. With the INA226 silent (presence unknown), the charger stays off. Risk: a new or completely flat battery reads below 5.5 V, is seen as absent and is not woken up: switch Battery fitted on, which wakes it up at once (30 s, since 2026-10-10), then once an hour while it is not seen; - charger on, with a battery: a probe every 10 minutes, and right after a reading below 6 V, to see whether the battery was taken out;
- charger off: every reading (every 60 s) decides, so a battery slid in while the tablet runs is seen within a minute;
- no battery found while the Battery fitted switch says there is one: the charger is switched on for 30 s once an hour (and at once when the switch is turned on), then probed, in case the battery was so empty that its protection had cut it off. With the switch off (no battery declared), the charger is never switched on again.
Without a battery, the charger stays off: no more hiss, no more false « charging ». The diagnostic entity Battery detected, enabled by default, publishes the decision (unknown before the first reading). Measured so far: only the reading without a battery, on the author's tablet; with a battery, not measured yet.
The charger and its safety locks¶
Charger. Before 3.6.0 the firmware never enabled its charger, and a user reported that the battery did not charge (discussion #278). In 3.6.0 and 3.7.0 it enabled the charger at every boot (charge_enable, PI4IOE 0x44 P7), like M5Stack's M5Unified library, battery or not. Since 3.8.0 it no longer does so blindly, and since 3.9.0 it switches it on only when it has found a battery (battery detection). Quick charge (P5) is kept off by default: the tablet stays plugged in, and standard charge asks less current from the USB charger (the Fast charge mode, below, switches it on).
Safety locks. The author's Tab5 died on 2026-10-11, most likely from charging into nothing (charger on without a battery, 7.7 V read, the P4 going from 61 to 70 °C in 4 minutes; not confirmed, it is at M5Stack's repair service). The firmware cuts the charger off by itself:
- thermal (since 3.8.1): CPU at 55 °C or more, or +4 °C within 60 s above 48 °C → charger off at least 15 minutes, then until a temperature read at 44 °C or less. Since 3.9.0 it is kept in flash (a restart, caused by the heat or not, finds it set) and an unreadable temperature no longer lifts it;
- electrical (since 3.9.0), charger on: a voltage above 8.45 V (more than a full 2S battery) or no charging current (below 20 mA either way) for 30 s → charger off and a probe at once (before: up to 10 minutes until the next probe). No current while the probe reads a full battery (95 % or more) means charging has finished: nothing wrong, the current check stays quiet until the level drops below 90 %. Two cut-offs within an hour lock the charger until the next restart. Not measured with a battery: the voltage read at the end of a charge, and the current of a full battery;
- each lock is visible (since 3.9.0; in 3.8.1 the thermal lock had neither of the two): the diagnostic entity Charger safety (a problem, on while a lock is set) and the
esphome.tab5_securite_chargeurevent (cause: thermique, tension or courant;mesure;verrouille: oui when locked until restart), which the « sécurité du chargeur » guard of thetab5_healthpackage turns into a persistent notification and a phone notification.
Battery level and discharge curve¶
Three diagnostic entities reach Home Assistant (since 3.6.0): Battery charging (charging status, PI4IOE 0x44 P6, read every 10 s, a change published once it has lasted 30 s), Battery voltage (voltage measured by the INA226, published on a 50 mV change or every 15 min) and Battery (level estimated from the voltage; it reads too high while charging; « unknown » while no battery is detected). Battery current (since 3.7.0) comes with the energy saving. They are disabled by default in Home Assistant: with the battery fitted, enable them on the device page.
Since 3.9.0 the level follows a discharge curve measured on a Tab5: 6.6 V = 0 %, 7.0 V = 2 %, 7.4 V = 7 %, 7.6 V = 18 %, 7.8 V = 47 %, 8.0 V = 62 %, 8.2 V = 97 %, 8.35 V = 100 %. It was measured on the original battery of a user's tablet (husyildiz, discussion #278, 2026-10-15): two full discharges at a constant load, screen off (about 0.17 A, 1.2 W), read from Home Assistant's history; the remaining capacity is the time left until the battery's protection cut off (13 h 23 min). The second night crossed every voltage within 5 minutes of the first one. Up to 3.8.1 it was a straight line, 6.0 V = 0 %, 8.23 V = 100 % (ESPHome's reference configuration, and the figures M5Stack gives for its battery life): a lithium battery stays long on a plateau and then collapses, so the level dropped from 100 to about 65 % in 11 hours, then to 0 % in about one hour; 3.9.0-rc.2 used the open-circuit table of another battery (Samsung EB535151VU, from the Linux kernel), better but still flat for hours, then 58 → 7 % in two hours. Limits: one battery measured; with the screen on, the voltage sags a little more and the level reads a little low; on the plateau from 8.00 to 8.05 V (62 → 81 %), the voltage published to the nearest 50 mV can make the level jump by about 20 %.
Charge limit¶
Since 3.8.0. The device setting Charge limit: « 100 % » (the default) or « 80 % »: charging stops at 80 % and starts again at 70 %, after at least 10 minutes stopped. It is meant for a tablet that stays plugged in: a lithium battery kept below full lasts longer. The level comes from the voltage (the discharge curve above), and the voltage is higher while charging than at rest, so charging stops a little before a real 80 %: with the measured curve, it stops at about 8.05 V read while charging and starts again at about 8.02 V read with the charger off (7.78 V and 7.56 V with the former straight line); both are on the plateau, and the 10-minute minimum pause keeps it from going back and forth (not measured on a tablet). Not measured yet: with the charger stopped and USB plugged in, does the tablet run from USB or from its battery? If it runs from its battery, the 80 % mode makes it go back and forth between 80 and 70 % instead of resting it.
Charge mode¶
Since 3.8.0 (ADR-0045). The device setting Charge mode: « Classic » (the default, quick charge off as before) or « Fast »: the charger's quick-charge input (nCHG_QC_EN, P5) is switched on, only while the charger itself is on — never without a battery, during a probe or in the 80 % pause. M5Stack's M5Unified library calls these two states 500 mA and 1000 mA (setChargeCurrent); neither current was measured on this tablet, nor the heat or the load on the USB charger.
Energy saving on battery¶
Since 3.7.0. The INA226 also gives the battery current, published as Battery current (diagnostic, disabled by default like the voltage): positive while the battery is discharging, that is while the tablet runs on it, negative while it charges. That sign comes from M5Stack's M5Unified library (getBatteryCurrent: the shunt is wired so that charging reads negative; ESPHome publishes the register as it is), and a user's tablet with its battery confirmed it on 2026-10-07 (discussion #278). Each reading (every 60 s) decides On battery: above 50 mA of discharge, on battery; below 20 mA, plugged in; never while charging (it switches back as soon as charging resumes) nor without a detected battery. The device setting Power saving (« On battery » by default) uses it: on battery, the brightness is capped at 50 % at the backlight output (Home Assistant keeps the brightness you chose), drops to the minimum (10 %) after 30 s without a touch and at 35 % of battery or less (until the level climbs back to 60 % since 3.9.0; 40 % up to 3.8.1, only 23 mV above 35 % on the measured discharge curve, against 0.26 V for 60 %), the animations stop (whatever the « Animations » setting) and LVGL redraws at most 30 times a second outside games. Thresholds: Tab5/socle/tab5_economie.h, tested on a PC by tools/test_alarm_clock.cpp; settings: settings.
Eco Wi-Fi¶
Since 3.8.0 (ADR-0045). The device setting WiFi power saving: « Never » (the default: the radio always listens, power_save_mode: NONE), « On battery » or « Always », with the same « on battery » as energy saving. On, the Wi-Fi uses the light power save (WIFI_PS_MIN_MODEM), sent to the C6 through ESP-Hosted, and goes back to full listening during voice, sound and updates. Not measured: the current saved, and the added latency of a push or a ping (up to one DTIM interval of the router). Whether the C6 software (1.4.1 on the author's tablet) honours the request is not verified either; the tab5.wifi log line says whether it was accepted.
Low battery alert¶
Since 3.8.0. On battery, when the level drops below 20 %, then below 10 %, the tablet sends the esphome.tab5_batterie_faible event (level, threshold), once per threshold, re-armed at 30 % or when charging resumes. The « batterie faible » guard of the tab5_health package turns it into a persistent notification (the 10 % one replaces the 20 % one) and a phone notification.
On the screen¶
An icon closes the status bar (top left, after the alarm bell) once the device switch Battery fitted is on (since 3.6.0); it is off by default and survives reboots. With no battery detected the icon is a plug (since 3.7.0), in the theme's text colour; with a battery its glyph follows the level (full above 80 %, half, low, « ! » below 20 %, a bolt while charging) and its colour is the phone's scale (get_battery_color(): green, blue, amber, red); « ? » in grey before the first reading. The icon reads the sensors on the tablet itself: it works even with the battery entities left disabled in Home Assistant.
Power draw and measurements¶
Since 3.8.0. Power draw (W) is the battery voltage × the battery current, while the battery is discharging; it is unknown on mains, since the USB current is not measured. On the tablet, the « Battery » line of the system console shows the level and that power on battery (for example « 78% · 2.4 W »), otherwise the level and the voltage. Measured on a tablet on 2026-10-10 (power consumption). To measure it case by case (screen, microphone, speaker, theme, energy saving), the Home Assistant script « Tab5 — consumption test » (packages/tab5_mesure_conso.yaml, described here) switches on Power measurement, which reads the battery every 2 s instead of every minute, for 2 h at most.
What the firmware cannot do for you¶
Fit only the 2S battery made for the Tab5 (NP-F550 type, 7.4 V nominal), never a single-cell (1S) battery. Prefer a 5 V / 2 A charger to a PC's USB port: a brownout was seen on a PC's port right after the brightness went to 100 % (2026-10-08). HVIN: 6 to 24 V only. M5Stack gives 0 to 40 °C ambient for the Tab5: not in the sun nor against a heat source.
Versions: what changed when¶
Dates are those of the GitHub releases, and each row was read in the code of the release's tag.
| Version | Date | Battery and power |
|---|---|---|
| 3.6.0 | 2026-10-05 | the charger is enabled at every boot (before: never); diagnostics Battery charging, Battery voltage and Battery (straight-line level); switch Battery fitted and the status bar icon |
| 3.7.0 | 2026-10-07 | diagnostic Battery detected (a reading under 6.0 V over 10 minutes means no battery) and the plug icon; Battery current, Power saving and On battery |
| 3.8.0 | 2026-10-10 | charger off without a battery, battery looked for with the charger off (threshold 3.0 V), memory of the previous boot; Charge limit, Charge mode, WiFi power saving, low battery alert, Power draw and Power measurement; Battery fitted wakes a battery at once |
| 3.8.1 | 2026-10-11 | presence threshold raised to 5.5 V; thermal lock |
| 3.9.0 | 2026-10-25 | reading before any switching on of the charger; thermal lock kept in flash; electrical lock and the Charger safety entity and event; discharge curve measured on a Tab5; energy-saving return threshold at 60 %; the probe no longer interrupts the 80 % charge limit |