Solenoid vs Servo Turnout Control pros and cons?

Rob H Feb 3, 2018

  1. Rob H

    Rob H TrainBoard Member

    22
    15
    2
    I'm still in the early stages of my layout (building the base board) but I'm trying to think several steps ahead so to eliminate problems later down the road. Control wise I'm going for DCC++ JMRI and WiThrottle for three reasons; firstly cost and secondly I want a project to get me back into electronics & coding and finally for flexibility & future proofing, when I was a kid I liked to change things on my layout on a regular basis and having physical control panels with dozens of switches is not as flexible as a virtual panel in JMRI. Anyway I degrees quite a bit.

    There seems to be two options for turnout control; solenoids as supplied by all the big model railway manufacturers and servos as used in radio controlled cars, planes & the like. Now I'm looking for some advise as to the pros and cons of each system.

    20+ years ago it would have been a no brainer, both options cost about the same but solenoids are simple to fit & easy to wire up to a couple of push buttons whilst solenoids needed custom brackets & bespoke controllers built from 555 timer chips (Radio Shack used to do a great little book on 555 projects). However thanks to the likes of 3D printing, Arduinos and sharing of information on the internet, building an interface to drive a bank of servos costs about the same as building an interface to drive a bunch of solenoids, in both cases an Arduino with a shield. Further thanks to Makers and The Internet of Things you can now buy 9G micro servos for considerably less than a beer or a coffee, in fact I've got a dozen of hen on my work bench just to play with, something I never could have afforded to do 20+ years ago.

    So as a result I'm pretty much left with performance on a model railway as the only real deciding factor as to which setup to go for, having never used servos to control points I'm not familiar with how they perform, so does anyone with experience of both types of turnout control? and any advise as to the suitability of both types?
     
  2. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    The biggest issue I see with using servos is what to use if a servo controller fails......the electronics needed to move a servo isn't retively simple like a Tortoise machine or a snap action switch or a twin coil setup.

    Plus wanting to do local control of turnouts requires much more complex configuration, even when the servo stuff works. My cluyb is building a new layout and I originally wanted to use Arduino servo control, but the lack of a viable fallback if the Arduino stuff fails is forcing me to setup tortoise machines with pushbutton fallback operation.....the pushbutton design also give local control when the dispatcher enables the local panels.
     
  3. sachsr1

    sachsr1 TrainBoard Member

    60
    23
    5
    Most of my layout is controlled by Tortoise machines controlled by NCE hardware. The cost per turnout is about $30. I wanted to try using servos to control my yard. I should mention that I enjoy tinkering with electronic, so I don't mind the time spent "messing with stuff" to get it to work. I wanted to control my servo turnouts from both a fascia panel and JMRI. I did a bit of research and came up with a functioning "Frankenstein" system.

    It is really a two part system that can be setup as modules at different locations on the layout. The low cost of the components makes it easier to add parts rather than reconfigure the software or code. I use two Arduino Nanos in each node. One to control the servos, and one to connect to JMRI via C/MRI. One nano is the servo control which allows you to set the degree points of the servo travel, and has input pins set up for buttons to toggle the servo. I have two of these controlling 7 servos total. Instead of using physical push buttons to toggle the servos I use the outputs from the C/MRI node to send a signal to trigger the servo toggle.

    The C/MRI node is connected to JMRI via a cheap USB dongle and RS485 chips. You can set up each node in to be a mixture of outputs (lights or turnouts), and inputs (sensors). The outputs on the C/MRI node connect to the inputs on the servo node to trigger the toggling. I also use additional C/MRI nodes that are set up as mostly sensors inputs. I made a fascia panel with toggle switches so I can control the turnouts. I'm not really directly controlling the turnout. The toggle switches are really sensors in JMRI that are set up to control the servos via routes in JMRI. There's a lot going on under the hood, but for the end user it's straight forward. My fascia panel is a mixture of switches that control Tortoise and servo turnouts.

    It sounds like a lot of work doesn't it??? It was a lot to set up, but now that I have all the leg work done I just copy and paste the info and upload the sketches. I've had the system up and running for a six months with no real issues. My 11 year old daughter is able to use the systems. The C/MRI nodes can daisy chain so you can just add more with only two communication wires connecting it back to the last node (plus power).

    I buy everything off of eBay, and 3-D print my servo mounts. I've just mounted the nodes on breadboards at this point. I don't use a servo control shield I just power the servos from the 5V bus, and connect the signal wire to the Arduino pin. There may be a better way to connect servos, but I was happy with what I had, and moved forward.

    Nanos $2.50/EA
    Breadboard $1
    Servos $1.50 to $2.50 (metal gear)
    RS485 dongle $1 (only need one for whole system)
    RS485 chip 10x for $1.00 (.10 each)

    Servo control node:
    2x Nanos $5
    2x Breadboards $2
    4X Servos $6 to $10
    1x RS485 chip .10
    Total $13.10 to $17.10

    Stand alone C/MRI node:
    1x Nano $2.50
    1x Breadboard $1
    1x RS485 chip .10
    Total $3.60

    Divide that by four turnouts:
    $3.28 to $4.28 per turnout



    http://www.utrainia.com/65-arduinocmri-and-rs485
     
    Erik84750 likes this.
  4. Rob H

    Rob H TrainBoard Member

    22
    15
    2
    Thanks for the comments, you’ve given me a fair bit to think about, I’m going to go for servo motors to start with as that’s the cheaper option and I’ll see how I get on.


    Sent from my iPhone using Tapatalk
     
  5. brendanf

    brendanf TrainBoard Member

    62
    54
    8
    Go with servos. They are very cheap to buy compared to anything else. You can adapt them to pretty much any scale layout you are running.

    Controlling them is also very simple and can be done many ways. You can also use the Adafruit 16 channel board as well, there is a sketch that uses it, look in the DCC++ sub forum and find the thread titled 'Setting Up Turnouts in JMRI', it runs on a separate Arduino.

    I just spent the past weekend finalizing my mount for a 9G servo that converts the rotary motion into a linear one so it can be 3D printed. You can also find lots of stuff on the website Thingiverse for 9G servos to mount them.
     
  6. DrMb

    DrMb TrainBoard Member

    580
    56
    13
    The servo turnout control circuit is just a 556 IC (or two 555's), 2 diodes (or 2 transistors), 4 resistor and 4 capacitors with a double throw switch per turnout and a 5v voltage source to power both the servos and the control circuit. You only need an arduino in yards and large stations.
     
  7. jdetray

    jdetray TrainBoard Member

    656
    135
    24
    For anyone who wants to use servos but is not enthused with constructing the control circuits, there are ready-made options. I happen to use the products from Tam Valley Depot, but there are other vendors as well. Using Tam Valley Octopus controllers, the cost is under $10 per turnout. Not as inexpensive as the DIY solutions, but Oh! the time you save!

    - Jeff
     
  8. Shdwdrgn

    Shdwdrgn TrainBoard Member

    251
    182
    13
    For those wanting to control servos from an arduino, look for the PCA9685. This board costs a couple of bucks and can control 16 servos, plus it can be daisy-chained for up to 992 servos. It uses the I2C bus, so only 2 wires needed for the interface. With the right DCC decoder you can run a LOT of servos from very little equipment.

    As soon as I can get back to it, I'm trying to set up a small breadboard with a pro-mini, the opto-isolator for reading DCC from the track, and a socket to plug in the PCA9685 board. The arduino will be set up as an accessory decoder and will control the servos plus have 16 more I/O ports. I plan to use a 7404 on the I/O pins to provide a normal and inverted signal, allowing direct control of alternating-flasher LEDs like for a crossing signal. Overall the board (including one PCA9685) should be under $10 and then just add the cost of the servos, however I'm buying a lot of parts like headers and sockets in quantities of 5-10 because I expect to be using at least 5-6 of the boards. Once I get it all worked out then I'll post the schematics and code.
     
    Rob H likes this.
  9. bobbyboy1962

    bobbyboy1962 TrainBoard Member

    23
    5
    2
    Hey for what its worth take a look at my setup on youtube under bobbyboy1962, its a quick summary of the 3d printed and servo setup using a 2560mega and a servo shield. I have just finished installing 20 of them and it took me an evening to install. I set all the servos to a base line throw at the computer prior to installing them so that all i have to do now is power them up and tweak the numbers for optimal throw at the points.
     
    Rob H likes this.
  10. TrainboySD40

    TrainboySD40 TrainBoard Member

    257
    21
    22
    I had to choose servos because solenoids would snap the points off my handlaid turnouts. If you still haven't made up your mind, here's what I do for servos:

    I bought my servos bought on eBay (about $1.60 each) on "brackets" that are bulky but nearly free, made from small squares of 3/4" plywood on a piece of 1/8" hardboard with a hole for the wire that acts as the fulcrum. It's visible in this photo. 20160403  (34).jpg

    For control, I really like Tam Valley Octopuses (Octopii?) which are $35 each if you buy more than 5 or so, and they control 8 turnouts. (~$4.50 each) They have features that an arduino doesn't have that I enjoy, like programmable end points so that they don't work past the end of the throw and burn out, snap points, or pull the wire down into the abyss. You can also change the throw speed. With servos, you can always get a Y cable and run a pair of crossovers off of one output.

    So for servos it is indeed more work. They look better sliding over than an instantaneous thwack, cost about $6 per turnout (way less than Tortoises or other stall machines) and they take up less vertical space. Another con is you need to be careful with your wiring if you're running it long distances. Since I use 8 output Octopiises (or whatever) there are 2 locations on my railway that share one, despite them being a couple scale miles apart. You have to keep them away from DCC wires or induction will make your servos throw super hard to one side, possibly destroying them. Hey, they're cheap to replace!

    My last recommendation is that, regardless of what you end up putting under the turnouts, you make your control panels on a computer and make a photo print of them. It looks SO good. 20170402 06.jpg
     
    Rob H likes this.
  11. bobbyboy1962

    bobbyboy1962 TrainBoard Member

    23
    5
    2
    you can control the throw of servos to not over drive them by simply changing the sstart and sstop on the sketch. they can also be reversed the same way.
     
    TrainboySD40 likes this.
  12. 9MM-Auto

    9MM-Auto TrainBoard Member

    10
    7
    10

    I'm just starting to build a layout and am going to switch from using my digitrax zephyr with JMRI to using a DCC++ system. Do you know if JMRI be used to control the turnouts with the PCA9685 board or does it have to be manual control
     
  13. vasilis

    vasilis TrainBoard Member

    110
    39
    10
    very cheap and easy diy servos control with jmri
    Geoff Bunza accessory decoder controled through dcc bus
    Geoff Bunza Usb connected arduino with port extender shield
    Arduino nodes on cmri
     
    Rob H likes this.
  14. Rob H

    Rob H TrainBoard Member

    22
    15
    2
    Really interesting to see how you’re all controlling the servos especially with DCC. I’ve done a bit of experimentation using an Arduino & servo shield to control eight servos. I’m now playing with an ATTiny85 to see if I can use it as both a function decoder and a servo driver.


    Sent from my iPhone using Tapatalk
     
  15. vasilis

    vasilis TrainBoard Member

    110
    39
    10
    https://model-railroad-hobbyist.com/node/24316
    you can ommit the h-bridge and you can built it on a proto pcb or proto board. read it. in the blog you will find and the steps of the evolution of the project. I built it to test and learn. attached my working monster and the adressing for the jmri. you have to read how to insert turnouts for dccpp.
    https://model-railroad-hobbyist.com/node/34417
    The Geoff's blog is a treasure.

    the c/mri needs a little work, but you can experiment and is an alternative that i like it.
    http://www.motorhomesites.org.uk/jmri-two-arduino-control-with-cmri/
    http://www.trainboard.com/highball/index.php?threads/24-in-48-out-card-for-jmri.116454/
    http://forum.locoduino.org/index.php?topic=507.0
    http://www.utrainia.com/tag/cmri

    also you have to power your servos from a dedicated psu 5v. Geoff's decoder does it.
    I wish i could to give you the way how i do it, but i had to stop the layout building. I have arduinos, rs485 modules, shift registers for experiments but ...
    I have a concept in my mind with pushbuttons panel with indication leds, optic fibers for the track indicating the occupancy, feedback from servos with microswitches to jmri and to the panel, etc
    We can discuss it. Make one step at the time, gather the pieces and then you will resolve the puzzle.
     

    Attached Files:

    Last edited: Oct 28, 2018
  16. Erik84750

    Erik84750 TrainBoard Member

    334
    134
    12
    Very interesting post! This is exactly what I was looking for in my concept for turnout control.

    However: what kind of switches do you use to control a turnout?
    1. 2 pushbuttons, one per direction?
    2. 1 pushbutton that toggles the direction?
    3. SPDT ON - ON switch with center tab?
    4. DPDT ON - ON switch with center tab?
    5. momentary (ON) - OFF - (ON) SPDT switch?

    Thanks for your reply!
     
  17. hoyden

    hoyden TrainBoard Supporter

    815
    778
    30
    Will you need to route power to the frog? Add that complexity into the mix if needed. I started with solenoid machines and am transitioning to Tortoise machines. Spendy but reliable and versatile. I use one Tortoise to drive all four turnouts in a double crossover.
     

Share This Page