Maker Monday Returns With...Slot Cars?

 Originally published on October 14, 2019 by Shaun Behrens
Last updated on February 10, 2020 • 6 minute read

Maker Monday is a show aimed at makers on our YouTube channel. In season one, we did things like build a smart mailbox, integrate a Sonoff S20 with Home Assistant, and build a particulate matter sensor to measure the air quality on New Year's Eve. And now we're back with season two, and we have more projects to show you! In the first episode, we show you how we created a connected start/finish line (that also counts laps) for the slot car track we recently built through our offices.

Slot car starting line

Our starting line has Neopixel LEDs and two infrared sensors connected to an ESP32 microcontroller. The starting line can connect to WiFi because of the built-in WiFi on the ESP32.

Using MQTT, we can send a signal to the starting light that the race has begun. This initiates the LED lights to go from red to green. Once the race has started, sensors attached to the starting light monitor for cars passing on each track, and LED lights turn on to represent which lap the cars are on once a car has gone past (for example: two LED lights means a car has completed two laps). Plus, we send the lap count to PRTG, which displays the number of laps completed on a screen.

How did we do all of this? Here's the Maker Monday video where Bernd explains the magic. There's also a written explanation below if you prefer reading.


Below is a summary of what's inside our start/finish line (even though the video really does explain it well). 

Counting the laps

The infrared sensors are key to counting the laps. The way that they work is they send out an infrared beam and simultaneously send a constant current of 3.3 volts to the ESP32. When an object passes by (in our case, a slot car), the beam is reflected back and the sensor detects this. The moment an object breaks the beam, the infrared sensor stops sending the current to the ESP32. This break in the current is the indication that a slot car has passed by. 

The event of a car passing by causes an interrupt for the program, and the software runs through the interrupt routine. This results in the related LED being turned on.

It really is far easier to see what I mean by watching the video above! 

We took all of this one step further and sent the lap counts to PRTG. But that's a topic for another Maker Monday episode...COMING NEXT WEEK!

If you like this kind of stuff, have a look at the tech behind our slot car track and see the entire racing circuit we built.

Coming up on Maker Monday Season 2

What else is coming up on this season of Maker Monday? Among other things, we equip a stock standard Carrera slot car with LED lights and some sensors, we put together a smart door buzzer, we finish our facial recognition series, and we try out Project Alias. In between, we explain some basic topics related maker projects (like MQTT, the Raspberry Pi, and JSON) in a format called Maker Monday Basic. 

Subscribe to the YouTube channel for weekly Maker Monday videos. 


What did you think of our starting line? And do you have any ideas for other projects we can try out on Maker Monday?