Wiring
Every electrical connection in the scanner, where each part sits, and a list to tick off at the bench. This is the build with the LED projector. Taken from the repository's README, parts list and firmware notes as of 17 November 2026.
- Board
- Raspberry Pi Pico or ESP32-S3-Pico
- Projector
- LED, on an IRLB8721
- Line lasers
- Two, or four
- Power
- 5 V from the board's USB
Schematic
Pin numbers are the physical pins on the board's edge. Both boards use the same physical pins, so only the GPIO names change.
The colours show what a wire carries; use whatever wire colours you have. Each ⏚ symbol goes to one shared ground on the perfboard, and one wire takes that ground to pin 38.
Where everything sits
Seen from behind, the way you hold it. The camera faces away from you; the lasers and the projector cartridge slide in from the back.
Part pinouts
PN2222 transistor (Q1, Q2)
E to ground, B to the 1 kΩ, C to the laser's black wire. This is the Adafruit part. Some “2N2222” parts are C-B-E, so check the datasheet of what arrives.
IRLB8721 MOSFET (Q3)
G to pin 9 directly, plus 10 kΩ to ground. D to the 8.2 Ω resistor. S to ground. The metal tab is also the drain, so keep it off other wires.
Kill toggle MTS-102
The middle lug takes 5 V from pin 40. One outer lug feeds the lasers' red wires and the LED's +; the other outer lug stays empty. The lever joins the middle lug to the lug on the opposite side, so check with a meter which lug is live in your “on” position.
Board pins used
Seen from the top, USB end up. In the grip the USB end points down.
IMU breakout (Adafruit LSM6DSOX): use only VIN, GND, SCL and SDA. LED star: the pads are marked + and −.
Connection checklist
Tick each wire as you solder it. The ticks stay in this browser only. 0 of 15 done.
| Done | From | To | Runs |
|---|---|---|---|
| Kill toggle, middle lug | grip → back cover | ||
| Red wire of the V laser and the H laser; LED star + | in the head | ||
| Q1 collector | head → grip | ||
| Q2 collector | head → grip | ||
| 8.2 Ω 3 W resistor, then Q3 drain | head → grip | ||
| 1 kΩ to Q1 base | perfboard | ||
| 1 kΩ to Q2 base | perfboard | ||
| Q3 gate, and 10 kΩ from the gate to ground | perfboard | ||
| Perfboard ground, then board pin 38 (GND) | perfboard | ||
| Board pin 36 (3V3) | back cover → grip | ||
| Board pin 6 (GP4) / pin 7 (GP5) | back cover → grip | ||
| Board pin 8 (GND, next to pins 6 and 7) | back cover → grip | ||
| Board pin 20 (GP15) | in the grip | ||
| Board pin 18 (GND) | in the grip | ||
| The PC, two cables | out of the grip |
Before you power it
Lasers
The line lasers are Class 3R. Never look into them, and point the scanner at a wall or a sheet of paper while testing.
Power budget
The LED draws about 340 mA and each laser a few tens of mA, so about 0.45 A in all with two lasers, and a little more with four. A USB 2.0 port is rated for 0.5 A. With four lasers, use a USB 3 port (0.9 A) or a powered hub.
First test with the toggle off
Plug in the board and send HELLO in a serial terminal; it should answer with imu=LSM6DSOX. Then switch the toggle on and try EMIT 20 0 0, EMIT 0 20 0 and EMIT 0 0 20. The firmware turns everything off 1.5 s after the PC goes quiet.
Keep the emitters off during reset (optional)
A 10 kΩ resistor from each transistor base to ground keeps the lasers dark while the board is in reset or in boot mode.
Heat
The 8.2 Ω resistor dissipates about 1 W and gets warm. Leave it room on the perfboard, away from the plastic.
Wires to the head
Run them through the slot under the camera: the camera USB, one +5 V to the toggle, three returns (V, H, LED) and four IMU wires. Sleeve each joint with heat-shrink.
