JMRI on Raspberry Pi

If you have been following my previous blogs then you would have seen my blogs on Arduino, JMRI and CMRI with an N-gauge layout. This has been changed to a OO-gauge so I will be starting from scratch. This allows me to change some things so this time I will be running JMRI on a Raspberry pi and DCC++ controller on the Arduino for train control. I also hope to still run CMRI for occupied sensing and accessory control. So, to start it all off this blog will deal with the Raspberry pi setup with JMRI.

First a few things about the pi and the setup I will be doing. The Pi is a small phone size computer which runs a Linux operating system. It has a solid-state hard drive (SD card) so is very quick to start up. You can connect a HDMI monitor and USB accessories and has Ethernet connection on board. The newer pi's come with built in WiFi if you have a strong WiFi signal.

I will be running the pi as a remote system connecting to it from a window machine via VNC. I will also be using Ethernet connection as my WiFi in the den is not excellent. As I am only connecting remotely the only connection to the pi will be the Ethernet connection the power supply and the connection to the Arduino.

To get started we need a micro SD card with about 8 Gb or greater, I will be using 16 Gb as this gives more room for expansion without having to reinstall all the setup.

If you have an old SD card and have already tried installing an operating system on it or have problems seeing the full capacity of the SD card, then down load SDformatter which I have found to be very good over the years at getting the SD card back to full capacity. LINK - https://www.sdcard.org/downloads/formatter_4/eula_windows/index.html

So now you have your SD card ready it is time in put the Raspberry pi files across to it, so it will install the operating system Noobs. Go to the below link and download the zip file Noobs.

NOOBS

Once you have this download unzip the file and copy all the contents from in the Noobs directory onto you SD card (just select all and drag to the SD card). This will take a few minutes to copy across.

 

For the initial setup we will need to connect the Pi up with a USB mouse and keyboard, a HDMI monitor, power supply and Ethernet connection. Once you have this all connected with the power switched off put the SD card into the SD slot on the back of the card.

Turn on your monitor and set the HDMI channel then turn on the Pi. If all has gone well, you should initially see a rainbow screen then it will go to the initial Raspberry Pi option screen. Select the Raspbian and click Install. The Pi operating system will now be installed.

 

Once this has finished the pi will boot up into the Raspberry Pi desktop which is like the windows desktop. Follow the onscreen instructions make a note of the password you enter and the ip address if it is given. We will need this later, if the ip address is not given then hover over the top right arrows and if you have connected successfully to you network then the ip address will pop up.

 

Now we will enable some settings, so we can remote connect to the pi. Click on the top left Raspberry symbol which will give a drop-down menu. Select preferences then Raspberry Pi Configuration. This will bring up the configuration menu. Under the Interface tab enable all the fields except the camera. Click OK and you will be prompted to reboot the pi. Select yes to reboot, the pi is now ready to remote connect to it.

From a PC down load VNC viewer from the link below.

https://www.realvnc.com/en/connect/download/viewer/

Once you have installed this on the windows machine run the program and enter the Pi IP address into the top input box and click enter. You should be prompted for the user name and password to your pi. If you have not changed anything the user name will still be pi and the password will be what you entered when setting the pi up.

 

 

 

 

If all has gone well you should now be looking at the pi's desktop on your windows PC.

Now we will down load and install JMRI. (nearly finished)

From the Pi's desktop (using VNC) click on the web browser icon on the top task bar and go to the JMRI down load site (link below).

http://jmri.org/download/index.shtml

Click on the Linux version to download the zip for JMRI

Once this has completed the down load go to the Pi's download folder and you will see the JMRI zip file. Double click on this to open the file. you should see a JMRI folder within this. Drag this folder into the documents folder on the right of your screen. once this has been copied across JMRI will run on the Pi. Click on the documents folder, then click on the new JMRI folder. Click on PanelPro and select Execute to run PanelPro. JMRI Panelpro should now start up so all we need to do now is configure the PanelPro and set up the rest of the DCC system.

1 Comment

  1. […] Finally, for this article we will be running all this on the Raspberry pi. You should already have JMRI installed on the Pi and a remote connection using VNC viewer. If not please see my previous setup. JMRI on Raspberry Pi […]

Leave a Reply