Trains.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

DCC with Raspberry Pi and JMRI

9512 views
5 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    February 2021
  • 4 posts
DCC with Raspberry Pi and JMRI
Posted by kiloforty on Friday, March 5, 2021 11:47 AM

Can someone simply explain how to setup DCC with a Raspberry Pi.  I've scoured the internet and can't find a simple explanation.  Trying to understand how it works.  The chain as I understand it: iPhone with WiThrottle>Raspberry Pi>Controller?>Train.  What does the controller do and why can't the Raspberry Pi "talk" to the decoder in the locomotive with JMRI?  Wondering if I'm better off just finding a good deal on an NCE DCC Starter Set.  Trying to do DCC on a budget and already have a Raspberry Pi.

  • Member since
    March 2012
  • 219 posts
Posted by Lakeshore Sub on Friday, March 5, 2021 10:18 PM

Hi Kilo,

 

Here is a link to  Youtube video that explains the process of using a Raspberry Pi to do DCC ++ and JMRI.

https://www.youtube.com/watch?v=rtaZ1_L91Bg

The key to looking it up in Google is to use DCC ++.  There are additional videos that may help also.

Scott Sonntag

  • Member since
    January 2012
  • From: Edgewood, WA
  • 54 posts
Posted by 2ManyHobbeez on Friday, March 5, 2021 10:29 PM

Sprog will work as well. That's what I did, added a Sprog to a pi that I already had. I love it. Sold my PowerCab. I use an old Moto X phone with Engine Driver which is a superb app. I found that a pi3 didn't work so well due to lack of memory. I upgraded to a pi4 and it works mo betta.

George

  • Member since
    July 2009
  • From: lavale, md
  • 4,642 posts
Posted by gregc on Saturday, March 6, 2021 8:15 AM
  • phone < bluetooth >
  • < bluetooth > JMRI < proprietary bus >
  • < proprietary bus > command station < track/DCC >
  • < track/DCC > decoder(s)

kiloforty
What does the controller do and why can't the Raspberry Pi "talk" to the decoder in the locomotive with JMRI?

JMRI "talks to" a command station which provides power to the track as well as commands to the decoder.

kiloforty
Trying to do DCC on a budget and already have a Raspberry Pi.

do you need a command-station/booster?

greg - Philadelphia & Reading / Reading

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Saturday, March 6, 2021 12:41 PM

 A Raspberry Pi is just a computer. A small one, but a a computer just like a typical Windows or Mac machine. So just like any normal PC, you need an interface device to your DCC system of choice when using JMRI.

 The design of the Pi is closer to a phone ot tablet than a full blown desktop PC though, which means it is a whole lot smaller, uses a whole lot less power, and there is less to go wrong. Unless you installt he Pi in an enclised case with a fan, there are no moving parts. No hard drives, etc. It's all solid state. They typically run some form of Linux, but witht he JMRI setup there are ways to 99.9% insulate yourself from that - you can get an image to load on an SD card for the Pi that has the Linux already installed, along with JMRI, and it automatically detects which interface you are using and configures JMRI for you, and even starts up the WiThrottle server component of JMRI with a known name being broadcast that you can connect your phone to. 

 You can even go one step further and get a complete DCC system with the Pi-SPROG. That comes complete with an interface device capable of putting out a DCC sisngal at around 3 amps, so it acts like a command station and booster and can directly run trains connected to the track terminals of the device. That also sommunicates to throttles via the Pi's WiFi interface, or if you need more throttles, you can connect a wireless access point to the Pi's Ethernet port to support more simultaneous throttles.

 Most of the interface devices fall into two or three broad categories, depending on which DCC system you have. The are ones that are straight USB, or USB to serial, such as the NCE PowerPro, there are USB to proprietary network like for Digitrax, using the PR4 or the Locobuffer USB, or the NCE USB interface used for the PowerCab, and there are systems that have an Ethernet port on the command station (mostly European systems) so they just connect to the network.

                                          --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    December 2012
  • 72 posts
Posted by aj1s on Sunday, March 7, 2021 4:42 PM

I have a Raspberry Pi (model 4b) with the Pi-SPROG 3, and like it A LOT. I bought the whole system, all assembled and pre-configured, from SPROG USA.

You can either hook up a USB keyboard & mouse, plus a monitor to the Pi, or you can use a VNC app on your Windows/Mac/Linux computer, with its keyboard/mouse/monitor, over WiFi.

I use my laptop to VNC into it when I need to, but you only need that when you want to program decoders, or major layout control stuff.

But just for running trains, I use only my android phone with engine-driver app for a throttle, connected over WiFi to the Pi. 

-- Andy - Arlington TX

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Users Online

There are no community member online

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!