Here is a diagram of what all the parts are. Despite how it looks, there are only three hardware modules other than the phone. All of the stuff in the yellow dotted box is inside the locomotive.

1) The main controller board (widget). It contains the Bluetooth interface and the logic to generate a DCC output stream. It will also do other things like control servos and relays and read inputs etc for display on the phone. Just for fun ya know.

2) The DCC Amplifier. It takes the logic level DCC stream from the widget and turns it into ‘real’ DCC using battery power. It is the same waveform as the logic signal but boosted up to 14.8 volts.

3) The DCC Decoder. I am working with the Economi DCC decoder made by SoundTraxx. It accepts the ‘extended packet format’ messages as detailed in the NMRA doc ‘extended packet formats for digital command control, all scales’. As soon as funds present themselves, I will be expanding my research to include the WOW sound decoder.

I try to keep the hardware as minimal as possible, all of the functionality is in the software. Also, the widget controller has a socket for the network module so it can support a variety of networks- Xbee, Bluetooth, Wifi and SNAP mesh. Just change the firmware. All of my boards have ISP programmer connections so you can update the firmware with free tools.

The main widget module software is based on the Atmel series of micro-controllers and is written in C. The user interface side on the phone is python. Further projects include the RPi as an edge device for IoT based on Nginx, Python and Flask.

Feel free to email me directly if you have questions. martan@cstone.net