Mine would be creating pen and paper ciphers for my made up secret communication needs.

  • My dad has been into model trains since before I was born. We built a train layout in the early 2000s when I was in middle school or so. Working on that project helped get me into electronics as we made PCBs for signals and control circuits. Now, 20 some years later, I work in software engineering. My dad wanted to get back into working on the layout and I’m helping him with Arduino programming and Raspberry Pi stuff. He built a stepper motor controller for the turntable and then we built some turnout and light control boards that interface with DCC. We set up JMRI on a Raspberry Pi to drive trains from phones and automate stuff. I also got him into 3D printing and he’s printed a ton of new scenery for the layout after buying his own Ender 3 after using mine quite a bit. We’ve learned various CAD/modeling programs to make 3D prints.

    I also finally got to do something I always wanted to do as a kid, which is to drive the trains from a first-person view. We have gone through a bunch of different variations of putting a Raspberry Pi Zero and camera module on an HO scale railcar. We did some different designs. Our latest design uses an SG-90 micro servo to control the camera angle so you can look left and right. I also 3D printed an enclosure for a regulator, battery charger, and battery that takes track power and powers the Pi.

    It’s pretty fun to be able to sit on the couch with a phone, watching the view on the TV, and drive the train from the other room including operating turnouts. Haven’t yet tried to drive the trains over the Internet yet but I want to, since I live a state away from my parents where the layout is.

    Edit: Here’s a video of the camera car in action! https://www.youtube.com/watch?v=Ls-Rg1TlDOA

    • Very cool! Sounds pretty much like what I have started on mine, I went the full DCC++ route, have an arduino and rpi running the whole layout, with a few other boards helping along the way. At some point I’d love to do full automation of the setup but that’ll be a while. What camera did you use for the rpi and train? I’m running n scale so I’m assuming yours would be larger

      • We built the layout when DCC was first coming out after going to a train show. We ended up picking up one of Digitrax’s first systems (Empire Builder IIRC, with DB150 base station). That’s still what we use for DCC. I designed a LocoNet to serial adapter (MS100 compatible, but very cheap and simple) in college (2010 ish) and we’re using that to connect it up to a Pi 3 running JMRI. Our layout is HO scale. N scale is probably too small for even a Raspberry Pi Zero with camera module, as the setup barely fits on an HO scale car.

        I have set up a DCC++ Ex setup at my house for testing and experiments. Just got a loop of EZ Track on the floor with an Arduino as the base station and another Pi with JMRI that is configured similarly to the real layout.

        Here is an early picture of the camera car design with the servo. I’ve since condensed everything on to one car with a custom 3D printed design. I want to publish it eventually but haven’t had time. I even 3D printed trucks with power pickups in my latest design (just had to buy metal wheel sets to put in them). I also made a tiny Python webserver that has buttons for different servo positions so you can easily move the servo from a browser.

        https://files.mastodon.social/media_attachments/files/110/456/482/672/249/884/original/398d0e7f581517cf.jpg

        https://files.mastodon.social/media_attachments/files/110/456/483/176/756/180/original/3434f015434fb542.jpg

        https://mastodon.social/@CalcProgrammer1/110456485998532640

        For the DCC controlled turnouts, lights, and turntable, I built up an Arduino Nano based DCC decoder from a design I found online and a DCC decoder library that is available in Arduino. Since the layout spans multiple tables, instead of putting a DCC decoder for each table/PCB I just had the one decoder echo the DCC commands as serial messages over a serial bus that spans all the tables. The other boards (turnout controllers, light controllers, and turntable controller) all just have their RX pins wired to the decoder’s TX and can receive commands that way. Turnout controllers are a mix of SG90 micro servo based ones and L293D motor drivers for Tortoise switch machines. Light controllers use transistors to switch 12V outputs on and off to drive bulbs and LEDs. Turntable controller is an EasyDriver based stepper controller with some pre-programmed position offsets for each turntable track (each track position is mapped to a DCC function address).