DIY 3D Scanner
Low‑cost, two‑axis IR distance scanner — Arduino + servos + MATLAB visualization
A compact, low‑cost 3D scanner built from an IR distance sensor on a two‑axis pan/tilt rig. The Arduino drives servos to raster the sensor over the target, streams CSV frames over USB, and MATLAB reconstructs depth heatmaps and 3D point clouds.
- Sensing: IR distance sensor calibrated on the 200–800 mm band (inverse model applied on Arduino).
- Motion: two‑axis servo rig (pan + tilt) with serpentine rastering and per‑point averaging for stability.
- Visuals: 2D line scans, depth heatmaps and 3D point clouds generated in MATLAB.
Key technical notes
Calibration used multiple known distances and an inverse model (k / reading + c). The Arduino outputs framed CSV rows between #FRAME_START and #FRAME_END so MATLAB can reliably capture full rasters. The scanning algorithm uses alternating tilt direction per column to reduce motion overhead and backlash.
See the full project report and the extracted text:
Hardware & software
- Arduino (servo control, ADC sampling), two hobby servos, IR distance sensor.
- MATLAB host: serial capture, framing, gridding, heatmap and 3D point cloud generation.
- Design considerations: servo settle time, samples per point, clamp distance to calibrated band, and serpentine sweep to cut time.
Arduino and MATLAB code excerpts are in the project report (linked above).