← Back to M.A.S.S. Trap

BUILD WIZARD

Pick a module. Follow the wires. Flash the firmware. Done.

👥 Migrating to terminal block shields? See the Parent's Wiring Guide

Choose Your Build

🎮
Onboard Telemetry
IMU strapped to a Hot Wheels car. 3 tiers: Street (MG24 + built-in), Forensic (XIAO + BNO055), Lab Grade (XIAO + WT901).
GUIDE READY
🏁
Finish Gate
ESP32-S3 + IR sensor + speaker. The main dashboard and race timer.
GUIDE READY
🚩
Start Gate
ESP32-S3 + IR sensor + optional LiDAR. Detects car release and starts the clock.
COMING SOON
🔨
Speed Trap
ESP32-S3 + dual IR sensors. Measures mid-track velocity.
GUIDE READY
🔊
Audio Module
MAX98357A I2S amplifier + speaker. Race announcer and dispatcher voice system.
GUIDE READY
💡
WLED Strip
WS2812B addressable LEDs controlled by a standalone WLED controller. Race state visualization.
GUIDE READY
🚦
Drag Tree
LED traffic light countdown for the start gate. Pro-style staging sequence.
GUIDE READY
🌡
Environment Sensor
BME280 temperature, humidity, and barometric pressure. Air density for drag calculations.
GUIDE READY
🔥
Track Temp Gun
MLX90614 non-contact IR thermometer. Track surface temperature affects tire grip.
GUIDE READY

Onboard Telemetry Logger

Strap an IMU to a Hot Wheels car. Measure g-forces, tilt, and acceleration as it races down the track.

Choose Your Build Tier

Each tier measures acceleration — higher tiers add precision, fusion quality, and data rate.

Tier Comparison

SpecStreetForensicLab Grade
MCUXIAO MG24 SenseXIAO ESP32-S3XIAO ESP32-S3
IMU SensorLSM6DS3TR-C (built-in)Adafruit BNO055WitMotion WT901
Axes6 (accel + gyro)9 (accel + gyro + mag)9 (accel + gyro + mag)
FusionNone (software DIY)Hardware (BNO055 M0+)Kalman filter (48MHz MCU)
Accel Range±2 / 4 / 8 / 16g±2 / 4 / 8 / 16g±2 / 4 / 8 / 16g
Max Data Rate6.66 kHz (raw)100 Hz (fused)200 Hz (fused)
Angle AccuracyDepends on code±0.5° (static)±0.05° (static)
RadioBLE 5.3 / ThreadWiFi / ESP-NOWWiFi / ESP-NOW
InterfaceOn-chip SPII2C (4 wires)UART TTL (4 wires)
IMU Weight0g (built-in)~3.5g (breakout board)~1g (bare module)
IMU Power0.9 mA12 mA20 mA
IMU Price$0 (included)~$15~$34
Total Cost~$13~$28~$42
Best ForQuick demos, weight-limitedScience fair, ESP-NOW meshMax precision, research
WIRING PROGRESS
0 of 4 connections

Parts Needed

💻
Seeed Studio XIAO ESP32-S3
Dual-core WiFi MCU. Tiny enough to ride on a Hot Wheels car.
🎲
Adafruit BNO055 9-DOF IMU Breakout
Accelerometer + gyroscope + magnetometer with onboard sensor fusion. I2C interface.
🔌
4x Dupont Jumper Wires (Female-Female)
Red, Black, Blue, Yellow recommended for color coding. Any F-F jumpers work.
🔋
USB-C Cable
For programming the XIAO and initial testing. Any data-capable USB-C cable.
🔋
Battery Pack (optional)
3.7V LiPo or battery holder for untethered operation on the car.

Connection Map

WireXIAO PinBNO055 PinPurpose
Red 3V3 VIN 3.3V Power
Black GND GND Ground
Blue D4 (GPIO 5) SDA I2C Data
Yellow D5 (GPIO 6) SCL I2C Clock
1
Connect Power (3.3V)
Red wire: XIAO 3V3 → BNO055 VIN
Find the Pin
On the XIAO: The 3V3 pin is on the left side, 2nd pin from the top (when USB-C port faces up).
On the BNO055: The VIN pin is clearly labeled on the board. It accepts 3.3V–5V.
Why Red?
Convention: Red = power, black = ground. Always. This prevents accidentally swapping power and ground, which can fry your components instantly.
2
Connect Ground
Black wire: XIAO GND → BNO055 GND
Find the Pin
On the XIAO: GND is on the left side, 3rd pin from the top.
On the BNO055: GND is labeled on the board, usually right next to VIN.
Safety Check
Power + Ground done! Before connecting data wires, double-check: red goes to 3V3/VIN, black goes to GND/GND. Swapping these is the #1 way to kill electronics. It's happened to all of us.
3
Connect I2C Data (SDA)
Blue wire: XIAO D4 (GPIO 5) → BNO055 SDA
What is I2C?
I2C (pronounced "eye-two-see") is a communication protocol that lets chips talk to each other using just 2 wires: SDA (data) and SCL (clock). The XIAO asks the BNO055 "what's your acceleration?" and the BNO055 answers on these wires. It's like two people passing notes using a shared clipboard.
Pin D4?
The XIAO labels its pins as D0–D10, but internally the ESP32-S3 uses GPIO numbers. D4 = GPIO 5. This is the default SDA (I2C data) pin on the XIAO ESP32-S3. You don't need to remember the GPIO number — the code handles the mapping.
4
Connect I2C Clock (SCL)
Yellow wire: XIAO D5 (GPIO 6) → BNO055 SCL
SDA + SCL = Complete I2C Bus
SCL is the clock signal — it keeps the XIAO and BNO055 in sync, like a metronome. The XIAO controls the clock speed (100kHz or 400kHz). Without SCL, the data on SDA would be meaningless — like listening to someone talk without knowing when each word starts and stops.
That's It!
4 wires. That's the whole connection. I2C is beautiful because you only need 4 wires total (power, ground, data, clock) to talk to incredibly sophisticated sensors. The BNO055 has 3 sensors and a full fusion processor — all accessible through these 4 wires.

✓ WIRING COMPLETE!

All 4 connections verified. Plug the XIAO into your computer via USB-C and proceed to firmware flashing.

Next Steps
1. Plug XIAO into Mac/PC via USB-C
2. Open a terminal and flash the telemetry firmware
3. Open serial monitor — you should see accelerometer readings
4. Strap both boards to a Hot Wheels car and race!

Quick Reference: XIAO ESP32-S3 Pinout

Pin LabelGPIOFunctionUsed By
3V33.3V outputBNO055 VIN
GNDGroundBNO055 GND
D0GPIO 1Digital I/O
D1GPIO 2Digital I/O
D2GPIO 3Digital I/O
D3GPIO 4Digital I/O
D4GPIO 5I2C SDA (default)BNO055 SDA
D5GPIO 6I2C SCL (default)BNO055 SCL
D6GPIO 43UART TX
D7GPIO 44UART RX
D8GPIO 7Digital I/OOnboard LED
D9GPIO 8Digital I/O
D10GPIO 9Digital I/O

🔋 Battery Power Planner

Select your MCU, pick a battery (or enter custom specs), and see your runtime, weight budget, and discharge safety at a glance.

MCU Board
Battery Quick Pick
milliamp-hours (mAh)
amps (A) — from battery datasheet
grams
grams — weigh your car naked
Science Fair Runtime
--
calculating…
Continuous Logging
--
calculating…
Deep Sleep Standby
--
calculating…
Discharge Safety
--
calculating…
Weight Budget
⚡ Enter battery specs above to see your verdict
Firmware Power Tips
Use ESP-NOW (ESP32-S3) or BLE (MG24), not full WiFi. Short radio bursts (1-2ms) vs sustained 150mA+ WiFi draw. The firmware should:
ESP32-S3 (Tier 2/3): Use ESP-NOW only — never call WiFi.begin()
MG24 Sense (Tier 1): Use BLE 5.3 advertisements — 1.95µA deep sleep
WT901 (Tier 3): Draws 20mA continuously when outputting — no sleep mode. Reduce output rate to 10Hz between runs.
• Log IMU data to local flash during the run (no radio needed)
• Send one summary packet after the run ends
• Use deep sleep with accelerometer wake-on-motion between runs
• Disable WiFi/BLE scanning entirely — biggest current hog
Discharge Rate Warning
Small LiPo cells (under 200mAh) often have max discharge = 1C (capacity in amps). A 120mAh cell maxes at 120mA sustained. The XIAO ESP32-S3 can spike to ~150mA during radio TX bursts, but those are <2ms — well within what any LiPo tolerates. The MG24 Sense peaks at ~42mA TX — much more battery-friendly. Avoid sustained WiFi scans regardless of MCU.

Finish Gate: ESP32-S3 + IR Sensor + Audio

The brain of the operation. Hosts the dashboard, records race times, calculates physics, and announces results.

Choose Your Wiring Method

Both methods produce the same result. The terminal block shield is an upgrade, not a necessity.

WIRING PROGRESS
0 of 3 connections

Parts Needed — Dupont Wire Method

💻
ESP32-S3 N16R8 Dev Board (38-pin)
16MB Flash / 8MB PSRAM. The purple AITEXM or any ESP32-S3-WROOM-1 dev board with pin headers.
🔴
IR Break-Beam Sensor Pair
Photoelectric transmitter + receiver (3-wire: VCC, GND, Signal). The car breaks the beam → race stops.
🔊
MAX98357A I2S Amplifier + Speaker (optional)
3W class-D amp. Announces race results, car names, and speed records. Skip this for a silent build.
🔌
Dupont Jumper Wires (Female-Female)
3 wires minimum (IR sensor). 6 wires if adding audio. Color-coded recommended.
🔋
USB-C Cable + 5V Power Supply
USB-C for initial flash. 5V/2A supply for permanent installation (barrel jack or USB).
Dupont Wires Are Fine!
Dupont jumper wires are how every prototype starts. They're quick to connect, easy to rearrange, and free with most sensor kits. The only downside: they can wiggle loose if bumped. If your track lives on stairs and gets kicked by kids, consider upgrading to the terminal block shield later.

Connection Map — IR Sensor

The IR sensor has 3 wires. This is the minimum to get a working finish gate.

WireESP32-S3 PinIR Sensor PinPurpose
Red 3.3V VCC Sensor power (3.3V or 5V)
Black GND GND Ground
Green GPIO 4 OUT / SIG Signal — goes LOW when beam is broken
Dupont Method
Plug the female Dupont connector directly onto the ESP32-S3 header pins. Match the colors: red to 3.3V, black to GND, green (or white) to GPIO 4.

Connection Map — Audio (Optional)

Skip this section if you want a silent build. You can always add audio later.

WireESP32-S3 PinMAX98357A PinPurpose
Red 3.3V VIN Amplifier power
Black GND GND Ground
Orange GPIO 15 BCLK I2S Bit Clock
Yellow GPIO 16 LRC I2S Left/Right Clock
Blue GPIO 17 DIN I2S Data
Speaker Connection
The MAX98357A has two speaker terminals (+ and ). Connect your speaker wires there. Any 4Ω or 8Ω speaker 1-3W works. The audio system is disabled by default in firmware — enable it in the System tab after first boot.
1
Connect IR Sensor Power
Red wire: ESP32-S3 3.3V → IR Sensor VCC
Find the Pin
On the ESP32-S3 dev board: Look for the pin labeled 3V3 (sometimes 3.3V). It’s typically in the top-left corner of the pin header.
On the IR sensor: The VCC wire is usually red (or brown on some sensors). Check the label on the sensor PCB if unsure.
Dupont Method
Slide the female Dupont connector onto the 3V3 header pin. It should click gently. Don’t force it — if it’s hard to push, you might be on the wrong pin.
3.3V vs 5V
Most IR break-beam sensors work at both 3.3V and 5V. Using 3.3V is safer because the ESP32-S3 GPIO pins are 3.3V logic. If your sensor requires 5V power, use the 5V pin for VCC but be aware the signal pin may need a voltage divider. When in doubt, start with 3.3V.
2
Connect IR Sensor Ground
Black wire: ESP32-S3 GND → IR Sensor GND
Find the Pin
On the ESP32-S3: Multiple GND pins exist on most dev boards (usually 2-3). Use any one of them — they’re all connected internally.
On the IR sensor: The GND wire is usually black (or blue on some sensors).
Safety Check
Power + Ground done! Before connecting the signal wire, double-check: red goes to 3.3V/VCC, black goes to GND/GND. Swapping these will fry the sensor instantly. There is no undo.
3
Connect IR Signal Wire
Green wire: ESP32-S3 GPIO 4 → IR Sensor OUT
How It Works
The IR break-beam sensor has two parts: a transmitter (emits invisible infrared light) and a receiver (detects it). When a car rolls between them, the beam is broken and the signal pin goes LOW. The ESP32 ISR (Interrupt Service Routine) catches this at microsecond precision — that’s your race time.
GPIO 4 is the Default
The firmware defaults to GPIO 4 for the primary IR sensor. This is configurable in the dashboard under System → Pin Configuration. You can change it later if GPIO 4 is inconvenient for your wiring layout — any free GPIO works.
Sensor Placement
Mount the transmitter and receiver on opposite sides of the track, at car-height (~15mm above the track surface). The beam should cross the track perpendicular to the direction of travel. The finish line is wherever you place these sensors.

✓ FINISH GATE WIRED!

Core wiring complete. Flash the firmware and you have a working race timer.

First Boot Checklist
1. Plug ESP32-S3 into your computer via USB-C
2. Flash the M.A.S.S. Trap firmware via PlatformIO: pio run -t upload
3. The device creates a WiFi hotspot: MASS-Trap-Setup
4. Connect and configure at 192.168.4.1 — set role to Finish Gate
5. After reboot, open the dashboard at the device’s IP address
6. Wave your hand through the IR beam — you should see FINISHED!
Optional: Add Audio Later
The audio connections (MAX98357A) in the table above can be added anytime. Just wire 5 more connections, enable audio in System settings, and upload WAV files. The finish gate works perfectly without audio.

Quick Reference: Meshnology Shield Pin Map

Screw terminal numbers match GPIO numbers. Find your GPIO, find the terminal.

Terminal #GPIOM.A.S.S. Trap UseWire Color
4GPIO 4IR Sensor (Finish)Green
5GPIO 5IR Sensor 2 (Speed Trap)Optional
15GPIO 15I2S BCLK (Audio)Orange
16GPIO 16I2S LRC (Audio)Yellow
17GPIO 17I2S DIN (Audio)Blue
38GPIO 38LiDAR TX (Start Gate)Teal
39GPIO 39LiDAR RX (Start Gate)Teal
2GPIO 2Status LEDOptional
3V3Sensor powerRed
GNDGroundBlack
5V5V power (barrel jack)Red
Terminal Block Advantage
The terminal numbers match the GPIO numbers. GPIO 4 → Terminal 4. GPIO 15 → Terminal 15. No translation needed. Tighten with a small flathead screwdriver — connections are vibration-proof and won’t wiggle loose when a 10-year-old crashes into the track at full speed.

Audio Module

Add a race announcer to any M.A.S.S. Trap node. Announces car names, speed records, and race results out loud. Choose your hardware below.

Choose Your Audio Hardware
WIRING PROGRESS
0 of 3 connections

Parts Needed

🎵
DY-SV5W Voice Playback Module
Self-contained MP3/WAV player with 5W Class-D amp, TF card slot (up to 32GB), UART/IO/1-Wire control, volume knob. ~$4–$6 on Amazon/AliExpress.
💾
MicroSD / TF Card (up to 32GB, FAT32)
Pre-load with numbered audio files: 00001.mp3, 00002.mp3, etc. The board plays files by number over UART.
🔈
4–8Ω Speaker (3–5W)
Connects to the onboard screw terminals labeled Speaker. Or use the 3.5mm stereo jack for headphones / external amp.
🔌
4 Dupont Jumper Wires
Red (5V), black (GND), blue (UART TX → I01/RXD), green (BUSY playback status).
DIP Switch Setting — UART Mode
Set the 3-position DIP switch to UART Serial Port Mode:

Switch 1: ON    Switch 2: OFF    Switch 3: ON

This gives the ESP32 full control: play/stop/pause, volume, track selection by number, and playback status. Set the switches before powering on.

Connection Map — DY-SV5W

4 wires: power, ground, UART command, and BUSY playback status.

WireESP32-S3 PinDY-SV5W PinPurpose
Red 5V +5V Board power (5V required)
Black GND GND (bottom) Ground (use bottom GND, not power GND)
Blue GPIO 15 RXD / I01 UART data — ESP32 TX → DY-SV5W RX (I01, NOT I00)
Green GPIO 16 (input) BUSY Playback status — LOW = playing, HIGH = idle

UART baud rate: 9600 (default). The DY-SV5W uses a simple binary protocol — send a byte sequence to play track N, set volume, stop, etc.

1
Set DIP Switches & Load TF Card
UART mode (1:ON 2:OFF 3:ON)  |  Copy numbered audio files to FAT32 card
DIP Switch Position
Flip the red DIP switches: 1 = ON, 2 = OFF, 3 = ON. “ON” means pushed toward the “ON” label at the top of the switch block. Do this before applying power.
Audio File Naming
Format a MicroSD card as FAT32 (max 32GB). Create files in the root directory named by number:

00001.mp3 — e.g. “Track Armed”
00002.mp3 — e.g. “Race Started”
00003.mp3 — e.g. “New Record!”

Supports MP3 and WAV. 32GB = thousands of audio files. No more worrying about LittleFS space.
2
Connect Power, UART & BUSY
Red: 5V → +5V  |  Black: GND → GND  |  Blue: GPIO 15 → RXD  |  Green: BUSY → GPIO 16
Four Wires
Red → ESP32 5V pin to DY-SV5W +5V (the board needs 5V, not 3.3V)
Black → ESP32 GND to DY-SV5W bottom GND pin
Blue → ESP32 GPIO 15 (TX) to DY-SV5W RXD/I01 pin (the one labeled RX, NOT I00/TX)
Green → DY-SV5W BUSY pin to ESP32 GPIO 16 (input — firmware reads this to know when audio finishes)
5V Required
Unlike the MAX98357A, the DY-SV5W needs 5V. Use the ESP32’s 5V pin (fed from USB or barrel jack). The 3.3V pin won’t work — the board’s amp needs the full 5V rail.
UART Level Shifting?
The DY-SV5W RXD pin accepts 3.3V logic from the ESP32 directly — no level shifter needed. The ESP32’s 3.3V HIGH is above the board’s logic threshold.
3
Connect Speaker
Speaker wires to screw terminals or 3.5mm jack
Speaker
Connect a 4–8Ω speaker (3–5W) to the screw terminals labeled Speaker on the DY-SV5W board. Polarity doesn’t matter for a single speaker — either wire to either terminal. Alternatively, plug headphones or an external amp into the 3.5mm stereo jack.
Volume Control
The blue potentiometer on the board adjusts volume with a small flathead screwdriver — clockwise for louder, counterclockwise for quieter. You can also set volume via UART command (0–30). The knob acts as a hardware ceiling — start at half rotation and dial in once you hear it.

✓ AUDIO MODULE WIRED!

Hardware connected. Now enable it in firmware and load your audio files.

Enable Audio in Firmware
1. Open the dashboard at your device’s IP address
2. Go to the System tab → Audio section
3. Check Enable Audio
4. Click Save, then Reboot
5. After reboot, go to the Audio tab to manage sound files
Audio File Format
DY-SV5W: MP3 or WAV on a FAT32 TF card (up to 32GB). Files named 00001.mp3 through 65535.mp3. Volume: 0–30 via UART or potentiometer.

MAX98357A: WAV format only, 16kHz, 16-bit or 8-bit, mono. Stored on ESP32 LittleFS (~9.9MB). Volume: 0–21 in System settings.

Speed Trap: Dual IR Sensors

A dedicated ESP32-S3 with two IR break-beam sensors at a known distance apart. Measures mid-track velocity and sends it to the finish gate via ESP-NOW.

WIRING PROGRESS
0 of 4 connections

Parts Needed

💻
ESP32-S3 N16R8 Dev Board (38-pin)
Dedicated board for the speed trap. Same model as finish and start gates — 16MB Flash / 8MB PSRAM.
🔴
2× IR Break-Beam Sensor Pairs
Two complete pairs (transmitter + receiver each). One for the entry beam, one for the exit beam. 3-wire: VCC, GND, Signal.
🔌
Dupont Jumper Wires (6 minimum)
2× red (VCC), 2× black (GND), 1× green (signal 1), 1× white (signal 2). Power can share rails.
🔋
USB-C Cable + 5V Power Supply
USB-C for initial flash. 5V/2A for permanent installation.
📏
Ruler or Tape Measure
You must measure the exact distance between the two sensors. Speed = distance ÷ time. Precision matters.
🔨
Mounting Hardware
Something to hold both sensor pairs rigidly at a fixed, known distance apart. Hot glue, 3D-printed brackets, or tape on a ruler all work.

Connection Map — Sensor 1 (Entry)

The first sensor the car crosses. This starts the speed measurement timer.

WireESP32-S3 PinIR Sensor 1 PinPurpose
Red 3.3V VCC Sensor 1 power
Black GND GND Ground
Green GPIO 4 OUT / SIG Entry beam — first trigger

Connection Map — Sensor 2 (Exit)

The second sensor the car crosses. The time difference between sensors gives you speed.

WireESP32-S3 PinIR Sensor 2 PinPurpose
Red 3.3V (shared) VCC Sensor 2 power
Black GND (shared) GND Ground
White GPIO 5 OUT / SIG Exit beam — second trigger
Sharing Power Rails
Both sensors can share the same 3.3V and GND pins on the ESP32-S3. Most dev boards have multiple GND pins — use two different ones if you prefer cleaner wiring. The signal wires must be on separate GPIOs (4 and 5).
1
Connect Sensor 1 Power
Red: 3.3V → VCC  |  Black: GND → GND
Entry Sensor
This is the sensor the car will cross first. Connect red to 3.3V and black to GND. Same as wiring any IR break-beam sensor.
2
Connect Sensor 1 Signal
Green: GPIO 4 → Sensor 1 OUT
Entry Trigger
Connect the green wire from ESP32-S3 GPIO 4 to Sensor 1’s signal pin (OUT or SIG). When the car breaks this beam, the firmware captures a microsecond-precision timestamp — this is the “start” of the speed measurement.
3
Connect Sensor 2 Power
Red: 3.3V → VCC  |  Black: GND → GND (can share power rails)
Exit Sensor
Wire the second IR sensor’s power the same way. You can share the 3.3V and GND pins with Sensor 1 — the ESP32-S3 can supply both sensors easily. Use a second GND pin or splice the wires if you prefer.
4
Connect Sensor 2 Signal
White: GPIO 5 → Sensor 2 OUT
Exit Trigger
Connect the white wire from ESP32-S3 GPIO 5 to Sensor 2’s signal pin. When the car breaks this beam, the firmware captures a second timestamp. Speed = sensor spacing ÷ time between triggers.
Why GPIO 4 and GPIO 5?
These are the firmware defaults for the speed trap’s dual-ISR system. Both pins support hardware interrupts with IRAM_ATTR handlers and spinlock-protected 64-bit timestamps. The pin assignment is configurable in the device config if needed.

✓ SPEED TRAP WIRED!

Both sensors connected. Now measure your sensor spacing, flash the firmware, and configure the device.

Critical: Measure Sensor Spacing
The distance between Sensor 1 and Sensor 2 directly determines speed accuracy. Use a ruler or tape measure. Measure center-to-center (where the beams cross the track), to the nearest millimeter.

Enter this value in the device config as sensor_spacing_m in meters. For example:
• 10cm spacing = 0.100
• 15cm spacing = 0.150
• 20cm spacing = 0.200

Wider spacing = more accurate (longer measurement window). 10–20cm is the sweet spot for 1:64 scale Hot Wheels.
Setup Checklist
1. Flash firmware via USB: pio run -t upload
2. Connect to the setup hotspot: MASS-Trap-Setup
3. Set role to Speed Trap in the wizard at 192.168.4.1
4. After reboot, verify both sensors on the speed trap status page
5. Enter the exact sensor spacing in System → Config
6. The speed trap auto-discovers the finish gate via ESP-NOW — no manual pairing needed
Mounting Tips
• Both sensors must be at the same height, perpendicular to the track
• Aim the beams at car body height (~15mm above track), not wheel height
• Mount rigidly — any wobble changes the effective spacing and corrupts measurements
• The car must cross Sensor 1 first, then Sensor 2. Place them in the direction of travel.

WLED Strip: Addressable LED Race Visualization

A separate WLED controller drives WS2812B LED strips. The finish gate sends HTTP commands to change effects based on race state — no wiring between the ESP32 and LEDs.

SETUP PROGRESS
0 of 3 connections

Parts Needed

💡
WLED-Compatible Controller
ESP32 or ESP8266 running WLED firmware. BTF-LIGHTING controllers work out of the box. ~$8–$15.
🌈
WS2812B Addressable LED Strip
Any length. 60 LEDs/m is standard, 144/m for dense effects. 5V power. The M.A.S.S. Trap fleet uses a 1000-LED BTF strip.
5V Power Supply (sized for your strip)
Rule of thumb: 60mA per LED at full white. 300 LEDs = 18A = 90W minimum. Never power long strips from the controller’s USB port.
🔌
3-Pin JST or Screw Terminal Connectors
Data (green/white), +5V (red), Ground (black). Most strips come with pre-soldered JST connectors.
1
Flash WLED Firmware to the Controller

Visit install.wled.me in Chrome and flash directly from the browser — no tools needed.

Already Running WLED?
If your controller came pre-flashed (BTF-LIGHTING, QuinLED, etc.), skip this step. Check by connecting to the controller’s WiFi hotspot — if you see the WLED UI, you’re good.
2
Connect WLED to Your WiFi Network

Connect to the WLED hotspot (WLED-AP), open 4.3.2.1 in a browser, and enter your WiFi credentials under WiFi Settings.

After reboot, find the WLED controller’s IP address on your router or use ping wled-XXXX.local.

Static IP Recommended
Assign a static IP to the WLED controller in your router so the M.A.S.S. Trap always knows where to find it. The fleet currently uses 192.168.1.159.
3
Set WLED Host in M.A.S.S. Trap Config

On the finish gate, go to System → Config and set the WLED Host field to the controller’s IP address (e.g., 192.168.1.159).

Save and reboot. The finish gate will now send HTTP API calls to WLED on every race state change:

Race StateWLED EffectDescription
IDLEConfigurableAmbient/standby effect
ARMEDConfigurableReady — waiting for car
RACINGConfigurableCar on track
FINISHEDConfigurableCelebration / result display
No Wires to the ESP32
WLED integration is 100% over WiFi — the finish gate sends HTTP requests to the WLED controller’s API. The LED strip connects to the WLED controller only. Zero wires between the ESP32 and the LEDs.

✓ WLED CONNECTED!

Your LED strip is now linked to the race state machine. Effects change automatically on ARM, RACE, and FINISH.

Tuning Effects
Browse effects in the WLED web UI, note the effect ID numbers, and set them in M.A.S.S. Trap’s config for each race state. Fan favorites: Rainbow Runner (idle), Police (armed), Chase (racing), Fireworks (finished).

Drag Tree: LED Traffic Light Start Sequence

A classic drag racing countdown on the start gate — red, yellow, yellow, yellow, green. Wired directly to ESP32 GPIO pins through current-limiting resistors.

WIRING PROGRESS
0 of 4 connections

Parts Needed

🔴
5mm LEDs: 2× Red, 3× Yellow, 2× Green
Standard through-hole 5mm LEDs. The Adeept Mini Traffic Light modules come pre-wired with R/Y/G on a single PCB.
220Ω Resistors (one per LED)
Current limiting. 220Ω gives ~10mA at 3.3V for standard LEDs. Use 330Ω for ultra-bright LEDs to avoid blinding the 10-year-old.
🔌
Dupont Jumper Wires
One per LED plus a shared ground. If using traffic light modules, they come with headers.
💻
Start Gate ESP32-S3
The drag tree wires to the start gate node. The LEDs visualize the countdown sequence on the same device that detects the car launch.

Connection Map — Drag Tree LEDs

Each LED gets its own GPIO pin through a 220Ω resistor. Accent LEDs share a common ground. These GPIO assignments are preliminary — firmware support is coming.

LEDColorESP32-S3 PinSequence Role
Stage 1 Red GPIO 6 Pre-stage — car approaching
Stage 2 Red GPIO 7 Staged — car in position
Amber 1 Yellow GPIO 15* Countdown 3…
Amber 2 Yellow GPIO 16* Countdown 2…
Amber 3 Yellow GPIO 17* Countdown 1…
Green 1 Green GPIO 18 GO!
Green 2 Green GPIO 21 GO! (redundancy)
Common GND Shared ground for all LEDs

*GPIO 15–17 are shared with audio on the finish gate. On the start gate, these pins are free since audio is typically on the finish gate only.

1
Add Resistors to Each LED

Solder or crimp a 220Ω resistor to the anode (long leg) of each LED. If using traffic light modules, the resistors are already on the PCB — skip this step.

LED Polarity
LEDs have a direction. The longer leg is positive (anode) — goes to GPIO through the resistor. The shorter leg is negative (cathode) — goes to GND.
2
Wire LEDs to Start Gate GPIO Pins

Connect each LED’s resistor lead to the corresponding GPIO pin. Connect all cathodes to a shared GND rail.

Arrange physically in drag tree order: Red → Red → Yellow → Yellow → Yellow → Green → Green, top to bottom.

3
Mount the Drag Tree

Mount the LEDs vertically next to the start gate, visible to the operator at the top of the track. Options:

• 3D-printed bracket (STL file coming soon)
• Drill holes in a strip of wood or acrylic
• Hot glue to a popsicle stick tower (Ben-approved method)

4
Test the Sequence

After flashing firmware with drag tree support, ARM the track and watch the countdown sequence fire.

Firmware Support: Coming Soon
The drag tree GPIO definitions and countdown sequence are on the firmware roadmap. The hardware guide is ready so you can wire it now and it’ll light up when the firmware update drops. Check GitHub Releases for updates.

✓ DRAG TREE WIRED!

7 LEDs mounted and wired. When firmware support lands, your start gate will have a real drag strip countdown.

Environment Sensor: BME280 / BMP280

Measures temperature, humidity, and barometric pressure. Air density affects aerodynamic drag at scale — this sensor tells you if race conditions changed between runs.

WIRING PROGRESS
0 of 3 connections

Parts Needed

🌡
BME280 or BMP280 Breakout Board
BME280 = temp + humidity + pressure (~$3). BMP280 = temp + pressure only (~$1.50). Both work. The “E” adds humidity. I2C interface.
🔌
4 Dupont Jumper Wires (Female-Female)
Red (3.3V), black (GND), blue (SDA), yellow (SCL). I2C only needs 4 wires total.
💻
Any M.A.S.S. Trap ESP32-S3 Node
Best on the finish gate (logs data with race results), but works on any node. Shares the I2C bus with other sensors.

Connection Map — BME280 / BMP280

Standard I2C: 4 wires. Multiple I2C devices can share the same SDA/SCL bus.

WireESP32-S3 PinBME280 PinPurpose
Red 3.3V VIN / VCC Sensor power (3.3V safe)
Black GND GND Ground
Blue GPIO 8 SDA I2C data
Yellow GPIO 9 SCL I2C clock

Default I2C address: 0x76 (or 0x77 if SDO pin is pulled high). The diagnostics page auto-detects either address.

1
Wire 4 Connections (VCC, GND, SDA, SCL)

Connect the 4 wires per the table above. I2C is bus-based — if you already have another I2C device on GPIO 8/9, just add these wires in parallel (same pins, shared bus).

3.3V Only!
The BME280 is a 3.3V sensor. Some breakout boards have a voltage regulator and accept 5V on VIN, but check your board’s documentation. When in doubt, use the 3.3V pin.
2
Verify on Diagnostics Page

Reboot the device, then open the System page and run diagnostics. Under the I2C Bus Scan section, you should see:

0x76: BME280/BMP280  or  0x77: BME280/BMP280

If neither address appears, check your wiring — I2C is picky about loose connections.

3
Position the Sensor

Mount the sensor near the track but not directly on it — you want ambient air readings, not radiant heat from the track surface.

Firmware Support: Coming Soon
The I2C bus scan already detects the BME280. Automatic environment logging with each race result is on the roadmap. Wire it now — the hardware is ready, the data pipeline is next.
Science Fair Gold
Logging temperature, humidity, and pressure with every race run lets you prove controlled variables. “Ambient conditions were constant across all trials” — that’s an A+ sentence in any lab report.

✓ ENVIRONMENT SENSOR CONNECTED!

BME280 detected on the I2C bus. Temperature, humidity, and pressure data available for race condition logging.

Track Temp Gun: MLX90614 IR Thermometer

Non-contact infrared temperature sensor. Point it at the track surface to measure temperature without touching — because track temperature affects tire grip and rolling resistance.

WIRING PROGRESS
0 of 3 connections

Parts Needed

🔥
MLX90614 IR Temperature Sensor
Two variants: GY-906 (general FOV, ~$6) or MLX90614ESF-DCI (narrow 5° FOV, ~$15, better for aiming at a specific track section). Both I2C.
🔌
4 Dupont Jumper Wires (Female-Female)
Same I2C bus as the BME280 — if you already wired one, you’re sharing SDA/SCL. Just add VCC and GND.
💻
Any M.A.S.S. Trap ESP32-S3 Node
Best on the finish gate or start gate, pointed at the track surface near the sensor line.

Connection Map — MLX90614

Same I2C bus as other sensors. Shares GPIO 8 (SDA) and GPIO 9 (SCL).

WireESP32-S3 PinMLX90614 PinPurpose
Red 3.3V VCC Sensor power (3.3V)
Black GND GND Ground
Blue GPIO 8 SDA I2C data (shared bus)
Yellow GPIO 9 SCL I2C clock (shared bus)

Default I2C address: 0x5A. Coexists on the same bus as BME280 (0x76/0x77) — different addresses, no conflict.

1
Wire 4 Connections (VCC, GND, SDA, SCL)

Connect the 4 wires per the table above. If the BME280 is already wired, you’re sharing the same SDA/SCL lines — just splice into the existing bus.

DCI Variant: Cable Extension
The MLX90614ESF-DCI version comes with a 50cm cable and a remote sensor head. This lets you mount the sensor head near the track while keeping the ESP32 further away. Great for tight spaces.
2
Verify on Diagnostics Page

Reboot the device and run diagnostics from the System page. Under the I2C Bus Scan, look for:

0x5A: MLX90614 (IR Temp)

If you have both the BME280 and MLX90614, you should see two devices on the I2C scan — one at 0x76 and one at 0x5A.

3
Aim at the Track Surface

Mount the sensor so it points down at the track surface at a 30–45° angle, about 3–5cm above the track. The field of view determines the measurement area:

GY-906 (general FOV): Wide cone, ~35°. Mount closer for a smaller spot.
DCI (narrow FOV): Tight 5° cone. Can measure a specific section from further away.

Why Track Temperature Matters
Hot Wheels tires are plastic. At higher temperatures, the material softens slightly, increasing rolling resistance and changing grip characteristics. A 10°C track temperature difference between morning and afternoon science fair runs is a confounding variable — this sensor lets you prove it was (or wasn’t) a factor.
Firmware Support: Coming Soon
The I2C bus scan already detects the MLX90614 at address 0x5A. Automatic track temperature logging per race is on the roadmap. The hardware inventory has both GY-906 (general) and DCI (narrow) variants ready to go.

✓ TRACK TEMP GUN CONNECTED!

MLX90614 detected on the I2C bus. Non-contact track surface temperature measurement is ready.