Designing A Christmas Train Controller

image

Last year I decided to build my kids a train set for Christmas and needed a simple train controller.   Every Christmas my dad would break out the train set, and we would spend cold nights in the garage running plastic army men around the track on various missions.  I wanted my kids to have fun like that.  So I bought some tracks,  a couple of engines, and some railroad cars off of eBay.  Then I put together a wood base and paper mache tunnels.  All I needed to complete the awesome holiday spectacle that is model trains was a train controller.

I opted to use our Motion Mind 3 controller with one of our Motion Mind connector boards attached.  This made the wiring easy.  Some of the benefits of using the Motion Mind 3 included current limiting, a robust H-bridge circuit, and the fact that I could set it up for analog control without any programming changes.

MOTMCON

To create a control box for my kids I just drilled holes for switches and the potentiometer in a brass panel, bent it up, and brazed some pieces together.  The wiring was simple and I soldered the various connections to the connector board as opposed to J4 shown in the schematic.  I also set the MOD2, MOD1, and MOD0 pins using the DIP switch on the Motion Mind 3 as opposed to the J4 pins shown on the schematic.

The functionality is pretty simple.  Grounding MOD2 and MOD1 and leaving MOD0 floating puts the Motion Mind 3 in unidirectional analog mode.  In this mode the controller reads a voltage at pin 4 of J4 and converts it to a 10-bit duty cycle.  5V is full scale, or full speed.  0V is stopped.  So adjusting the 1K potentiometer ends up adjusting the speed of the train.  I also connected a switch to pin 17 of J4.  Grounding pin 17 will reverse the direction of the H-bridge.  This is your forward and reverse control.

MOTM3 TRAIN
I also used the  Motion Mind 3’s serial interface. At one point last year I wrote a Visual Studio program that allowed computer control of the train speed and direction.  However, it turns out that my kids don’t want to have anything to do with the computer control.  They want to turn knobs and flip switches while transporting little plastic animals around the track.

At one point the control box was polished up to a wonderful brassy sheen.  In the last two years lots of little fingers caked with candy cane residue have taken their toll on its beauty.  So far its working like a charm and I’m hoping we’ll get a number of solid Christmas seasons out of it.

image

Speak Your Mind

*