Model Railroad Servo Turnout Motor Controller

Model Railroad Servo Turnout Motor Controller

NEW: Buy MRServo! - Yes, we've product-ized this one. If you don't want to make your own, you can now buy one through Iowa Scaled Engineering over here.


I've used what I consider to be the gold standard of model railroad turnout motors for years - the Circuitron Tortoise. That said, when the Wind River built a new yard with 25+ turnouts, my budget just couldn't absorb that many new Tortoises (even at $14+/each in quantity), so I started seeking cheaper options.

The cheaper option turned out to be micro servos from the RC car/plane business. These little guys can be had for $3 in small quantities on eBay. Look for "9g servo" - they're basically cheap knockoffs of the Hitec HS-55.

Update - 6 May 2013

I'm updating this page to modernize things a bit, after three some years of "lessons learned" about having 50+ of these things in service on the Wind River and my own layout.

The first thing I've learned is that the adjustable version kind of sucks. Yes, it does work, but it's fidgity. Because it's always powered up, if things shift even slightly (temperature - both of the servo and the layout - and humidity both play a part), the servo sits there chattering and buzzing trying to push it to that exact point to which it was calibrated. That burns unnecessary current, and I suspect will shorten the life of the servo.

The fixed throw versions - provided they're installed correctly - work extremely reliably. The spring tension in the wire does a fine job of keeping the points in place. I've also upgraded the original PIC10F200 version to support auxilliary points and the smart frog controls.

Plus, if you don't want to build your own, you can always from Iowa Scaled Engineering.

Theory of Operation

  • The circuit will cause a servo to slowly move from one limit to another when the control input is changed. After a second or so has passed at the limit, the processor discontinues sending pulses, causing the servo to stop actively driving its output. At that point, tension stored in the throw wire (between the points and the reverse torque of the servo gear train) holds the points in place.
  • The control input (CNTL) should be driven to ground (such as with a switch) for one direction of the points, and will naturally be pulled up (the "high" state) when the circuit is opened. The high state can either be left floating or be driven to some higher voltage - just don't exceed the breakdown of Q1. 12V will always be safe with almost any FET in there, and if you're using a BSS138, you can go up to about 40 safely. Q1 acts as a clamp to prevent the input to the PIC from going beyond the part's safe limits. Logic level inputs, such as from another microcontroller, are also fine for driving the control input.
  • Relay K1 is driven when the servo passes the midpoint of the throw. For one direction, it'll be on, and for the other it will be off. That provides directional contacts.
  • Relay K2 will open when the servo starts moving and close once the throw is complete. It's basically a built-in version of the Overly Complicated Frog/Points Power Controller, and provides for disconnecting the power to Shinohara-style turnouts as the points throw so that you don't get shorts. If you don't need frog power functionality, see the "Circuit Notes" section for how to get rid of K2 and get yourself another set of directional contacts.


I've found that 3M 1" Outdoor Mounting tape (product 4011) works pretty well for holding the servos and boards to plywood. Always remember to clean any leaked lubricant and stickers off the sides of the servo with alcohol, otherwise the adhesive won't stick well.

I strongly recommend 0.025" music wire - 0.032" is too thick and will force the servo around rather than holding the points. The exception to this is if you're using Peco turnouts with their over-center spring in place - in which case you'll need 32 mil wire to provide enough force to throw it.

See here for installation and mounting instructions

A couple videos:



Installation and use manual
Schematic - v1.0b
Source Code and Binary - v1.0
gEDA Design Files

Circuit Notes

  • If you have a stable +5V power rail, there's no need to have an individual 5V regulator on each board. If you have a large cluster of these things, you might want to just have a centralized 5VDC supply. Be warned, though - servos can draw substantial current (1A or more) while moving quickly or fighting against a load. Usually at idle they only draw a few milliamps. Relays will add some current (the ones we use on MRServos draw ~30mA each) and LEDs will draw roughly ~10mA as drawn in the schematic.
  • The frog power control relay K2, transistor, etc. are most optional. If you're not energizing your frogs, or if energizing them before the points completely throw won't short out anything, you can omit this part of the circuit and short 2COM to pin 13 of K1. That'll give you two sets of accessory contacts that change when the turnout throw passes through the midpoint.
  • Obviously any relay is going to be a significant part of the total cost. If you're not using them somewhere that you need contacts to indicate direction (such as maybe an industrial track), just leave them all out, along with their associated transistors and diodes.
  • FET Q1 acts as a clamp, limiting control input voltage as seen by the PIC to 5 volts. Input voltage is limited to the breakdown voltage of the FET used, but a BSS138 will survive 50V. Also, there's nothing magical about the BSS138. We also use 2N7002s. Pretty much any N-channel logic level FET will do the job.
  • Yes, I could have done it with analog circuitry. However, the PIC10F200 is $0.46 is small quantities. That's hard to beat.
  • The firmware is tunable - the maximum throw each side of center, as well as the rate of throw, can be tuned by parameters at the top of the file. See the code comments for more details. Just grab Microchip MPLAB to compile it - it's written in assembly.
  • You can use an opto-isolator on the front end if you're driving these off DCC decoders or some other system that provide irregular signals or ones that don't share a common ground with your servo controllers. See the MRServo for DCC page on Iowa Scaled for more details.
  • We use a DRDC3105E6 relay driver part on the ISE MRservos for ease of assembly (it replaces two SOT23 transistors, two base resistors, and a pair of diodes, so we're placing one part rather than six). However, again, there's nothing specific about this part. You can substitute a pair of transistors in your own design. Just connect the emitters to ground, the collectors to the relays, and the bases through a 10k resistor to the PIC. You'll also need to add inductive kick diodes to the relays (1N4148s work well) - cathode to the positive rail, anode to the collector of the transistor.
  Questions? Email Nathan Holmes
© NDHolmes, but freely usable under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.
Last modified on May 06, 2013, at 01:22 PM
Edit Page | Page History