Controlling Model Railroad Switches with Arduinos!

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 พ.ค. 2024
  • Consider donating the PCOS Challenge to help women everywhere with PCOS
    pcoschallenge.org/
    Kato Sketch- github.com/DIYandDigitalRR/Ka...
    Snap Switch Sketch- github.com/DIYandDigitalRR/Sn...
    Tortoise Sketch- github.com/DIYandDigitalRR/To...
    Tortoise Switch Machine- www.trainworld.com/circuitron...
    Arduino UNO(affiliate)- amzn.to/3rL8QFS
    Relay(affiliate)- amzn.to/3rL8RcU
    button(affiliate)- amzn.to/3sGBJm3
    L298N Motor Driver(affiliate)- amzn.to/34WuXAs
    Resistor(affiliate)- amzn.to/3oL5lxu
    Wires(affiliate)- amzn.to/3LszVFX
    Breadboard(affiliate)- amzn.to/3JnLg8f
    Connect with me at ddrrcommunity@gmail.com
    Support the Channel on Patreon - / diyanddigitalrailroad
    Amazon Store - www.amazon.com/shop/diyanddig...
    Etsy Store - www.etsy.com/shop/DIYandDigit...
    Facebook - / diyanddigitalrr
    Instagram - / diydigitalrailroad
    TRAIN SETS
    N Scale Train Set - amzn.to/33TzsbS
    HO Scale Train Set - amzn.to/311N17g
    O Scale Train Set - amzn.to/3lAZCGu
    G Scale Train Set - amzn.to/312Cn09
    3D PRINTERS
    Elegoo Mars 2 - amzn.to/3yopRaS
    Creality Ender 3 V2 - amzn.to/3DOuKei
    CAMERA
    Sony ZV-E10 - amzn.to/3IK9pX1
    MICROPHONE
    Rode Wireless Go - amzn.to/33ipqDf
    Rode Smart Lav - amzn.to/3dN6ChI
    LIGHTS
    Aputure Amaran 100D - amzn.to/3ELlysm
    Aputure Amaran MC - amzn.to/3ER8Vfw
    GVM 480LS 2 Light Kit - amzn.to/3EOTTGY
    MOTION CONTROL
    MOZA Aircross 2 Gimbal - amzn.to/3oNb4TG
    MOZA Slypod E - amzn.to/3dMWtkQ
    Channel Merch - teespring.com/shop/diy-digita...
    “The godly may trip seven times, but they will get up again.
    But one disaster is enough to overthrow the wicked.
    Don’t rejoice when your enemies fall;
    don’t be happy when they stumble.
    For the Lord will be displeased with you
    and will turn his anger away from them.
    Don’t fret because of evildoers;
    don’t envy the wicked.”
    Proverbs 24: 16-19 NLT
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 59

  • @delurkor
    @delurkor 2 ปีที่แล้ว +1

    Thank you for this. I have a project to re-power a existing trolley car-barn that uses twin coil switch machines. The way they are mounted they cannot be replaced without ripping out the whole yard ladder. I was worried about the delay time, and your half second solution answered that question. I will be stealing.. err.. borrowing your code. Thank you again.

  • @CM-ARM
    @CM-ARM 2 ปีที่แล้ว

    Thanks for the support, my being a Cardiac patient. Thanks for your sharing of the information and the video, Chris

  • @brianpagemodeltrains
    @brianpagemodeltrains 2 ปีที่แล้ว

    Great tutorial Jimmy, thanks!

  • @TheTrainFreak
    @TheTrainFreak 2 ปีที่แล้ว +1

    Very interesting! Thanks for sharing Jimmy! - Jason

  • @jimkretzmer9193
    @jimkretzmer9193 2 ปีที่แล้ว

    Very useful tutorial, especially for someone who has never installed turnout motors!

  • @kenr86
    @kenr86 2 ปีที่แล้ว

    When you added the common wire to the snap switch, I saw a stray strand of wire running loose - I usually tin the stranded wire first, or use a crimp spade connector to avoid issues like that

  • @Reach41
    @Reach41 2 ปีที่แล้ว +1

    I did something nearly identical, but ran into a problem when the relay boards I used did not have optically isolated I/O as claimed. I had to add a diode across the output of each relay to handle the voltage spike caused by the solenoid fields collapsing. One other difference was in the time I allowed for switching, which was around 100ms.

  • @Ballinalower
    @Ballinalower 2 ปีที่แล้ว +1

    I am building a layout. I have installed Cobalt motors. They are like the Tortoise but a bit more compact. And each has a decoder built in. Simply install them then connect directly to the same wires that power the track, assign an address and control with the same DCC controller that runs the trains. Nothing could be simpler. I highly recommend the Cobalt motors to anyone using DCC.

    • @keaganwright124
      @keaganwright124 2 ปีที่แล้ว

      Yes they are similar to SMAIL point motors(same company as the tortoise) I have been looking at the two and from the reviews on youtube the cobalt is smaller and cheaper but also louder than the tortoise.

    • @Ballinalower
      @Ballinalower 2 ปีที่แล้ว

      @@keaganwright124 I have never heard a Tortoise but you can certainly hear a Cobalt.

  • @4everdc302
    @4everdc302 2 ปีที่แล้ว +1

    Simplifying something that's black magic👍Will help MRRr's who want to do this. My conductors will still be stepping off&movin my caboose switches lol🚂🇨🇦🇺🇲

    • @johnm8342
      @johnm8342 ปีที่แล้ว

      I enjoy the videos... great! I have caboose switches, which I prefer. I am thinking of using piano wire connected from one side of the throw, to a sprung N/O N/C limit switch beneath. So, the switch is pressed when throw is in one of two positions. Looking at this video, I would need to add a resister (or incandescent light) for using the Arduino to sense when the switch is made, right?. I want to continue using the caboose switches, have the Arduino sense the change in switch position, and do more than just signals and lights, not sure what that is just yet. Would like to see more videos on the concept of using buttons and such. Thanks.

  • @medwaymodelrailway7129
    @medwaymodelrailway7129 2 ปีที่แล้ว

    Like the video very much hope there more to come. Thank David.

  • @shon9kemp
    @shon9kemp 2 ปีที่แล้ว

    This my be a dumb question. I never messed with a Arduino uno thing but on the continuous closed could you run your signal lights off of that or not? I always did the dpdt momentary switch or manually threw the turnout

  • @jamescraft672
    @jamescraft672 2 ปีที่แล้ว +1

    It would be interesting to see how you install the pushbuttons and the electronics for use on your railroad. I assume that the pushbuttons go on the fascia. Thanks.

    • @Beliar275
      @Beliar275 8 หลายเดือนก่อน

      Not necessarily - you can use them and build a so called track diagram signal box - it shows a simplified trackplan - and on turn outs you mount the switches at the appropriate position at the point of the turn out in question. Although I dont like this single-action design .. 2 push buttons - one for straight, one for turned are easier to control. And when you use this signal box - make use of the feedback contacts of the switch machine

  • @pticurina
    @pticurina 2 ปีที่แล้ว

    One question about N scale i can use for example kato trains on FLEISCHMANN or MiniTrix trains on PECO rail system since they are all running on DC power? Its not like in H0 scale where we have AC power on marklin?

  • @markarnold8160
    @markarnold8160 2 ปีที่แล้ว

    Haha you went a bit Elmer Fudd on one of those outtakes!

  • @abdullahabu1252
    @abdullahabu1252 ปีที่แล้ว

    I like your show. I would like to know what kind equipment can be use whith slow machine switch turnout. Please advise me

  • @pillaroftruth2830
    @pillaroftruth2830 11 หลายเดือนก่อน

    can this be setup for a tortoise switch machine be set up with a Loconet interface to the Arduino for JMRI or Traincontroller? If so, how would the Arduino sketch be changed to accommodate the interface and for use with more than one Tortoise switch machine?

  • @mr.shadestrains6033
    @mr.shadestrains6033 2 ปีที่แล้ว

    Awesome 😎👍

  • @microplumb
    @microplumb ปีที่แล้ว

    Cool project, if it possible to add LED ont snap project! thanks

  • @cadmaster44
    @cadmaster44 2 ปีที่แล้ว

    What's your thoughts on the new Digitrax DSXSV9 9G turnout motor, My understanding is that all you need to do is hook it to the main bus and give it an address and your golden.

  • @brendanpratt7760
    @brendanpratt7760 ปีที่แล้ว

    How would you do this with servos instead ?

  • @gamepad3173
    @gamepad3173 2 ปีที่แล้ว

    I'll have to try this with Dead rail and see what kinds of results I get.

  • @jeffmonegal2766
    @jeffmonegal2766 2 ปีที่แล้ว

    Hi - surely you are not leaving power connected to the snap action point motor coil after it moves the turnout. By using a relay power must be still connected after the motor moves the point. This will lead to coil burnout. Is this what you have done or have I missed something?
    Cheers Jeff

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  2 ปีที่แล้ว +2

      Hey Jeff. No the power leads to the relay are connected to the “normally open” sides of the relays and are disconnected unless activated. This is why you have to use 2 relays per turnout. One for briefly powering one coil and one for briefly powering the other coil. If the relays are in their default state, the relays sit in the “normally closed” position and keep the coils disconnected.

  • @shamiester
    @shamiester 11 หลายเดือนก่อน

    How can I replace the push button with an IR sensor

  • @scentgrasslakerailway
    @scentgrasslakerailway ปีที่แล้ว

    Can the sketch from "Model Railroad Arduino Block Signal Upgraded!" (posted September 27, 2021) be incorporated with this sketch not only to operate switches but also to detect trains and control signals. Will the arduino's play together in a combined sketch? I guess I'd need more arduino's to operate the switch machines...?

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  ปีที่แล้ว +2

      Well this sounds like a video idea!

    • @scentgrasslakerailway
      @scentgrasslakerailway ปีที่แล้ว +1

      @@DIYDigitalRailroad Thanks, that would be fantastic! Your videos are always great at explaining 'how-to-do-it'.

    • @scentgrasslakerailway
      @scentgrasslakerailway ปีที่แล้ว

      Any luck as yet in terms of developing that video? If not, no problem just asking…

  • @jmi5969
    @jmi5969 2 ปีที่แล้ว

    This isn't what I expected. How does your Arduino sense the incoming trains, so it can decide the direction of the switches? Sensing rail current? Reed relays? Lidars of IR guns? this sort of thing.

    • @JacksonSubNScaleModelRailroad
      @JacksonSubNScaleModelRailroad 9 หลายเดือนก่อน +1

      It doesn't. The arduino is only waiting for input from the button, and when it senses the button press, it actuates the switch. That's it.

  • @jackboren431
    @jackboren431 2 ปีที่แล้ว +3

    Q- Can you control multiple turnout motors using a single Arduino nano? If yes, how many?

    • @jacobew2000
      @jacobew2000 ปีที่แล้ว

      You can, but you are limited to the number of digital i/o's on the arduino. So a nano has 14 digital i/o's. Each one you use for a switch, will reduce the outputs for a relay. So in theory, you could do 3 dual switch machines with relays (2 each) with 3 push buttons. I usually recommend mega's for this reason.

  • @railbuilderdhd
    @railbuilderdhd ปีที่แล้ว

    Can you connect this to DCC.

  • @garycrumrine9538
    @garycrumrine9538 2 ปีที่แล้ว +1

    Wow, you do this for every turnout? I think I am going to take up fishing....

  • @roguerailroader4132
    @roguerailroader4132 2 ปีที่แล้ว

    This is cool but how about Peco point motors? Like the PL-10 or PL-15. I don’t know if they’re different electrically but I think they’re about the same.

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  2 ปีที่แล้ว +1

      So I have never used those motors but as far as I can tell, the PL-10 is a twin coil machine like what I showed here.

    • @roguerailroader4132
      @roguerailroader4132 2 ปีที่แล้ว

      @@DIYDigitalRailroad So follow the directions for the snap switch type right?

    • @wreckingball7
      @wreckingball7 2 ปีที่แล้ว +1

      @@roguerailroader4132 yes

  • @anfieldroadlayoutintheloft5204
    @anfieldroadlayoutintheloft5204 2 ปีที่แล้ว

    Good video

  • @C52MYERS
    @C52MYERS 2 ปีที่แล้ว +5

    I know arduino is cool, but with Kato switching all you need is dpdt momentary switch and a wall wart a lot cheaper and easier. Just my two cents.

    • @KatoOnTheTrack1
      @KatoOnTheTrack1 ปีที่แล้ว

      If you manually want to switch them yes, this is a basis of automatic control. Some photo resisters to this application and the door is open to other opportunities on a layout

  • @rmsteutonic3686
    @rmsteutonic3686 2 ปีที่แล้ว

    I still use manual switches as my DC layout is still under construction

  • @user-zh2ze3lk5m
    @user-zh2ze3lk5m 5 หลายเดือนก่อน

    enjoyed vidio but could not find arduino prog i have been looking for this answer for a long time

  • @rwissbaum9849
    @rwissbaum9849 ปีที่แล้ว

    DO NOT solder wires direct to the Tortoise! It will work just fine, but it will be very difficult to unsolder and resolder the connections if you ever need to move the Tortoise. Buy a Tortoise Edge connector - there are several firms that offer them - and solder your wires to the edge connector. It is then a simple matter to unplug the edge connector and plug in a different one if you ever need to change out the connecting wires. (In addition, you can do your soldering above the layout instead of under it!) The Tortoise costs about $20; an edge connector costs about $3.

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  ปีที่แล้ว

      I can see that, but I have never had issues unsoldering wires from a tortoise and resoldering them.

    • @rwissbaum9849
      @rwissbaum9849 ปีที่แล้ว

      @@DIYDigitalRailroad Perhaps I'm just clumsy: I can unsolder the wires just fine, but the solder clogs the holes, and they only way I've ever been able to clear the holes is to Drill them out. Maybe I'm just lazy...

  • @dennisedgar3430
    @dennisedgar3430 2 ปีที่แล้ว

    Can you operate more than one turnout motor per Arduino?

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  2 ปีที่แล้ว

      Yes! As many motor drivers as you can hook up to the arduino. It just takes some code modifications.

  • @terrytaylor8866
    @terrytaylor8866 2 ปีที่แล้ว

    I have atlas snap switches, this is interesting but way over kill. DPDT switches is all that's needed.

  • @CommentsAllowed
    @CommentsAllowed ปีที่แล้ว

    I only cringed at 3:14. Can anyone guess why? LOL
    Though, I am very detail oriented. Your mileage may vary.

  • @sushildamle3449
    @sushildamle3449 ปีที่แล้ว

    Marvelous and easily explained. Instead of using 'Button', I thought of using 'Ultra Sound Sensor' along with 'Snap Switches'. Earlier I have done by using 'Servo Motor SG90' which can be viewed on TH-cam (th-cam.com/video/P6YYbh46wQg/w-d-xo.html).
    Could some one guide me the changes, I need to do in code (sketch) in this case (USS along with L298N and Snap Switch). I felt that fixing snap switch will be easy as compaired to servomotor.
    Thanks in advance for the guidance.
    With warm regards.
    Sushil Damle
    28022023@1437 Hrs IN.

  • @asquarewithtriangularprope3093
    @asquarewithtriangularprope3093 ปีที่แล้ว

    PS, please dont say Amazon.

  • @steamy1225
    @steamy1225 2 ปีที่แล้ว

    Way to complicated for a snap switch motor. All you need is 12 volts, wires and 2 switches to snap it back an forth. Or one of the slide and push switch. Even for the tortoise, too many components. Needs to be simpler. Thats my opinion.

    • @wild_lee_coyote
      @wild_lee_coyote ปีที่แล้ว

      The whole video is on using Arduinos for controlling switches, it’s in the title. Yes you can use simple DC power and switches, that what they were originally designed for. But you can’t do automated setups with all manual switches. That’s what Arduinos provide, a route for automation or computer control.