
Q: In your Ask MR question “Is there a way to automatically slow DCC locomotives?” you mentioned Arduino, a DCC-connected programmable system. Is that like Java Model Railroad Interface (JMRI) software, and if so, how do the two compare? — Bruce Fogwell
A: Hi, Bruce. Arduino isn’t software — it’s hardware. An Arduino is a tiny computer, called a “microcontroller,” with its own programming language. Arduinos are open source, meaning that how they are made and the firmware that runs them is public knowledge. Anyone can make and distribute them and their software, they’re extremely inexpensive, and upgrades are being made all the time.
Plug-in circuit modules called “shields” let you connect an Arduino’s inputs and outputs to components like lights, displays, speakers, motors, solenoids, sensors, and other systems useful on a model railroad. Modelers have been using them for such layout jobs as detecting block occupancy, controlling signals, indexing turntables, playing sound effects, lining turnouts, running lighting effects, and more.
Java Model Railroad Interface, as its name implies, is written in the Java programming language. Arduinos have their own open-source programming language. (It’s similar to C++, if that means anything to you. It doesn’t to me, since I flunked out of computer programming class.) So Arduino and JMRI don’t work directly together. But both can interface with other digital systems, including DCC, so sending data and signals from an Arduino to a JMRI-equipped computer is theoretically possible. Though both do their jobs so well on their own that I can’t imagine a case where you’d need to.
We’ve published numerous articles on ways you can use an Arduino on a model railroad. These include:
- “Scratchbuild a transfer table” in August 2023’s issue
- “Touchscreen turnout control” in October 2022
- “Push-button staging solution” in August 2018
- “Build a signal system with Arduino microcontrollers” in December 2016
- “Animate structures with microcontrollers” in April 2016
- “RFID for model railroad operations” in December 2014
- “High-tech turnout controls” in June 2013
We’ve also got a book on how to use an Arduino on a model railroad coming out in early 2025. Those should open your eyes to what’s possible and what’s coming in the future of our hobby.
Send us your questions
Have a question about modeling, operation, or prototype railroads? Send it to us at AskTrains@Trains.com. Be sure to put “Ask MR” in the subject.
Share this article
