The command station connects to a PC using USB cable and is controlled by command line interface using terminal emulator running on a PC.
Originally it was designed for ad hoc DCC decoder testing; later the software was extended to make it a fully-featured command station. Analog mode was added for playing with old analog locomotive models. Selectrix mode was added for fun of running Trix locomotive models in their native mode.
The station supports simultaneous control of 32 DCC devices, which may be easily extended to any number desired. The firmware implements the latest additions to NMRA and RCN standards, including functions up to F68 and combined speed/function packets. The set of DCC packets is configurable individually for each decoder. The command station may be configured to send multiple commands in a single packet (like speed with F0..4 or F0..4, F5..8 and F9..12 together).
The software design is purely event-driven and non-blocking - no event loops and no timing dependencies. Control signals for H-bridges are generated by hardware timers. The software is written in C and uses custom USB composite device module, capable of providing 2 USB VCOMs - one for terminal interface, another for future DCC++ or SRCP support.
The commands allow for:
- configuring the H-bridge type, operating mode - analog, DCC or Selectrix, analog mode PWM frequency and resolution,
- setting device properties - DCC addresses, speed steps, no. of functions, types of DCC packets sent to decoders
- controlling the speed, direction and function states of locomotives
- CV reading and programing in DCC service mode
- Programming On Main track for DCC decoders
- defining and executing automatic run sequences, like pendulum train operation with long stops at both ends
The plans for the nearest future include:
- analog locomotive control with BEMF, making it possible to set the desired speed instead of PWM duty, like it is done inside of a DCC loco decoder
- support of presence or distance sensors for autoruns
- autoruns in analog mode
- support for standard command interface - DCC++ and/or SRCP.
It should be easy to add Motorola/mfx support but I don't have any loco with mfx decoder for testing.
Stay tuned for more details and pictures.