KEYSTONE FARMS - SD45 CAB SIMULATOR PROJECT - JMRI Throttle Development - April 2017

Link to You Tube video

In 2005, my friend and modeler Ken McCorry purchased a PI Engineering replica of an AAR control stand.  This is the big brother to the PI Engineering desktop Rail Driver and uses similar technology to turn voltages from the throttle and brake potentiometers and input from the digital switches into a USB signal that can  be sent to a JMRI computer.  

In 2010 or 2011 and with the assistance of Juan Carranca and Bob Jacobsen, I was able to connect the AAR control stand to JMRI and control  a loco on an NCE powered track.  With that success in the background, Ken started construction of a full size cab in  August of 2015.  Construction is of wood framing, Masonite sheathing and some PVC details.

Super Cab 6206 under contruction 

Ken is modeling everything an engineer can see from his seat.

Cab nose framed out

The nearly completed cab is quite impressive and includes a number of detail parts purchased from locomotive scrappers.

Cab nearing completion

The cab controls are very realistic being cast in metal and housed in a fiberglass replica of the control stand.  The Rail Driver has now been removed from the cab.  The seats were purchased used from a retired Conrail loco.

AAR control stand and Conrail seat

The HO scale camera equipped loco on the layout upstairs sends a radio signal which is displayed by a projector on a 8 foot high by 16 foot wide screen in front of the cab.  Ken has a new 1080P wifi enabled camera on order that we hope will radically improve the projected picture quality.

Camera Loco

So the engineer and fireman see their travel across the layout from a realistic perspective.

Projected camera image

Ken installed a 500 watt home theater sound system with 5 surround speakers and a sub woofer.  He attached it to a sound decoder using an audio transformer.  Loksound has donated a decoder to the simulator project and Ken reports the bass is better and the horns are very "playable".  I am looking forward to working with Matt Herman of Loksound to make the simulator sounds operate as realistically as possible.

Sound Decoder setup

Fireman side

Once Ken had the project under way in 2015, I pulled out the old files and attempted to setup JMRI to once again communicate with the AAR control stand as it had in 2011.  Lots had changed in the five year period, including Windows version, PC update and several JMRI versions.  Try as I would, I could not get JMRI to recognize the electronics in the control stand.  Ken bought a Rail Driver so I could explore its abilities and I was able to make that work with JMRI.  We even purchased a spare ReDAC IO Module from PI Engineering to see if we could crack the code.  I constructed a simple throttle to replicate the pots and switches and sent it off to Bob Jacobsen to see if he and his JMRI gurus could make it work.

Desk top Rail Driver by PI Engineering

Simple ReDAC throttle

After months of struggling, Bob Jacobsen gave up and constructed an Arduino interface to replace the PI Engineering electronics.  This was accommodated with some new software added onto JMRI to accept serial input from any similar device.  Bob sent me the appropriate files that will be available in test version 4.7.1 of JMRI.  I like the Arduino approach as it has truly isolated the throttle from the brake lever signals, an issue the PI Engineering board had exhibited.

Arduino throttle interface

The new Arduino interface has 8 analog inputs and 24 digital inputs, more than enough to handle all of the AAR control stand features.  Bob sent me a simple throttle script to get started.  I installed it on Ken's new Windows 10 PC for the loco simulator and fired it up  first time on 12/28/16.  The throttle pot has a smaller range than permitted by the Arduino and the sound decoder went to run 8 RPMs at 35% throttle.  After some tinkering with the throttle calculations, I was able to get the sound decoder to respond from shutdown in the STOP position to full RPMs in RUN8.   I called this the Basic throttle.

Ken at the controls

Ken ran this basic throttle script for 10 days while I worked on the next version.  With Bob Jacobsen's syntax correction, the next simple throttle was run on 01/07/17.  This simple throttle has horn, bell, forward, reverse and 10 position throttle - STOP, IDLE, and Run1 through Run8.  The SD45 sound decoder now responds to all 10 steps and the loco upstairs does as well.  Ken had a lot of decoder momentum dialed in for this version and it worked well.  The loco will sound at idle and sit still upstairs.  Moving to run 1 causes it to start to move at idle RPMs.  The sound decoder responds with a very slight delay from the throttle lever.  Perhaps almost prototypical. When I showed Ken the control stand operation in this second version, he found a big grin.  The January op session had been canceled because of a snow storm, but there were 5 of us in the building.  Once they heard the sound system, all of them ended up in the cab enjoying the sight and sounds.  I shot some video and posted it on you tube as in the link at the top of the page.  The video sent via radio from the loco upstairs is still a bit choppy.  Ken ordered a wifi equipped 1080P camera and if it works out, it promises to improve the picture quality.

With this version of the script in operation, we want to claim the title for the largest JMRI throttle in use.

SD45 Simulator panel in JMRI

The Arduino hardware can now be made part of a more permanent installation and has permitted connection of the three brake levers and additional switches.  Current script improvement use these lever inputs to control the horn, bell and engine RPM sound from the Loksound decoder played in the cab and to then set internal sensors displayed on a JMRI panel.

This third version of the throttle now includes a second script which calculates train speed, direction, acceleration and deceleration sent to the consist upstairs, giving the simulator real braking ability.  With the new script in place, most momentum has been removed from the loco consist and is provided by the speed calculation of the JMRI script.

The train brake and dynamic brake levers are now functional and the script can modify speed at a rate of for example 1 mph per second.  The effect of grade can be part of a future script enhancement.  And I will later turn attention to the speedometer, amp and brake pressure gauges which are part of the AAR control stand..

And all this in JMRI is still free.  But donations to JMRI are always welcome. 

Thanks again to the developers, especially to Bob Jacobsen for not giving up on this project.  Ken Cameron has also been helpful in polishing my use of jython syntax in the developing scripts.  I will be doing a clinic on the throttle projects at the MER convention in Harrisburg PA next Oct 12-17.  And Ken's fabulous 3100 square foot layout and SD45 cab will be on tour at that time.

Web page updated April 16, 2017

Quaker Valley Home Page

Quaker Logo