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 train control. 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.
The PCB layout is shown at right and the circuit diagram is below.