Atmel power control for a Lionel train


I've now created a custom peripheral that accepts commands via serial communication. Anything that can "speak" serial can control it. In the computer world, that's just about any programming language, but also other microcontrollers, Arduinos, and even industrial programmable logic controllers (PLCs) and commercial control systems.

I hope this article has given you a glimpse into the design and logic of custom controllers. In my case, it was the next logical step for my Lionel train layout. However, it's also a convenient problem solver in the computer/electronic interface world. This same principle could be used, for instance, to automate a series of button presses on equipment that otherwise didn't have a computer interface.

Quite often, when you find a piece of equipment that includes a computer interface, it's some form of serial communication. I've seen weather stations, digital multimeters, and telescopes, to name a few. Learning the ways of serial communications can often open a wide range of new possibilities.

Your Raspberry Pi in combination with these devices can become a data logger for a weather station and multimeter or a smart star-finder for a telescope. Combine that with the power of the Raspberry Pi as a display interface, and you have a completely customizable controller.


  1. Lionel trains:
  2. ATmega164P:
  3. Arduino programmer/TTL serial interface:

The Author

When Scott isn't playing with his Lionel train layout, he can be found stargazing or programming in Python.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content