Robot arm builds table height map with a $3 ultrasonic sensor mimicking bat sonar

lukas_m_ziegler · x · 2026-11-01

A robot arm project by @karolinadubiel mimics bat echolocation using the HC-SR04, the $3 ultrasonic sensor found in every Arduino starter kit, firing a 40 kHz burst. The sensor only returns a single number—distance—so how do you get direction? You move it: a scanning routine sweeps the arm across a grid, pinging at each spot and tagging readings with joint angles, reconstructing a height map of the table from one cheap sensor plus known geometry.

Then it becomes a precision problem: under gravity the shoulder and elbow joints kept stopping short, smearing the map by up to 13 mm. The fix was tightening the joints (post truncated here).

Original post →

More from Embodied

Embodied channel →