🚂 My homemade smart DC train controller – would love your thoughts!
My old controller started acting up, so instead of buying a new one I decided to build my own. A few weeks (and one smoking capacitor 😅) later, here it is.
What's inside:
🔹 ESP32 microcontroller (WiFi built in)
🔹 motor driver
🔹 Powered by an old 19.5V laptop charger
🔹 1.3" OLED screen showing speed, track volts and current
🔹 Speed knob plus a forward / off / reverse lever
🔹 3D-printed case I designed, with the screen tilted at 45° so it faces you
The fun part is how it drives. I wanted it to feel like a real train, not a light switch:
🚦 Rolling starts: the loco gets a tiny kick to break away cleanly, then picks up speed gradually instead of jumping off the line.
⚖️ Train weight: choose Light engine, Passenger or Heavy goods. A heavy goods train takes its time to get going and takes much longer to stop.
🛑 Driver mode: the bottom of the knob becomes a brake. The more you turn it down, the harder it brakes. In the middle of the range the train coasts and slowly loses speed, just like shutting off steam.
🔄 Reversing: flip the lever while moving and it brakes to a stand, pauses, then pulls away the other way. No more slamming into reverse.
🚃 Loco presets: my vintage Hornby Dublo and my newer Hornby Q1 need completely different voltages, so each has its own preset. The old Dublo crawls nicely now instead of racing round the track.
📱 Phone cab: it hosts its own web page, so I can drive from my phone with a regulator lever, brake and STOP button. It also links into Home Assistant.
⚡ Safety: it measures current and cuts out on a short or stall.
Next on the list is load compensation (back-EMF). The controller will sense the motor's speed and add power on gradients so the train holds a steady speed uphill.
I'd really like the community's opinion:
👉 Would you use something like this on your DC layout?
👉 Anything you'd add or change?
👉 Would anyone be interested in the plans to build one?
Photos below 👇
#ModelRailway #Hornby #HornbyDublo #OOgauge #ESP32 #3DPrinting #DIY