DCC++ and Remote Turnouts.

cyber7 Mar 28, 2018

  1. cyber7

    cyber7 TrainBoard Member

    20
    8
    7
    Hi everybody,
    Is there a way to control the switch-mechanism of a "Bachmann Remote Turnout"? (NOT THE DCC version)

    kind regards
    Aubrey Kloppers (aka cyber7)
    Cape Town
    South Africa
     
    Scott Eric Catalano likes this.
  2. cyber7

    cyber7 TrainBoard Member

    20
    8
    7
    So, no one have used an Arduino (into DCC++) to manage Remote Turnouts? I see to date 72 people looked at my question...
     
    Scott Eric Catalano likes this.
  3. Pieter

    Pieter TrainBoard Member

    152
    46
    10
    Hi,

    Have a look at NCE's Snap-its as a start. I suppose any 2 coil (not servos) decoders should work. The amount of switches that you can control will differ from make to make or even in DIY format. Also keep in mind how each handle its power supply- separate transformer?

    Pieter
     
    Scott Eric Catalano likes this.
  4. cyber7

    cyber7 TrainBoard Member

    20
    8
    7
    Thank you Pieter :)
     
    Scott Eric Catalano likes this.
  5. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    I use simple relays that are arduino compatable
     
    cyber7 likes this.
  6. cyber7

    cyber7 TrainBoard Member

    20
    8
    7
    Hi Scott, thank you for your reply.

    Do you use this with JMRI?
     
    Scott Eric Catalano likes this.
  7. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    I connect the relays to an arduino and then I can either control the turnouts via computer, or serial port commands via arduino...or one can setup an arduino to act as a DCC decoder and use JMRI to control the turnout....I have not done that as I created my own GUI interface as well as local control buttons. If you ask over at the JRMI forums they can probably point you in the right direction or search google usiing Arduino/CMRI/JMRI and that should bring up some instructions.
     
  8. cyber7

    cyber7 TrainBoard Member

    20
    8
    7
    Thank you Scott
    Do you have any code to share? I am looking at using the Arduino as a Web server to manage remote-turnouts...
     
  9. cyber7

    cyber7 TrainBoard Member

    20
    8
    7
    Ok, I have written a web-server to run a "16 relay module". Basically, this will give me access to 8 turnouts and by adding a bit more code will run an additional 8 turnouts.

    It also uses a LED to show occupation of code, but this can also be easily be added on ever single channel, which could show you if the switch is thrown or not.

    The code is still VERY ugly and in infancy-stage, but the ideas are there...

    This is a screenshot of the "simple" web-display...
    channel.JPG
     
  10. cyber7

    cyber7 TrainBoard Member

    20
    8
    7
    The one problem I am running into is the previous state of a turnout. There is no actual way of knowing the state it was left in before, for example, a power-outage. At this stage I am thinking of having a "default state" of all the turnouts, that I will initialize the system to when powering on/up...
     
  11. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    If you're using an arduino, you could make use of the EEPROM library so that the turnout position is stored in EEPROM every time a turnout change occurs, then on power up or reset, the EEPROM is read back and the turnouts thrown accordingly.
    This is what DCC++ can do.

    https://www.arduino.cc/en/Reference/EEPROM
     

Share This Page