A Stationary Decoder for KATO turnout

Mani Jan 24, 2020

  1. Mani

    Mani TrainBoard Member

    76
    15
    4
    I have been working on the video on how to build a DCC stationery decoder (based on Myna bay serial monitor) which uses Ardunio and Motor shield.
    Interested folks can follow this thread for updates.
     
    SD_Marc, IronMan1963 and mtntrainman like this.
  2. Mani

    Mani TrainBoard Member

    76
    15
    4
    Hi Guys,
    Here is my first ever Youtube upload on MRR. I tried to switch KATO turnouts with my DIY DCC Decoder which has predefined DCC Address (based on Myna Bay)




    What I am planning next?
    1. Full fledged decoder (hopefully) that can be programmable and store addresses & state
    2. Use Relay switch instead of Motor sheild

    Link for Ardunio Sketch: https://drive.google.com/open?id=1z9kBEcvdRjFvneZ1Ylml1ISS3som04Vb
    Link for DCC library I am using: https://github.com/MynaBay/DCC_Decoder
    This library needs to be included (copied) to Arduino libraries folder
     
  3. papahnash

    papahnash TrainBoard Member

    337
    69
    17
    Hi Mani,
    That looks great. I would like nothing better than to replace the DS64 for future expansion. The hardware you are using costs far less. How many turnouts can be controlled with the motor shield?
     
    Mani likes this.
  4. Mani

    Mani TrainBoard Member

    76
    15
    4
    Hi,

    Currently I am using 2 channel motorshield so we can control 2. With Adafruit shield we can control 4. I will give a try controlling 2 turnouts and update how that goes.

    Sent from my GM1901 using Tapatalk
     
    papahnash likes this.
  5. Mani

    Mani TrainBoard Member

    76
    15
    4
    Just tested with Channel 2 successfully. So a 2 channel Motor shield can turn 2 Kato turnouts !!
    Here is the updated sketch. There are only 2 changes.

    1. NO OF TURNOUTS (Count is now 2)
    upload_2020-2-3_15-34-18.png

    2. Add entries in setup()
    upload_2020-2-3_15-37-25.png

    Sketch Link:
    https://drive.google.com/file/d/1QSM8daxgIKwc7BKpiBSxFRLxVQQBfX8w/view?usp=sharing
     

    Attached Files:

  6. Mani

    Mani TrainBoard Member

    76
    15
    4
    To use Adafruit Motoshield, I need to include library (as we cannot talk to pins directly). So, Some code level changes required. Once it is in place we can control 4 turnouts.
     
    papahnash likes this.
  7. Mani

    Mani TrainBoard Member

    76
    15
    4
    papahnash likes this.
  8. Mani

    Mani TrainBoard Member

    76
    15
    4
  9. Mani

    Mani TrainBoard Member

    76
    15
    4
    My Arduino with Adafruit DCC Turnout system. Currently controlling 2turnouts + 1 cross over..

    On left is 12v to 5v stepdown converter.
    center is Double relay switch circuit.
    Right is UNO with Adafruit motorshield.
    Top right optoisolator circuit.
    Bottom is connection to 12v 3amp power supply.

    Crossover is getting power from relay as it needs more power to turn all four tunouts.

    Remaining two turnouts connections are directly from the motorshield.



    [​IMG]

    Sent from my GM1901 using Tapatalk
     
    mtntrainman likes this.
  10. ccStar

    ccStar New Member

    2
    0
    1
    Hi Mani,

    Thanks for sharing this thread! Have you tried that 16-channel AdaFruit interface you referenced?

    Best regards, -Chris.
     
  11. Mani

    Mani TrainBoard Member

    76
    15
    4
    Chris, I have not tried as it is not available in my country..

    Sent from my GM1901 using Tapatalk
     
  12. Mani

    Mani TrainBoard Member

    76
    15
    4
    And ofcourse the code needs to be changed a bit as it is servo motor driver..

    Sent from my GM1901 using Tapatalk
     
  13. ccStar

    ccStar New Member

    2
    0
    1
    Mani, thanks for letting me know! You've provided an excellent starting point for me.
     

Share This Page