DCC++ and Arduino

bobbyboy1962 Nov 4, 2017

  1. bobbyboy1962

    bobbyboy1962 TrainBoard Member

    23
    5
    2
    Ok will try to keep this easy to understand, lol I have a mega 2560 and have just started with using it for servo controlled turnouts. I want to use JMRI and DCC++, can i use one 2560 with a servo shield and a DCC++ setup at the same time?
     
  2. Joe Daddy

    Joe Daddy TrainBoard Member

    469
    6
    20
    I believe the answer is yes. Check out Geoff Bunzas work on MRH website and Dave Bodnar's Trainelectronics.com sites for the information you seek.
     
  3. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    If you want to have one Mega providing the DCC signal to the rails AND control servos via the shield you should be able to as long as the shield does not use the pins required by DCC++. You will however need to develop a servo control function likely as Servos require a PWM signal and not just a HIGH/LOW signal (though that could work but would result in an instant shift from one extreme to the other).

    If you are looking for separate systems (one Mega for DCC++ base station and one for driving servos) then it would work better! You could easily use the Mega as a DCC decoder with a TON of sub-addresses (one per Servo) using the references that Joe Daddy suggests above.
     
  4. bobbyboy1962

    bobbyboy1962 TrainBoard Member

    23
    5
    2
    so based on what im reading i should be able to network the arduinos and send them into jmri? i may be biting a big chunk on this one lol
     
  5. Joe Daddy

    Joe Daddy TrainBoard Member

    469
    6
    20
    You are correct, there is alot to learn and absorb if you are starting from scratch. But the hard work of developing and integrating DCC decoder functionality into an Arduino for servo control is largely done.
     
  6. Joe Daddy

    Joe Daddy TrainBoard Member

    469
    6
    20
    Oh, you don't need JMRI, most of the DCC systems out there will control the decoders.
     

Share This Page