Repository navigation
BX Tacho 2.4.0
BX Tacho firmware 2.4.0, for the Beyblade X launcher RPM meter. Web app: https://dazchi.github.io/bx-tacho/
What's new
-
Battery percentage calibration (
cal batt): the battery percentage used to come from a rough LiPo curve. BX Tacho can now measure the real curve of the battery fitted, by discharging it once at a steady load:- Do the VBAT calibration first (
cal vbat), and charge the battery untilstatusshows the power as USB, full. cal batt start, then unplug USB: the run starts. BX Tacho turns Bluetooth off, keeps the display on at constant brightness, stays awake at full CPU clock and keeps the sensors' LEDs off, so it draws a steady current, and logs the battery voltage every 10 s.- When the battery reaches the deep-sleep cutoff (3.3 V), it saves the curve (100 % to 0 % in 10 % steps), shows CURVE SAVED and goes to deep sleep. Plug in USB to wake it and charge.
This takes as long as the battery lasts (about 8 hours for 200 mAh). 0 % then means BX Tacho is about to go to sleep.
cal batt showprints the curve,cal batt cleargoes back to the rough one,statusshows which is in use. The curve is kept bycfg resetand by flashing the merged image. Plugging in USB during the run cancels it. - Do the VBAT calibration first (
-
Bluetooth icon: when Bluetooth is stopped (before deep sleep, during the battery calibration) the display and
statusnow show it as off.
Hardware note: FULL on boards with R7 = 100k
Once charged, the charger chip pulls its status pin down weakly instead of letting it go. With R7 = 100k the pin then still reads as charging, so FULL never shows and the battery reading stays "not trusted" on USB. Replacing R7 with 4.7k (0603) fixes it; a 10k soldered across the existing R7 works too. No firmware change is needed either way.
Updating
From 2.0.0 or later: your settings and calibration are kept.
From 1.x: calibrate again as described in the 2.0.0 release (the layout changed in 2.0.0).
Known limitation: after switching on, or moving BX Tacho from a black launcher to a white one, it stays on the black settings until a bey has been loaded (or the pin pushed up) for 3 seconds. Until then the empty white launcher shows LOADED.
Files
| File | For |
|---|---|
bx-tacho-v2.4.0.bin |
Updates. In the web app: USB tab (computer, or Chrome on Android with a USB-C cable) or Bluetooth tab. Settings, shot history and calibration are kept. |
bx-tacho-v2.4.0-merged.bin |
A blank board: everything from address 0x0. Overwrites settings and shot history; the battery calibrations are kept. |
ota_data_initial.bin |
A blank otadata (8 KB of 0xFF), only for flashing bx-tacho-v2.4.0.bin by hand (below). |
SHA256SUMS.txt |
Checksums of all three. |
Release build, optimised for speed (-O2), ESP-IDF v6.1.
Updating from a firmware before 0.8 (single app slot): update over USB once. That writes the two-slot partition table that Bluetooth updates need. After that, Bluetooth updates work too.
Flashing by hand (esptool):
python -m esptool --chip esp32c3 write-flash 0x10000 bx-tacho-v2.4.0.bin 0x10e000 ota_data_initial.bin
python -m esptool --chip esp32c3 write-flash 0x0 bx-tacho-v2.4.0-merged.bin
The first form writes the app and a blank otadata, so the board boots this app rather than one in the other slot; the web app does that for you. The second is for a blank board.
Licensed under the GPL, version 3 or later (see NOTICE for the additional permission covering extensions).