Design & build guide
Projects
OrbitScan — ultrasonic mapping lab
I’m turning ultrasonic echoes into a map with the Mega 2560: a servo sweep, interrupt-based timing, robust filtering, and a local scan viewer that makes uncertainty visible.
My next question is bigger than “How far away is that object?” I want to understand how a system decides which readings deserve to appear on a map.
OrbitScan combines an HC-SR04 ultrasonic sensor with a servo, LCD, RGB feedback, and two buttons. The head scans a 120-degree arc in 31 positions, collecting three measurements per angle. I reject out-of-range echoes, filter isolated spikes, and preserve unknown readings instead of drawing false empty space.
I explain the architecture in a complete build guide, with a synthetic scan lab, downloadable firmware, exact pin tables, and a measurement worksheet. The local CSV viewer can display serial captures without uploading them. My main trade-off is confidence versus sweep speed: collecting more information takes time.
The problem
I want a distance sensor to explain more than one number. How can I map a scene while showing missing echoes, sample spread, and the limits of sequential scanning?
My contribution
My project focus is the connection between timing, filtering, and a readable interface. This notebook brings together the system design, AI-assisted firmware, a local scan viewer, and a test plan for evaluating the map.
Tools & approach
I capture Echo edges with an interrupt on D18, schedule servo motion without long waits, aggregate three readings at each angle, and send a six-column CSV stream. I separate the pure filtering and sweep logic from hardware I/O so the important boundaries can be tested.
Results & reflection
The package includes a Mega 2560 compilation check and native logic tests. In the browser I can compare synthetic scenes, add noise and dropouts, inspect unknown angles, and import a local scan CSV. My measurement worksheet covers range error, repeatability, sweep time, power stability, and target geometry.
