Above is my latest Protothrottle Receiver. There are some features I would like to add but for the most part, it is code complete. I have more info on it here: Protothrottle Receiver

This is an Airwire Receiver (or transmitter if you wish) that interfaces to the popular Airwire System of Model Train Controls. I picked an Ardunio with this one as it is probably more familiar to the many computer hobbyists out there than a naked Atmega328. I wanted to keep this one accessible and as open source as I can. The Github Repository is available here: Github AirMini
More info on it is here: Airwire Mini

New Chickens

New chicks. Buff Brahmas, six hens, one rooster. Or they will be, right now they are all little fluff balls. This one looks pretty serious. I’m not sure chickens really ‘think’ but it looks like she is trying.

Gilbert Fixes

Finally found some time to fix up Gilbert, the winter was pretty hard on it. I added a water tower and cleaned up the buildings a bit. Still needs some ballast work but it’s coming along.

A very generous fellow named Darrell Lamm gave me this locomotive. For free. Just so I could test my receivers in it! It is a very nice model, all metal, with an already installed Lok Sound DCC decoder. Amazing. The only problem is that it is one size smaller than the scale I run, I have no place to run it. Anyhow, despite being O scale instead of G, this locomotive has plenty of room for my stock Protothrottle Receiver. Battery, Receiver, DCC Amp and a 5v power supply. Since I don’t really have any O scale track (one three foot section is all I own), I will probably sell this at some point, not sure.

I got all of the firmware straightened out and this works pretty well now. This particular software build only handles DCC addresses 0-99 but I’ll be fixing that on the next firmware upgrade.

You only need this one board and it will enable the Protothrottle to control all of your Airwire Locomotives. It still needs another pass on the PCB and an enclosure but I’m pretty happy with the innards. I’m going to build up a few and see if anyone wants to do some beta testing for me.

UPDATE 3/11/19- Now in Beta, I have the full 4 digit addressing working.

I thought I would post an update on my system progress. Above is a shot of the Protothrottle and the node configuration screen. I’ve got this almost finished, I only need to add some refinements for the servos in order to do live steam or in the case of diesel DCC locomotives, control the front and back couplers.

Anyhow, to recap some of what I said in previous posts- the configuration web app runs on a Raspberry Pi Zero W which is configured as a stand alone Linux server. I did this so it will work on any display device using a browser- phones, tablets and computers, regardless of brand (IoS, Android, Windows, Mac). The hardware is very similar to the ISE ESU hardware, in fact, it’s almost identical. (a pic is in one of the posts below)

The Zero is configured as a Wifi access point with DCHP and DNS. Backend services are provided using Flask (python) with an html and javascript front end. I’ve added MySql and Redis to keep track of things and there is a background process that runs all the time to handle the root access to the Xbee board. It sounds complicated and the software was a bit of a challenge but once its configured properly, it just works.

I’ve tried to keep this very simple, above is the main page when you connect to the RpiZero web server. You can click or touch the ‘scan’ button and all of the Xbee devices on the network will be queried and saved. You can then click any of the nodes to ‘zoom in’. Each node will support a DCC output and servo outputs. I run both diesels and live steam so I am building in servo control for both. ‘Diesel mode’ will be used to control the two couplers on a battery DCC locomotive. ‘Steam mode’ will allow the throttle and direction controls on the PT to move servos in a live steam locomotive.

Here is a shot of the main node configuration. There will be another screen when I get my ‘Airwire Translator’ working but that’s a whole other project. I do have the basics for that coded up and prototyped but it will be a while before I get that one together.

Anyhow, a few specifics on the parameters- the Protothrottle ID and the base ID are pretty much fixed unless you want to run multiple combinations of protothrottles- the Xbee DCC Node looks at both of these values and they have to match or the message is ignored.

The loco address is (obviously) the address of the locomotive you wish to control. Unlike normal DCC implementations, I don’t change the DCC address on the decoder- it’s always set to the default- 3. Since the Xbee Node only talks to one DCC decoder (internal to the locomotive), it just makes things more complicated if you change it so I require it to be fixed. The Xbee addressing and messages take the place of the DCC ‘network’ (ie, the ‘track’)

Below the Loco Address is the consisting setup. You can set consisting to OFF, FWD or REV and then enter the address of the lead locomotive. If anything other than ‘OFF’ is set here, the Xbee node will respond to the consist address and ignore it’s own address. Since the Xbee message is broadcast to all locomotives at the same time, this gives you unlimited consisting.

Below the Consist setup is the CV Programming parameters. Enter any CV Address and data into these windows and press ‘Prg’ to send a CV programming command to the locomotive. At some point I will expand this to include english language setups for both the Soundtraxx TSU-4400 and the TCS Wow 501, but for now this gets the job done.

Next is the servo setup. There are two servo modes, ‘Couplers’ and ‘Steam’. Couplers (servos) can be assigned to the DCC function codes to open and close them. This is not completely implemented yet, but the hooks are there. In ‘Steam’ mode, the Protothrottle throttle lever will be passed to servo 0 (taking into account the low and high limits) so that you can control the speed of a Live Steam Locomotive. The second servo will then be used for direction control. For both of the servos, regardless of the mode, you can set a reverse and a high and low limit.

So, that’s about it. I will be installing all of this in a couple of my locomotives to do some ‘real world testing’ once the weather improves a bit and spring rolls around.

I have two of these for the time being (one is a loaner from iowa scaled), so I am putting some cycles into developing a web app to handle the Xbee network these guys inhabit. It is way cool how the Protothrottle backend works. It sends out broadcast packets to every Xbee on the network but leaves a huge space for directed messages.

In light of that, I’ve come up with this minimalistic setup to send those directed messages. Super simple hardware. A Raspberry PiZero W, configured as a Wifi Access point with an Xbee as a USB device. It’s running Apache web server and Python Flask on the backend. I’ve thrown in MySQL and reddis (database apps) and created the basics for a web app. Because of the way linux works, I need a background process that runs as root that actually talks to the USB/Xbee. (the web app doesn’t have access to the hardware) I run two reddis queues so the web code can build the messages and then the root process can receive and send them. Took a while to get that working right but it’s doing quite well now. Everything starts at powerup. I like stuff to ‘just work’ when you turn it on.

Using this interface, I can scan for all the nodes on the xbee network and then direct specific message packets to each using a web based interface. Or in other words, I will be able to configure a DCC decoder in a locomotive with my smart phone while I control it with the Protothrottle. Way cool!

Above is how the Windows PC sees the RPiZeroW, it’s just another Wifi network. Once you join here, the RPiZW (linux) handles all of the DHCP and DNS stuff so you can use any browser to get to it. Below is the console login using windows 10 bash. You can just ssh into the Rpi, just like a big ole honkin web server box (even though its only as big as two postage stamps, ha) As you can see, all of this is over Wifi, I have no hardwired ethernet.