SLIDER
sensing

no. 1

MagScale: a cheap magnetic ruler that knows its position to under a millimetre the moment it powers on. Built for SLIDER, a walking robot whose sliding legs had no way to be measured.

684 mm
absolute range
<£50
component cost
0.28 mm
RMS error, no homing
SLIDER sensing
Principle
Two rows of magnets, 36 mm and 38 mm apart. The difference between their readings is unique at every point on the rail.
Build
Two magnetometers and an ESP32-C6, laser-cut strips, ordinary magnets, a printed housing. All open source.
Validation
42 cold starts against a digital caliper. Error stayed within 0.62 mm, about 3× better than a commercial sensor.

Try it

Two rows of magnets with slightly different spacing. Each row on its own repeats, so it can't tell you where you are. The difference between them never repeats along the rail, so one reading gives the absolute position.

Track 1 · 36 mm

Part two: seeing the ground ahead

SLIDER couldn’t see a step or a drop ahead. I compared three small laser distance sensors over eight tests, including full sun. The graphs show each sensor’s reading as it crosses the hole and the step: the wide-beam one (green) never saw the hole, while the narrowest (blue) read its depth almost exactly. Fitting both costs about £59, and they don’t interfere.

Over the hole
Over the hole
Over the step
Over the step
The mount
The mount
The test rig
The test rig