Close
0%
0%

Model Train Controller

A digital model train controller for those who still want an analog world.

Similar projects worth following
Dad loves his model trains, but his 30+ year old controllers haven't aged gracefully. The contacts are worn, the boxes are rusty and some of his newer trains simply refuse to run with them. He had no interest in using modern systems like DCC, he just wanted to drive his shiny new Thomas the Tank Engine around while working on his scenery.

So, I jumped on my Hackerspace's laser cutter, grabbed an arduino and did something about it.

First, I used Sketchup to design a tilted box with all the buttons and dials I wanted (dxf available on github).


This dxf was loaded into CamBam to make some gcode for the lasercutter to use. The engraving was set to a high movement speed with a low power setting.
With the pieces of the box cut, I sloppily painted acrylic paint into the engravings. After it was dry, I cleaned the excess off with isopropyl alchohol and a cloth.
The box was assembled, clamped and glued with superglue. The top is "floating" and held in place with magnets for easy removal.


The brain is a freetronics Eleven (an Uno equivalent) driving a dual-channel H-Bridge driver capable of outputting 2A to each channel.  This is all powered by a 12v, 5A laptop power supply I rescued from somewhere.  I've used a switchmode power regulator module to use the same source to drive the arduino.


The arduino sketch is pretty hacky, but it does allow for some acceleration effects.  The hbridge takes a value from 0-255 to indicate power output.  There is a timer that increases the power output by a maximum of 20 every 500ms until the desired power level is reached.  When that level is reached the bar graph outputs a solid bar, while it's trying to match the speed it flashes the difference (confused? Me too, watch the youtube link below :)

View all 8 components

  • More Volts = More Win

    John Spencer09/11/2014 at 08:44 0 comments

    Well, it's been a long while since my last update , but better late than never.

    As you can see, there's been a bit of an upgrade to the power supply.  This one reliably puts out 14.5 volts, right in the middle of my intended range.

    This range works well for both Dads newer trains and his older ones, although the older ones still aren't as fast as they were, they are much closer to scale speed.

    Next project, A control system for his lights, gates and points.


    You can see the controller in action at https://www.youtube.com/watch?v=5bwM_wmyQnE&list=UUvvi5kSe1kwCc-78wka9uHw

  • Success, and a bit of failure

    John Spencer04/24/2014 at 04:04 1 comment

    While I'm posting this at the same time as the rest of the project, I felt it deserved it's own log entry.

    Dad's new trains worked great with this controller.  They were slightly slower, but the acceleration effects worked and they still had the torque they needed.  We needed to bump the speed up to break the initial rolling resistance before setting them to a slower setting, but that was expected.

    The older trains though, they were very slow.  Needed to set them to full power to get anything out of them.  With the older controllers they HAMMERED around the track so we decided to do some digging.

    The older controllers have the text "OUTPUT: DC 11.6v, 0.36A" on the case.

    First we checked the current with a multimeter in series.  Fortunately, both the old and new controllers outputted around 0.36A, indicating that was about what the train should be drawing.

    Then we checked the voltage, and what a surprise there.

    The new controller outputs 12V in pwm.  It is always at 12V, no drops, no spikes, boring.

    The old controller is all over the place.  At full power it was consistently at 13.5V, but anything less than that and it fluctuated between 3V and 24V.  

    So, from here I'm going to try a higher rated power source.  The system can take up to 28V, but I think I'll go for 14 to 15V.

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates