Proportional-Integral-Differential Train Controller with Autostop
I discovered the power available in PIC microcontrollers recently,
and have spent a couple of months of late nights applying them to
The PCB at right is the finished prototype of the
first model I designed.
The design has a full
User Manual (pdf, optimised for printing)
that explains its operation in more detail.
This type of train control has a number of advantages:
This is a picture of the prototype in a walk-around format. The red LED
indicates power applied, the green one the track power, and the
yellow LED is the processor signal LED.
The reverse switch is visible at the top of the box.
- It controls speed of a locomotive very precisely,
better even than proportional feedback controllers such
as the Gaugemaster or my analog
- Low cost and lower complexity than the analog versions;
- Simulated inertia as well as feedback;
- Inertia can be adjusted or switched off;
- Automatic station stops in response to button press or signal from track;
- Indicates conditions such as halting, overload or timeout;
- Times out to stop a train that has inadvertently been left running;
- Control constants can be user-changed to suit different scales (rather than
being fixed at build).
The PCB layout is shown at right and the
circuit diagram is below.