This weekend, I finally got the following cheap wireless DCC set-up working nicely:
Although I'm using a Sprog Nano and an SBoost, you could easily use a Sprog II which would bring the costs in at around £90. If you already have a DCC booster then you can simply buy a Sprog Nano to use as the command station which brings the costs down even further (£20 less). An example set-up for £90:
- Sprog II: £45
- Raspberry Pi: £25
- 32GB SD Card: £10
- Edimax WiFi Card: £10
For a small layout this is a really nice compact solution - most of the components are so small they can be mounted underneath the baseboard to keep the wiring simple. The Raspberry Pi runs JMRI in headless mode. With the configuration correct you can simply switch on the Pi, wait for it to boot and you are ready to run trains from your favourite Apple or Android smartphone or tablet after a minute or so.
My test set-up is shown below (apologies for the picture quality - taken on the same smart phone that I was using to control the trains!). The only piece that isn't really visible is the tiny(!) Edimax Wifi dongle plugged into the second USB port of the Pi. I have the Pi in a case but there is a lot of dead space taken up by this bulky case so its feasible to mount it without a case.
The basic steps for setting up the Pi (requires some basic linux knowledge):
- Install Raspbian (as per the Raspbian wiki)
- Update the Pi using apt-get
- Install Java using apt-get (openjdk-6-jre)
- Get the Edimax wifi working by booting the Pi into X - there is an icon on the desktop to configure it!
- Download the latest version of JMRI onto the Pi
- Launch JMRI (very slow with the GUI).
- Set up the SPROG in JMRI preferences
- Set up the in-built WiThrottle Server to run as an action on startup via JMRI preferences
- The above two steps above will generate a file (DecoderProConfig2.xml). Copy this and rename it to JmriFacelessConfig3.xml
- Run JmriFaceless and test the set-up!
- Configure JmriFaceless to run as a daemon at boot time.
- If you do choose to use a Sprog Nano then you will also need to write a small Jython script to be loaded at JMRI start-up time that switches on the layout power via a DCC command (PM me if you need a copy of this).
A few enhancements I'd like to make:
- Power the Pi from the 12V DC power supply that is powering the SBoost (need to step down to 5V for this).
- Configure the Edimax to work as a wireless access point rather than a wifi peer (thus removing the reliance on my home wifi network)
- Work out how to get all of the roster information that I spent hours configuring using JMRI on my laptop to work with WiThrottle so the buttons are nicely custom labelled for each sound loco. Not sure how easy/hard this is as I haven't even tried copying the roster data to the Pi yet.
It's worth noting that although I started this project back in the summer, I ran into major problems using either the Lenz LI-USB or early versions of the Sprog 2 (later versions are fine). This is down to the FT232B chipset in both devices that doesn't play nicely with the Pi (due to driver issues).
Big thanks go to Kevin at Coastal DCC and Andrew from Sprog-DCC for providing me the opportunity to test out a prototype of the Sprog Nano. I should have the set-up with me on the DEMU stand at Alexandra Palace later in the spring so please drop by if you are interested and would like to have a natter.