Hall Tachometer
Stick a magnet on and the numbers appear
Page 33 takes a switch-type hall sensor (linear hall parts do not work here) with the signal line on GPIO41. Every edge records a timestamp and the last 48 edges are buffered; RPM is computed from the median of the last six periods, so a single glitch cannot throw the reading off.
Angle comes from accumulated pulses: pulses ÷ PPR × 360°. After two seconds without an edge the page declares a stop and zeroes the reading instead of freezing on the last value. PPR (pulses per revolution) = magnets × 2 — one magnet rising and falling counts as two pulses, and getting this wrong doubles or halves every reading.
On-screen interface
A recreation of this page on the 2.41-inch AMOLED display (600 × 450). Actual interaction and layout follow the latest firmware.
Key capabilities
Switch hall input
Digital edge trigger — a single signal wire is enough.
Median filtering
Median of the last six periods ignores jitter spikes.
Configurable PPR
magnets × 2, so a new mechanical setup needs no code change.
Auto stop
No edge for two seconds zeroes the reading instead of showing stale data.
Technical specs
Typical scenarios
Motor RPM
One magnet on a fan or motor and the RPM shows up on screen.
Linear speed
With the wheel diameter you get belt or wheel speed from RPM.
Related commands
page 33 Open the hall page hall Show RPM, angle and pulse count hall ppr 4 Set pulses per revolution (two magnets) hall deb 2 Set the debounce threshold hall sim 1200 Inject pulses at 1200 RPM (no hardware needed) hall reset Clear pulses and angle
- Switch-type (digital output) hall sensors only — linear hall output cannot be read.
- GPIO40 is the display reset line; the command rejects it outright.
- Simulation injects pulses per frame; at 30–80 Hz loop rates high RPM reads low — use a real sensor for measurements.