rgmc

Setting up a computer to be used mainly for JMRI

Reply 0
rgmc

Using a Raspberry Pi 400 for JMRI

My home office --- with its filing cabinets, computers, and printers ---
occupies much of the space underneath my model railroad.  For several years I
used one of the office computers to run JMRI's Decoder Pro connected to my NCE
system for programming decoders.  I also used the throttle within Decoder Pro
to test run newly-programmed locos.  The scheme worked except for me being
underneath the layout, unable to see what was going on without bobbing up and
down like a prairie dog.  Due to the crowded (cluttered??) nature of my
basement, I don't have a lot of free floor space so adding another computer
cart or stand proved cumbersome.  

I acquired a Raspberry Pi 400, a very compact computer that sells for $100.
Its keyboard contains the computer electronics. Connecting the included power
supply and mouse as well as adding a monitor completes the system. The computer
has built-in WiFi, Bluetooth, and ethernet interfaces.  The operating system (a
Linux distribution called Raspberry Pi OS) runs from a microSD card.  There is
no fan in the computer, so the RPi400 is very quiet.

The RPi400 has HDMI outputs to drive two monitors if desired.  A surplus VGA
monitor connected nicely using a HDMI-> VGA adapter.  I mounted the monitor high
up on a Lally column next to a five foot tall bank of plastic storage drawers.
The top surface of the drawer cabinets became a standup computer desk.  I
mounted a power strip to a thin plywood panel attached to the side of the
drawer cabinet. I used a USB-to-serial FTDI adapter cable to connect one RPi400
USB port to the serial port on my NCE Power Pro system.  (Note: please see the
JMRI documentation on choosing the adapter.)

Once power was supplied, the RPi400 booted and I was able to connect to my home
network.  I then downloaded and installed the JMIR software for Linux from
http://www.jmri.org.  I copied the entire .jmri folder from the home directory on my
old JMRI computer, and pasted that folder into the home folder of the RPi400.
Then I turned on the NCE Power Pro system and started the JMRI Decoder Pro
program.  I can now see the layout and the programming track while also viewing
the Decoder Pro windows on the monitor.2_113541.jpg 

2_113302.jpg 

 

 

2_113048.jpg If you need (or want) a small form factor computer to dedicate to JMRI use, I
recommend taking a look at the Raspberry Pi 400.

Reply 0
jeffshultz

Nice little setup.

I'm using a maxed out Raspberry Pi 4 running Steve Todd's modified Raspberry PI OS + JMRI distribution. I think I got mine with 8GB of RAM, in part because I could - I had just discovered that the XML files for LokSound decoders could be huge, so I wanted some serious overhead. 

It's nice to use it both for Decoder Pro and with WiThrottle. 

orange70.jpg
Jeff Shultz - MRH Technical Assistant
DCC Features Matrix/My blog index
Modeling a fictional GWI shortline combining three separate areas into one freelance-ish railroad.

Reply 0
pby_fr

Great to see Pi 400 in action

I'm currently running a Pi 3 headless, and a Pi 400 with an old monitor would be a nice upgrade, whenever I would need it (I only use it for EngineDriver at the moment).

I second Steve Todd's image, it's so much better than configuring yourself the Pi. I have enough gremlins  with my Zephyr, I don't need more with Linux! (I installed Lubuntu on an old netbook some years ago for the workshop, I had JMRI running fine at the time, and I only used Firefox and VLC, and done the automatic updates, and now Java isn't anymore found for JMRI!).

Reply 0
rgmc

LokSound

Hi Jeff,  I'm not familiar with LokSound's XML files.  I should hope 8GB can handle them!!

The RPi400 has 4GB IIRC.

Just for fun I now boot the RPi400 from an SSD (cloned with Etcher from the microSD card) connected to a USB port.  Works great and appears to be faster than booting from microSD card.

FWIW, I notice that the Pi 4 might be scarce these days.  RPi400 still seems to be available.

Thank you for mentioning Steve Todd's modifications.  I'll take a look.  FWIW the recent version of Raspberry Pi OS didn't require any mods to get JMRI working on my RPi400 and NCE system.

       Justin

Reply 0
ctxmf74

surface of the drawer cabinets became a standup computer desk

  That's a nice little rig. I'm curious though why you couldn't just set your laptop up there when you needed to use it? ....DaveB

Reply 0
rgmc

Laptop

That would work if you have a laptop.    

Reply 0
Michael Tondee

My planned solution

I run DCC ++ EX using an Ardino Mega and a motor shield hooked up to my desktop PC here in the train room. My eventual solution will be some type of Raspberry PI running everything from a central location on the railroad using phones and some sort of ESP 32 throttles based on Geoff Bunza's excellent design. The 400 looks like a nice little setup and bears investigating, thanks for sharing!

Michael, A.R.S. W4HIJ

 Model Rail, electronics experimenter and "mad scientist" for over 50 years.

Member of  "The Amigos" and staunch disciple of the "Wizard of Monterey"

My Pike: The Blackwater Island Logging&Mining Co.

Reply 0
rgmc

Your planned solution

Hi Michael

Your idea sounds great, especially for someone that doesn't already have (or doesn't want) a system such as the NCE.  The prices of Arduino and Pi et al are amazingly low.  A person who likes to explore the electronics/computer side of our MR hobby might save a lot of money while also have a lot of fun building their own DCC system.  I look forward to learning how it works on your Blackwater system.  

          Justin

Reply 0
brochhau

I'll second the Arduino with

I'll second the Arduino with DCC++. What a great, dirt cheap DCC system. My son's layout is set up that way. We used to do the RPi 4 thing but it took so long to boot. 

With the Arduino, you can get "instant on" but still have the luxury of logging onto it remotely from a more powerful computer elsewhere in the house running jmri.

Want a new throttle? Just go to a big box store and ask for the cheapest android phone they have, usually less than $20. 

For under $100, we have two layouts running DCC++ with multiple wireless throttles. 

That said, the long term plan is do have a setup like Justin. The problem we've run into is when we turn everything off for the night, firing everything back up takes a while. I suppose we could leave everything on and only turn the track power off. I'm wondering how you handle that? 

Reply 0
Prof_Klyzlr

Detail : "DCC++" VS "DCC++ EX"

Dear MRHers,

Just to avoid confusion down the line:

- "DCC++" uses an Arduino UNO + Motor Shield to form _part_ of a DCC "Command station + Booster" assembly. However, this assembly has no "Brains",
IE no software to determine _which_ DCC commands need to be generated and _when_. 

This minor issue is "overcome" by _requring_ some-form of computer, (RasPi, PC, whatever), running JMRI.

Said another way, a "DCC++" rig is NOT "ready to Run Trains" on-its-own,
it _still_ needs a PC to be "complete and functional"
(as well as providing the WiFi "Input" for the SmartPhone "Throttle")

- as Ref by "BrochHau" above, "DCC++ EX" is an evolution of the original "DCC++",
using a larger Arduino MEGA WiFi board to handle handle the _complete_ task,
INC the "software bit" _and_ the "WiFi Access Point" throttle-input,
(IE the bit previously requiring the seperate RasPi/computer + JMRI).

- Just to muddy the waters, there is variant of the "DCC++ EX" code designed to work on the smaller/original Arduino UNO, which _does_ still require an external computer + JMRI unit...

Soooooo,

When someone says "DCC++" in the generic sense, pay attention to the details,
as not all "DCC++" rigs are the same!

Happy Modelling, 
Aim to Improve, 
Prof Klyzlr 

PS for reference, for those seeking to build their own "DCC++" rig on an Arduino UNO, Read and Heed!
https://model-railroad-hobbyist.com/node/35942#comment-377882

Reply 0
Michael Tondee

For clarification

I have both an Uno and a Polulo motor shield running the original DCC ++ and a Mega with an Arduino shield running the DCC ++EX sketch. In my current setup, they are interchangeable as JMRI and this PC are doing all the work still with the WiFi access and everything. Since I'm mostly just doing a lot of on and off testing, I have not really set up the complete capabilities of the EX yet, that comes a little later. I also have Raspberry Pi 2B here but I'm not using it at all right now as far as the railroad, my desktop is doing it all. My next purchase even before I move forward on the dedicated Pi for the layout will most likely be a Tam Valley Depot booster to make sure the layout has enough power when I start running multiple locos. I was a Digitrax user for many years but I'm all in on a DIY custom system now and I don't think I'll ever go back to the commercial units again, especially with the current state of the art of the US based systems. In my opinion even the "updated" stuff Digitrax is making still looks and seems several years behind the times and I don't think NCE has updated at all. I can't comment on TCS because I have not personally seen their throttles and I don't think their actual system is out yet.

Michael, A.R.S. W4HIJ

 Model Rail, electronics experimenter and "mad scientist" for over 50 years.

Member of  "The Amigos" and staunch disciple of the "Wizard of Monterey"

My Pike: The Blackwater Island Logging&Mining Co.

Reply 0
Steve Hubbard Odyknuck

PI4 Dispatch corner

I too decided to go the PI4  computer.  I built the desk out of an old section of benchwork from a previous layout. dispatch.jpg for dispatching and LCC interface. 

Steve Hubbard, Chardon , Ohio area.  Modeling the C&O mid 50s
Reply 0
Reply