Introducing DCC++ ---a complete open-source DCC station and interface

Gregg Aug 25, 2015

  1. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    We couldn't control an electromagnetic TO, such as the Kato, directly from the pins since there is not enough current to drive the coil. We would need a small circuit that includes a few resistors, transistors, and capacitors (for each TO). Since accessory decoders already have these embedded, I stuck with them for my own layout. However, it would be neat to design a shield that includes this so you would not need the decoder.
     
    Scott Eric Catalano likes this.
  2. DrGonzo

    DrGonzo TrainBoard Member

    26
    5
    5
    Hi Gregg,
    I have ordered parts to (also) build several of Geoff Bunza's fabulous accessory decoders (based on Arduino Pro Mini's)
    to use as DCC servo controllers for turnouts.
    Combined with your DCC++ as a controller this is truly a great setup!

    I do like the idea of having the option to run a layout with a physical throttle and control panel to throw the turnouts
    in addition to fully PC based control.
    I was thinking of using the extra Mega to just generate the DCC signals to throw the turnouts via push buttons, and use
    the other Mega as primary base station.

    Just a thought..
    Kay
     
    Scott Eric Catalano likes this.
  3. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    If you do a google search for Arduino Model Railroad Turnout Control using servos there is extensive responses and code to do so....to Michael who asked about which Pololu Motor Shield I used it is this one: https://www.pololu.com/product/2503
     
  4. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    Arduino pins won't be able to fire anywhere near enough current to drive a Kato (or any other) turnout. You'll at least need a relay (or two) to handle the current.
     
    Scott Eric Catalano likes this.
  5. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    Oh that is AWESOME! I had something like that in mind, but haven't gotten around to working on it yet. What I actually need are some custom IR detector boards, but they're the same basic idea with different "shield" circuits...

    Very, very cool. Thanks for the link!
     
    Scott Eric Catalano likes this.
  6. Michael Zeeb

    Michael Zeeb TrainBoard Member

    11
    9
    2
    Thank you for the confirmation Scott,
    I did search back in the topic and found the references to this motor shield, the required jumper arrangements etc. It certainly looks robust enough and the specs are good! I might need to get me one! As Twindad exclaimed, this is getting exciting and I'm thrilled to see more options wrt accessory decoders based on the mini...... Time for some serious "playing".
    Michael
     
    Scott Eric Catalano likes this.
  7. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    I really like the idea of Arduino-based accessory decoders!

    However, I would note that for mobile decoders, we don't have much choice and need to generate DCC signals if we use standard mobile DCC decoders in our engines. But for an accessory that ultimately is controlled by a logic pin, if we use an accessory decoder based on an Arduino (or similar) AND we use an Arduino to create DCC signals in the first place, we are basically telling one Arduino to flip a pin, at which point it creates a DCC signal, sends it to another Arduino, which decodes that signal, and then flips the pin on its own board.

    Nothing wrong with that of course. But sort of like printing a copy of a Microsoft Word document, and faxing it to someone, who then scans it into a computer and uses OCR to re-create the original Word document. That works, though it may have been easier to simply send the Word document directly in email. :)
     
    KC Smith and Scott Eric Catalano like this.
  8. w8one

    w8one TrainBoard Member

    89
    109
    5
    This is like how power locks on cars work. RelaysToControlSnapSwitch_schem.jpg
     
    KC Smith and Scott Eric Catalano like this.
  9. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Awesome - that would do the trick!
     
    Scott Eric Catalano likes this.
  10. DwayneG

    DwayneG New Member

    8
    12
    5
    using something like https://en.wikipedia.org/wiki/XBee setup as star topology might be interesting for accessories, lights turnouts etc.

    EDIT: Or https://en.wikipedia.org/wiki/ZigBee might be better.
     
    Scott Eric Catalano likes this.
  11. Steve S

    Steve S TrainBoard Member

    95
    22
    8
    Scott Eric Catalano likes this.
  12. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
  13. Michael Zeeb

    Michael Zeeb TrainBoard Member

    11
    9
    2
    Yes, absolutely, I get that..... and I understand the added complexity of decoding and transmitting a signal which then is merely received and untransmitted.
    However, part of the appeal to me is the removal of the "spaghetti" wiring from all turnouts, etc. that I recall from my grandfather's setup; the thought that all the signalling can be sent along the rail "bus" to strategically placed decoders is very appealing to me.
     
    Scott Eric Catalano likes this.
  14. DrGonzo

    DrGonzo TrainBoard Member

    26
    5
    5
    Yup, same here.
    Imagine a pretty complex switch panel, and all you need are the 2 track wires coming out of it!

    And all you would really need to run the length of your layout is the track wire bus and maybe a separate 5V DC bus
    to power the accessory decoders, servos and everything else.
    That would make an additional Mega/Motorshield look worthwhile to me.

    My last layout had 2 control panels, and one of them had to have two 25 pin connectors to make it removable
    and to connect all the TO switch machines and feedback LEDs assigned to that panel.
    The wiring had gotten so complicated, that I no longer had fun working on it and decided to tear it down and
    to start over.
    2 pairs of cables. Yes! :)
     
  15. RT_Coker

    RT_Coker TrainBoard Supporter

    516
    33
    13
    For Your Information, I suspect that some of you might be interested in this.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    World’s Largest Arduino Maker Challenge

    This two-phase challenge is for you!


    Phase 1: 1,000 makers will win the newly released Arduino MKR1000 (US only) and Genuino MKR1000 (Outside US) boards powered by Atmel.

    Phase 2: Three finalists will be selected to showcase their projects; a professional video production of you and your creation; and a whopping $500 gift certificate to Adafruit.

    Finalists will also be profiled on Atmel’s Social Media channels—one of the largest semiconductor social media footprints in the world.

    What are you waiting for? Check out the details and sign up today! Have a question or need inspiration? Explore the Atmel blog and Community.


    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Bob
     
  16. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Michael - that's a terrific point and I completely agree. The mess of wires under my layout is just barely manageable. Anytime we can converge on a single bus, especially if that happens to be the tracks, it greatly simplifies everything. Because my own layout is very small (80" X 36"), I can readily reach the Arduino from anywhere. But for a large layout, running all of those extra wires would be problematic.

    Dwayne's idea for using an XBee or ZigBee would also be worth exploring, since that might eliminate the signal bus entirely.

    However, no matter how we control the signals, we still have the problem of being able to drive electromagnet snap-switches. Ironically, even though servos are a bit more complicated, they can be controlled directly from an Arduino, provided they have separate power. But snap-switches either need two mechanical relays (as w8one shows above), two solid state relays (check out https://www.sparkfun.com/products/10636), or some combination of power transistors. Would be great if we could come up with a robust design and mass-produce small ready-to-go units.
     
    Scott Eric Catalano likes this.
  17. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    I have a fairly generic relay shield I've been meaning to play with. Should do the job nicely for a pair of turnouts, anyway.

    Once I get clear of the initial JMRI work and the WiThrottle implementation, I'll take a look at a custom board...
     
    Scott Eric Catalano likes this.
  18. w8one

    w8one TrainBoard Member

    89
    109
    5
    Iv'e been looking at openLCB http://openlcb.com/, but it looks like its only half baked right now and out of date. Browsing you tube i found a website called http://www.superhouse.tv/ He is using arduino's with MQTT http://mqtt.org/ Not for model trains but same principals using Ethernet powered arduinos. Looks interesting to me.
     
    Scott Eric Catalano likes this.
  19. DrGonzo

    DrGonzo TrainBoard Member

    26
    5
    5
    These 8 channel relay boards on eBay are going for around 5 bucks and can control 4 solenoid switch machines directly
    from an Arduino.
     
    Last edited: Dec 16, 2015
    Scott Eric Catalano likes this.
  20. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    OpenLCB is now NMRA's LCC (or at least a slightly watered down version ogm
    It only looks half baked and out of date (actually the documentation might be alittle behind). OpenLCB is under active development, and is the base for NMRA's new LCC (LCC is essentially a slightly downlevel version of OpenLCB). Most of the development conversation, I believe, is occurring on the OpenLCB Yahoo! group.
     
    Scott Eric Catalano likes this.

Share This Page