One thing that I have not been real happy with as I build out my control network, is the hand held controller implementation. I had hoped this design would change that but after I’ve played with it a bit I don’t think so.

It features a uLCD-32 smart touch screen display unit, a large aluminum knob and four tactile hardware buttons. The display unit is a very full featured device including a Lipo battery charging circuit! Very cool. The custom graphics chip and language are very powerful and more importantly FAST. This will take all the UI load off the Xbee/Widget device. More info is here – Serial TFT Color LCD

So, I think I don’t like this one either. I’m going to scavenge the LCD and try to fit it in the case I’ve found for the alpha numeric monochrome unit. It’s a tight fit but the quality of this display is just too good to let it go to waste. I’m finding I like the off the shelf case I have (I bought two) better than I thought. I have somewhat large hands so I can hold it in my left and turn the knob with my thumb.

So this one is defunct now. More to come on this project later.

I’ve been working on this Xbee DCC thing for quite some time now and have finally finished it off. Or more like, I’ve finally gotten to the point where I think I could ‘release’ the code and the hardware. I have created a version 2.0 release branch for the code and have most of the hardware in a PCB state so it’s getting pretty mature. And more importantly, it works pretty darn good now!

The basic problem I’m trying to solve is how to control my trains, both electric and live steam, with one network. This network would also control pretty much everything else- turnouts, lights in buildings, signals, whatever. Everything on the network- trains, towns, turnouts, signals, would be capable of talking to everyone else, in real time. This would then allow you to tap into the network with a standard interface to leverage whatever application you want on top of it.

This is the reason I went with the Xbee. Unlike simple R/C or even Bluetooth, the Xbee (and I am speaking specifically about the Series 1 Xbee, NOT the Pro Zigbee) is a low level point to multi-point network. It runs at 250Kbps and has a range outside of about 100 meters or 300 feet. Every node on the network has a 16 bit address and can talk or respond to any other node.

One thing that took quite a bit of time to develop and test was the DCC output. The widget generates 128 step DCC throttle messages and DCC Function Messages F0-F12. It’s a bit basic, you have to program your DCC decoder with an external DCC unit and (for now anyhow) you only get those specific DCC transaction but as you can see from the video, that gives you lights, sounds and throttle.

I also completely redesigned the Master side code as well. It’s now far more generic in terms of messages. So I designed a new hand-held controller for it to reside in:


Hand Held Controller 2.0


Here is a basic diagram of what is going on in the U25B in the video. These are the components and control and power flows. Red is power, orange is logic, blue is DCC. Also, it’s not on the diagram, but the economi is controlling the lights and the Widget is driving 2 servos to automate each coupler. The ‘other I/O’ is also hooked up, a current sensor monitors the amps flowing to the trucks and there is also a photo detector that gives a pulse on every wheel revolution (for speed and distance). (The software is not currently looking at these however)


Basic Control Diagram


All of the components in the client are now on PCBs, no more proto or perf boards:


Nano Widget



Micro Widget



DCC Output



8Amp DPDT Relay






A couple of pictures of my latest iteration of wireless DCC and train control. This one has been refactored a couple of times and I now have a nice compact executable that takes throttle and function commands from any controller (in this case, my new hand held design) and converts them to both servo pulses (for the motor controller) and DCC output commands to control the lights and sounds. The speaker is a 2 inch full range with a passive radiator, sounds nice and full. The lights are all surface mount LEDs driven by CL2Ns. I also have servos on the couplers, they are tied to the F6 and F7 functions on the handheld.

Here are the basic components that go into the locomotive:


Everything is now driven by a simple command structure- throttle commands and function commands. The throttle controls the servo 0 spot, I’m using a 20A ESC to drive the motors in the U25B. The throttle commands are also used to drive the DCC decoder for the engine sounds. Since this is an HO Economi decoder, it doesn’t have the current output directly. But it does have great sound and I also drive the lights with it.

Why Xbee everyone asks? Because this is true networking. Everyone is on the same network and can speak or be spoken too. True point to multipoint. This opens up all sorts of possibilities for automation, signals, detection blocks and computer control. Something Bluetooth cant’ do. It’s also ‘industrial strength’ in that Digi has been making Xbee modules for many years now. They are FCC approved out of the box and


This is the base design for my new hand-held controller. Along with a new case and display, I’m going to refactor the software to provide a cleaner interface into the clients (locomotives). Right now my ‘phase A’ handheld knows a little too much about the clients, I want a more disconnected sort of protocol. Anyhow, I’ve gotten everything to fit but the graphic interface required some new hardware so that has not been tested (other than a basic smoke test). I’ll need to write the code for that and then port parts of the old handheld code into it. The keyboard, knob and Xbee interface should not have to change much, I just need a calibration step on the kbd and store that into eeprom. I’m going to have a usb interface into this so I can write a tool on the PC to setup the function keys and display.


I picked up a cheap Aristocraft U25B in Chessie paint the other day and have been taking it apart so I can rebuild it. The idea is to get from the toy like unit I have into at least a semi-scaled sort of model. The photo above is the closest prototype image I’ve found to what is depicted with this Aristocraft rendition. So I’m stripping it down to the base parts with the idea to install my control system, batteries and sound. And of course, a bit of paint and detail work- it is a bit cheezy with the cast color parts. Yuck. So anyhow, I’m getting there. Below is an image of the original model. More in a later post.



Yes, I know this is a little weird but I want a knob AND a nice user interface (ala smartphone) to run my trains so I am working on this design. The Knob and underlying circuitry communicate directly with the 802.15.4 network. The phone is just there for the user interface and graphics. Bluetooth is used to communicate between knob/wireless controller and the phone. A custom app runs on the phone. I have the infrastructure working for this, its just a matter of smushing all the components into this small space and refactoring the software a bit. Both the case and the face plate for this were cut on my Probotix X90 3D router.


Today I got my order of printed circuit boards from Bay Area Circuits. I promptly populated them with components and powered them all up to see how they would do. Everything works! Very nice! Next step is to install these into one of my locomotives and replace all the breadboards with something clean and production quality.

Pictured, in order, is the 8Amp DPDT relay module, it’s used to reverse the direction of the locomotive. It can be triggered either with a logic one or zero, say from an Ardunio, or from an R/C signal via your generic radio control system. (The logic version is shown, the R/C version has an additional chip on the board, you can see the outline).

Second is the DCC output module. It is designed to be driven with a logic signal from a micro-controller such as the Ardunio. Logic input in, attach your choice of battery (or other) power to the input terminals and it provides up to 3Amps of DCC encoded power on the outputs.

Below that is the DCC input module, connect this to any DCC device like the MRC Prodigy or NCE DCC units and it converts the high voltage DCC signal down to what a micro-controller or Ardunio needs.

The last one is my Control Widget Node. This device is a micro controller wired to an industrial strength Xbee Series 1 802.15.4 Wireless Network Module. I use this for both my Control and Slave nodes. It allows high speed data delivered in an organized network infrastructure with a range of about 300 ft. I send both proprietary packets and DCC messages over this in real time. This is the latest PCB design.