ESP32
Summary
The ESP32 is a microcontroller that Sean Hodgins used as the central control system for his tiny model train project in the episode "I Built A Tiny Model Train and it Nearly Broke My Brain." This versatile chip served as the brain of the final working system after Sean Hodgins successfully pivoted to a magnetic motor approach. The ESP32 runs custom firmware that creates a web server on the local network, providing an interface to control multiple aspects of the train installation including motor control, wireless LED systems, and dynamic lighting effects that simulate the sun's position throughout the day.
What Was Said
Sean Hodgins presented the ESP32 as the solution that tied together all the various components of his train system. He demonstrated its capabilities by showing the web interface it hosts at 16:13, explaining: "this is an ESP32, so the firmware is running a web server on my network. And it gives me the option to toggle things on and off from here."
He detailed the specific controls available through the interface: "And so, this is the train that makes the train move. LEDs, that's the wireless LEDs on board, which I'll show you in a second. And then sky, that's the LED hoop that's over top." The wireless LEDs he referenced are powered by the Adafruit Wireless Coil system integrated into the train.
Particularly impressive was the ESP32's time-based lighting simulation feature. Sean Hodgins explained that it handles "the lighting on on top which actually mimics where the sun would be based on the current time on the server." The firmware uses the server's clock to calculate where the sun would be in the sky, controlling overhead lighting to display orange and yellow hues during daylight hours, moving the light position around a ring as time progresses, and switching to moonlight simulation after sunset.
History
I Built A Tiny Model Train and it Nearly Broke My Brain
In this episode, the ESP32 emerged as the final piece that brought Sean Hodgins' challenging train project together. After struggling with various motor designs and eventually settling on a magnetic motor solution, he needed a controller that could manage multiple systems simultaneously.
The ESP32's role extended beyond simple motor control. Sean Hodgins programmed it to run a complete web server accessible from his local network, creating a user-friendly interface for the train installation. This web interface provided toggle switches for three main systems: the magnetic motor that drives the train, the Adafruit Wireless Coil wireless LED system built into the train cars, and the overhead LED hoop that provides ambient lighting.
The most sophisticated feature Sean Hodgins implemented was the dynamic sky simulation. Rather than static lighting, he programmed the ESP32 to calculate the theoretical position of the sun based on real time, creating a lighting effect that changes throughout the day. During daylight hours, the overhead LEDs glow with warm orange and yellow tones, and the position of this "sun" moves around the circular track as time passes, mimicking the sun's arc across the sky. When the calculated sunset time arrives, the system transitions to a cooler moonlight effect, adding a layer of realism to the miniature train display.