I got started on building switch machines from servos

White River Line Mar 31, 2023

  1. White River Line

    White River Line TrainBoard Member

    65
    98
    4
    Let me know if you have any suggestions.

     
    BoxcabE50 and Hardcoaler like this.
  2. Hardcoaler

    Hardcoaler TrainBoard Member

    10,762
    45,470
    142
    I remain so impressed by your videos -- quiet, informative and well paced. My impatience often limits my want to sit through videos, but yours retain my interest throughout. And, as a bonus here, I finally know how to pronounce "Arduino". :)

    By the way, I keep a notebook on my build too, though mine is in Word so I can more easily find key words amidst everything in there.
     
    Last edited: Mar 31, 2023
  3. Sumner

    Sumner TrainBoard Member

    2,835
    5,969
    63
    Nice video and good work with the Arduino (y)

    I've spent time on this same situation over the past few years and have a couple things I've come up with that might help.

    [​IMG]

    One is I have a couple different servo brackets that allow one to mount one or two limit switches to control the frog polarity and/or something else (links to the print files are on my site). A two limit switch one is shown above but if you don't need the second switch (only one is needed for frog polarity) print the one for a single switch. Prints faster and uses less material.

    These brackets would overcome a couple problems you are having and also they are a single part so no assembly.

    You can rotated the limit switch. That allows you to have more range of control on the servo as the limit switch doesn't limit the range as what is the case now with your mount. I put the wire (.037) usually in the third hole down. Servo has to move further to throw the turnout but has more power as the turnout has less leverage on the servo. This has worked with 1 1/2" layout thickness ( 1" foam on 1/2" plywood). I rotate the limit switch out of the way and adjust the throw so that it is throwing the points. Then I rotate the limit switch back against the lever arm to where it activates and lock it down with the bottom screw.

    These mounts are also easy to put into place. I lay the turnout exactly where it is going to be and drill a .040 hole into the layout top using the hole in the throwbar (also .040) as a guide. Then remove the turnout. Use a couple progressively larger bits ending with a 1/4" hole centered on the beginning .040" hole.

    [​IMG]

    Then I put the tool above up through the hole and rotate it using the top indicator so that it is pointed down the centerline of the track.

    [​IMG]

    Lock it into place using the square tool above. Go under the table and drill two pilot hole using the bottom of the tool. Go back up top and remove the tool and start two screws into the bracket so that they just protrude. I also double bend the piano wire and put it into the servo lever. You can get 100 one foot pieces of the wire for about $13 plus shipping. I cut them in half, using a 6 inch piece on the lever arm.

    [​IMG]

    Go back under and put the servo up into place. Using the protruding screws and the pilot holes it falls right into place. Run the screws down and it is mounted in about the same amount of time that it took to read this and you are under the layout for about a minute total (important when you are older).

    [​IMG]

    You will find the wire perfectly centered on the hole (if the servo is centered). I slide the turnout down on the protruding wire and fix it in place. I don't glue my turnout down but do glued the track attached to them down. I also don't solder the joiners between the track and turnout down. I run jumpers to the turnout so don't rely on the joiners for electrical contact. If I needed to remove a turnout I can slide the joiners back and lift it out. Ballast is going to complicate that a little bit.

    Nice work with the Arduino. I like Arduino's and I'm using some for the roundhouse turntable but didn't want to use them for the turnouts as I would of needed a number of them. Using Bodner's idea where you can operate the servo with a $2.00 servo controller I took...

    [​IMG]

    .... that and went a little further with it. You end up with a second pot in the circuit and you can use the two pots to easily adjust the throw of the servo and throwbar on both sides of the turnout so that it throws but doesn't overpower the points. The servo controller is controlled by a a toggle switch, DPDT slide switch (optional), a push button switch and two indicator LEDs. Most of my switch boxes will be....

    [​IMG]

    ..... near the turnout but you can also mount the above components in a more conventional panel.

    Lots more on all of the above here ....

    https://1fatgmc.com/RailRoad/Servo%20Control/Servo%20Control-Index.html

    Hope some of that might help you out some and keep doing the good work.

    Sumner
     
    Last edited: Mar 31, 2023
    Hardcoaler likes this.
  4. White River Line

    White River Line TrainBoard Member

    65
    98
    4
    Thank you. Always great to hear such positive feedback. Even though I work in tech I've always preferred analog notetaking. Also, typing stuff in word isn't as video friendly as a real notebook, LOL.
     
    Hardcoaler likes this.
  5. White River Line

    White River Line TrainBoard Member

    65
    98
    4
    Thanks for the suggestions. I especially like the ability to adjust the position of the limit switches to get the range of motion I need. Since all my turnouts are already installed, I'm afraid I'm a bit stuck with struggling through the process of treading the wires. I'm sure I'll come up with something a bit easier than what I did in the video.

    I've got some other recommendations for separate controllers for the servos. Part of the reason I'm going with the Arduino is the ability to interface with JMRI. I'm planning on adding a servo shield or two on the Arduino that will allow me to address the servos using the I2C pins leaving the remaining pins open to interface with my push buttons and LEDs. If I build it right I think I can control all of the turnouts on my layout with a single arduino. Theoretically I think you could control up to 100 from a single arduino.
     
  6. Sumner

    Sumner TrainBoard Member

    2,835
    5,969
    63
    What I do if I have to go back and put the control wire in with the turnout in place is use one about 6 inches or more in length. Put it in from the top like you showed and keep it from falling through, again like you showed. Then underneath I put a a double bend in it. Take the lever off the servo if the servo is attached. Put the double bend into the lever arm and put the arm back onto the servo. Go up top and cut the wire to length.

    Another option with my brackets is to unscrew the servo bracket with the servo on it. Move it around to get the wire into the lever arm with the lever still attached. Move the servo up against the bottom of the layout and re-screw it. Finish by cutting the wire off at the turnout.

    Nothing wrong using the Arduino's I just want to throw turnouts as I walk with the train and the switch boxes and servo controller are an easy way to do that.. I might setup the area on and around the track elevator to have more or less an automatic control in that area but would program an Arduino or more to handle that and not use JMRI but JMRI is great for some and I do use it for programming locos and love it. I'm just not much into automation myself but realize it is important for others.

    The other turnoff for me and others I believe is going in and setting up all of the throws in the Arduino sketch. For some just having to learn about Arduino's and working/programming them is too much. For myself and for some the $2 servo controller is a possible solution and you can setup the throw on a turnout in a minute or so and be done with it or come back and easily adjust it and not need to know more than how to turn the knobs on two pots. Again I'm not saying this is the solution for everyone, for from it.

    Not sure but with the layout being 24 feet long I'd have long runs (at least 12'-14') for some of the servos and wonder about runs that long using servo cable from an Arduino? Also are all of those servos powered up all the time the layout is being used? Mine are only powered when activated by the switch box for a few second.

    Also a tip on wiring the frog polarity. I have a one wire drop off the top pole of the DPST switch that goes to the frog. Then I cut a longer servo cable in half and use only the two outer wires. I connect the two outer wires to the other two poles of the DPST switch with the stock 3 wire servo plug on the end of the wire. Then attach the other half of the servo wire I cut in half to the DCC buss wires for power to the DPDT switch. Then connect the two plugs together and check the polarity at the frog. If it is wrong un-connect the two plugs and rotate one 180 degrees and plug them back together and the polarity will be correct.

    Will be looking forward to your updates,

    Sumner
     
    Last edited: Mar 31, 2023

Share This Page