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

Gregg Aug 25, 2015

  1. Atani

    Atani TrainBoard Member

    1,466
    1,736
    37
    That isn't the only active fork of the code.. I have an esp32 version and also a version for the Arduino that adds a number of features. Possibly if there is demand I might more to the Arduino from the esp32 version..

    Sent from my ONEPLUS A5010 using Tapatalk
     
    Scott Eric Catalano likes this.
  2. SKMoss

    SKMoss New Member

    8
    5
    16
    THANKS. I was afraid I had missed the boat.
     
    Scott Eric Catalano likes this.
  3. paulie77

    paulie77 New Member

    4
    4
    8
    I'm new to DCC++ also. While this probably isn't the same without Gregg, this thread certainly has a lot to offer. I finally got involved with Arduino because of this, and making a control panel with Processing seems to be a great way to go. I have my work cut out for me, but in any case, I am learning a lot from the currently active folks as well as the original people.
     
  4. David Slipper

    David Slipper New Member

    4
    5
    4
    Hi, I'm a DCC++ newbie. I have just installed the controller package onto an UNO with an Arduino Moto Shield and am probing around with a scope.

    I notice that when I turn the track power on with the 'P' command the track is continuously being driven alternately in each direction and the pulses are about 50uSec long in each polarity with occasional pulses double that.

    Is this normal? Is the arduino continuously driving a command onto the rails?

    I'm trawling through the sources - but perhaps there's a simple answer.

    The "rail power" LEDS on the motor board are solid "on".

    Perhaps I'm missing somat!?

    Regards,
    Dave
     
    Scott Eric Catalano likes this.
  5. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    You are good to go. That is what you should see.
     
    Scott Eric Catalano likes this.
  6. David Slipper

    David Slipper New Member

    4
    5
    4
    Excellent - Good to know
     
    Scott Eric Catalano likes this.
  7. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Hi,
    Just to answer this question, when there are no specific commands being sent on the rails, the base station sends 'idle' data packets, in order keep a reversing polarity on the rails, this being a requirement for the DCC standard format.

    I guess this (dcc requirement) was originally designed partly in order to give a degree of backward compatibility - in theory a single 'non DCC' (analogue) loco can be placed on the DCC track and it wont move due to the rapidly reversing voltage giving a net average of 0 volts. On some DCC systems (I don't believe DCC++ supports this) the analogue loco can then be operated by altering the timing of the DCC data bits and creating a net average of + or - volts on the rails. However, I understand that many modern analogue locos with their more efficient motors don't take kindly to the high frequency 'ac' supply, and whistle or overheat.

    https://dccwiki.com/Digital_packet

    Jim
     
    Scott Eric Catalano likes this.
  8. David Slipper

    David Slipper New Member

    4
    5
    4
    I think I have a timing problem.
    The "1" pulses are a bit short at a little under 50uSec per half bit (spec says 55uSec MIN).
    I have checked the crystal on the UNO - it's 16MHz and it's oscillating at that.
    Admitedly its an eBay clone - and I do have another to try - and I could try a 2560.
    Just thought I'd check to see if a tweak was needed for the UNO.
    Best regards,
    Dave
     
    Scott Eric Catalano likes this.
  9. Atani

    Atani TrainBoard Member

    1,466
    1,736
    37
    The DCC++ code is set to use ~58uS for each half of the pulse for a one and ~98uS for a zero. I would check the sensitivity on the scope to see if you can confirm it is truly at 50uS. If so it could mean there is a problem with how the code was compiled and uploaded to the Uno. Did you make sure to set the board type and any related parameters in the IDE prior to upload?

    The code should automatically adjust based on the board type as well.
     
    Scott Eric Catalano likes this.
  10. David Slipper

    David Slipper New Member

    4
    5
    4
    Sorry - finger trouble on my part.
    All seems OK.
    Thanks for the help!
    Bob
     
    Scott Eric Catalano and Atani like this.
  11. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    What motor shield will fit the mega.
     
    Scott Eric Catalano likes this.
  12. Atani

    Atani TrainBoard Member

    1,466
    1,736
    37
    Any that will fit an uno will fit the mega as well.

    Sent from my ONEPLUS A5010 using Tapatalk
     
    Scott Eric Catalano likes this.
  13. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    Great. I've been playing with the mega with an old radio shack electronics expermenter's kit. Now I'm ready to start playing with dcc ++
     
    Scott Eric Catalano likes this.
  14. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    I very well may of ordered the wrong motor shield
    Will this one work
     

    Attached Files:

    Scott Eric Catalano likes this.
  15. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    The only this is this motor shield looks so much different than the others I've seen used.
    On another note this one and the other l298P's state a 12 volt max.
    Please be patient with me I'm just a newly.
     
    Scott Eric Catalano likes this.
  16. Kerwin50

    Kerwin50 TrainBoard Member

    17
    17
    7
    This is what I found out
    Kerwin Abels I did not change anything. I use only compatible shields.
    I'm not such an advanced programmer in C ++, but as far as I could understand, DCC++ uses hardware timers to a DCC signal.
    this pin 5 for the program track and pin 10 for the main track. and you cannot change it.
    since your shield uses pin 10 for its work, the only option as it can be used - connect it to the arduino with wires.
    but the program track will not work anyway
    I was on the dcc++ Facebook page and got this reply.
    I should of just ordered the pololu motor shield. Now I got 2 worthless motor shields. This one and the l298L
    The adurino l298p is still out of stock.
     
    Scott Eric Catalano likes this.
  17. MelM2

    MelM2 New Member

    2
    2
    1
    I found the sketch with SAMPLE OVAL LAYOUT very informative as it explains very well the layout functions and syntax. As I'm planning to build my first automated layout, I was disappointed that this sketch didn't address sensor-related functions and syntax. Is there another sketch that has detailed explanations associated with sensors? I'm also looking for a detailed explanation as to how the AUTOPILOT coding works. Thanks in advance for any help.
     
    Scott Eric Catalano likes this.
  18. MelM2

    MelM2 New Member

    2
    2
    1
    Never mind as I've decided to run with JMRI Dispatcher scripts - lots of documentation is available.
     
    Scott Eric Catalano likes this.
  19. Ian Robins

    Ian Robins New Member

    5
    0
    2
    Hi, I'm new to DCC++ and I'm having a problem setting it up.

    I am using a Elegoo Mega 2560. I have uploaded the DCCpp_Uno file but when I test it by sending a <1> command with the serial monitor the LED remains on and the Serial monitor displays <1><2>

    Can anybody help me please

    Ian
     
  20. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Hi Ian - and welcome to the [wonderful] world of DCC++ !

    Which LED are you referring to? The 4 LEDs on the motor board should be off when the system is first powered up, then they should all switch on when you send the <1> command.

    Do you get anything on the serial monitor when you reset the arduino or send <s> (status)

    I can't think of any reason it should generate a <2> reply. Unfortunately all my railway layout stuff is packed away as I'm in the middle of moving house, so I can't look anything up except what's on the web or in my memory!

    Jim
     

Share This Page