A 250 RMB 360-degree lidar: the laser was never the expensive part
The assumption worth killing first: a lidar is expensive because of the laser. It is not. A single-point time-of-flight rangefinder module costs a few dozen yuan and outputs a distance over a serial port. That part of the problem was commoditised years ago.
What is expensive is everything needed to turn one distance reading into a scan. Three problems, in ascending order of annoyance:
- Keep the sensor rotating continuously.
- Get power and data across a joint that never stops turning.
- Know, at every instant, exactly which direction the sensor was pointing.
A rangefinder gives you a distance d. A lidar needs polar coordinates (θ, d). If θ is wrong, every point lands in the wrong place and the map is skewed — not noisy, skewed. And a mechanism designed to spin forever is fundamentally at odds with a cable.
omniLidar, an open-source project documented by a hardware DIY channel, is a worked answer to all three, at a bill of materials around 250 RMB.
Rotating without a slip ring
The textbook solution is a conductive slip ring: brushes riding on rotating metal rings, carrying power and signal through unlimited rotation. An earlier open-source lidar build did exactly that — rotor PCB, stator PCB, slip ring, a flexible coupling to absorb axial misalignment, and an FPGA doing the data accumulation. It works. It is also the reason that build stayed a project: slip rings are precision parts with wear, contact noise and a price.
omniLidar takes a different cut. The base and the scanning head are two separate bodies joined by a magnetic quick-release with four contacts — press it on, it seats in seconds. Anti-tangle is handled by the rotating coupling design rather than by a slip ring, and rotation itself is driven by a dual belt transmission. Belts look crude next to gears, but a belt that slips is recoverable and a belt that breaks costs a few yuan; a gear train that jams takes the motor with it.
Angles come from the motor, not from an index mark. The build uses a 2804 gimbal brushless motor with a built-in AS5600 magnetic encoder — 12-bit, read over I2C, 4,096 counts per revolution, absolute, no homing sequence required. The cheaper alternative is an IR optocoupler and a notch that pulses once per revolution, which is fine if you can tolerate the once-per-turn reference and the extra calibration.
The failure mode nobody warns you about
Belt drives skip teeth. omniLidar's documentation devotes a whole section to it because the consequence is total: skip one tooth and every point after that moment has the wrong angle offset, which turns the map into a spiral. Belt tension, pulley engagement and rotational speed all have to stay conservative. Faster is not better here.
The second hard limit is the rangefinder's sample rate. Points per revolution is capped by how fast the TOF module can produce readings, not by how fast the motor can spin. The earlier FPGA build managed 500 points per revolution at a 2 Hz scan rate — two revolutions per second. Against a commercial scanner that is not a comparison worth making. For scanning a room or giving a slow robot obstacle awareness, it is enough.
From (θ, d) to something visible
The ESP32 does three jobs: read the rangefinder's serial stream, track the angle, and convert polar to Cartesian. A browser page receives the points over WebSocket and draws them on a canvas. Nothing exotic — and the moment the outline of the room starts drawing itself, the project has justified itself.
Adding OTA firmware update is the difference between a demo and a device: change the rotation speed or the filter from a phone on the same Wi-Fi, without unbolting the housing or plugging in a cable.
Bill of materials
| Part | Approx. price | Note |
|---|---|---|
| Single-point TOF rangefinder | ¥50 | Serial output; do not buy the presence-only type |
| ESP32 dev board | ¥25 | Wi-Fi needed for OTA |
| 2804 brushless gimbal motor with encoder | ¥55 | AS5600 onboard, absolute angle |
| Brushless ESC / driver board | ¥60 | FOC driver; a finished board saves debugging |
| Belts, bearings, magnetic contacts | ¥30 | Structural |
| 3D printed parts | ¥30 | Filament or a print service |
| Dupont wires, PSU, screws | ¥15 | Power and misc |
Roughly 250 RMB. The saving against a commercial unit is real; the more valuable output is knowing why the thing stays stable while it spins.
Five things that will cost you an afternoon each
Print tolerance. Pulley bores, bearing seats and the sensor mount are the critical fits: too loose and the head wobbles, too tight and it binds. Reaming a hole is faster than fighting it in firmware.
Centre of mass. A rangefinder bolted to one side of a rotating head is an eccentric load. At low speed it blurs the point cloud; at higher speed it loads the shaft and the belt. Put the module as close to the rotation axis as possible and add counterweight if you cannot.
Motor noise on the supply rail. Sharing a rail between the motor driver and the rangefinder puts ripple straight into the distance readings. Separate rails, bulk capacitance, and keep signal wiring away from motor wiring. Standard advice, routinely skipped.
Do not start with SLAM. The first impulse after seeing a point cloud is to build navigation, and that is where the low scan rate, low point count and undistorted-motion assumptions all bite at once. Scan a room first. Solve one specific problem, then stack.
Eye safety. Rangefinder lasers are typically Class 1, which is safe in normal use — but do not point one into an eye at close range for a long period, and do not lean over the head while it is spinning to check on it.
Source repository: github.com/mquerostudio/omniLidar (GPL-3.0, PlatformIO + VS Code). Printed parts: the omniLidar model on Printables (model/652875), nine STLs covering base, head bracket and pulleys. Core components: a VL53L1X-class TOF module, a 2804 gimbal motor with AS5600, and an ESP32.
If the goal is a navigation-grade scanner, buy one; the point count and scan rate here will not compete. If the goal is a room-scale scanner, a teaching platform, or a slow robot that should stop before it hits the sofa, 250 RMB and a weekend gets you a working one — plus the only real understanding of the three problems that make the commercial version cost what it does.