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

Gregg Aug 25, 2015

  1. ISCOLD

    ISCOLD TrainBoard Member

    36
    38
    3
  2. ISCOLD

    ISCOLD TrainBoard Member

    36
    38
    3
    Thanks a lot for this complete explanation.
     
    Scott Eric Catalano likes this.
  3. ISCOLD

    ISCOLD TrainBoard Member

    36
    38
    3
    Gregg,

    OOps my fault.
    I will purchase the Jason Rausch specific DCC++ shield.
     
    Scott Eric Catalano likes this.
  4. ISCOLD

    ISCOLD TrainBoard Member

    36
    38
    3
    Jason,

    Great, let me know when it will be ready.

    Regards
     
    Scott Eric Catalano likes this.
  5. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
  6. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Scott Eric Catalano likes this.
  7. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    All,

    I created a new Documentation repository within the DCC++ GitHub (https://github.com/DccPlusPlus/Documentation) to store various system documents. The first one uploaded is a PDF containing detailed pin mappings and configurations for using either an Arduino Motor Shield or a Pololu MC33926 Motor Shield, with either an Arduino Uno or Arduino Mega. I will endeavor to provide more documentation over the upcoming weeks.

    -Gregg
     
    Scott Eric Catalano and ISCOLD like this.
  8. mayhaw9999

    mayhaw9999 TrainBoard Member

    27
    28
    5
    Scott, that's what I was worried about. According to what I have found out, NMRA allows up to 22V in HO, but the commercial power supplies are usually in the 15 volt range. Gregg is using 15V for his N scale layout, so I surmised more would be OK for HO. Could you measure the output from your Pololu shield for me. I'm going to run the 20V supply through a voltage regulator – probably a LM150 or LM350 adjustable regulator. I want to set it at the proper voltage. Anyone else have ideas for the best voltage for a HO DCC++ layout.
     
    Scott Eric Catalano likes this.
  9. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    I'm getting about 18 volts and less than 2 amps....the amps maybe lower for others as I am running some lighted passenger cars
     
  10. DwayneG

    DwayneG New Member

    8
    12
    5
    Hi,

    You would probably benefit from doing what I did, as I am just starting out in the hobby I don't yet have a layout, I have one loco and a bit of flex track. So what I did was program my loco to use ID 2004 the same as the top one from Gregg's layout. I then just used Gregg's GUI to get things started.

    Since then after fixing a few issues in JMRI 4.2, I now have JMRI hooked up to it along with the Android wifi Throttle App on my tablet.

    Here is a quick video :)
     
  11. mayhaw9999

    mayhaw9999 TrainBoard Member

    27
    28
    5
    Super. It won't be hard to reduce the 20 V to 18, maybe just a diode to two.

    David
     
    Scott Eric Catalano likes this.
  12. RossNZ

    RossNZ TrainBoard Member

    12
    12
    5
    Hi,
    After a few distractions I have got back to the fun of getting DCC++ to operate on my outdoor G railway.
    First hold up was that I had my first failure of "free post from China" hardware so the MEGA 2560 is on the scrap heap and its back to the MEGA1280 with an Arduino motor shield.
    Second hold up was that my first trial run did not go well. Turned out the power supply I was using was defective . Another addition to the scrap heap.
    The train used in that trial didn't function to well after that trial on DCC or DC, but those issues have now been resolved by a visit to a friend who's railway runs DCC or DC.
    While there I got both trains reprogrammed to 4 digit addresses. Turns out that somehow I successfully confused the poor thing as to what system it was supposed to be recognizing.
    So far so good. The train I am running requires at least 1 Amp according to its book. I have DCC++ running using the latest download. The train moves back and forth so long as I don't go over 35 on the throttle. Anything over that and the currant meter goes over 800mA and shuts off the power. Brings me to the question of how to adjust the top limit of the currant meter?
    Then there will be the small matter of getting the 15 functions onto buttons on the controller screen. I have successfully changed the loco number buttons permanently.
    I have not tried reading or changing any CV's yet. That one seems to be a little to adventuresome for me just yet.

    Ross
    NZ
     
    Scott Eric Catalano likes this.
  13. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    Sounds to me that the motor shield cannot handle the power load...I suggest using the Digitrax power supply which supplies the correct voltage for N Scale, HO Scale and G Scale....also I'd recommend using the Pololu Motor Shield that can handle the higher current as well. I am having great success using these two items together.
     
  14. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Hi Ross,

    Glad to hear that things are moving in the right direction. To change the current limiter, first make sure you have the latest version of the DCC++ Base Station (Master Branch) from GitHub. Then, in line 16 of CurrentMonitor.h file:

    Code:
    #define  CURRENT_SAMPLE_MAX         300
    try increasing to 600 -- this should set the circuit-breaker to almost 2 AMPs (which is the max for the Arduino Motor Shield).

    -Gregg
     
    Scott Eric Catalano likes this.
  15. Malahini

    Malahini TrainBoard Member

    26
    14
    7
    Gregg:

    I am interested if the Arduino could be used without the motor shield to transmit via a TAM valley or CVP system directly to engines with receivers on board. I use battery power but could see this used along with keep alive circuits as well. The new Bluetooth receivers are promising but another technology all together.

    Neil Erickson
     
    Scott Eric Catalano likes this.
  16. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Neil, I'm unfamiliar with TAM or CVP but the Arduino itself is terrific at signal processing and generation (subject to its clock speed of 16MHz), and my guess is that a program could be written to control just about any system.

    -Gregg
     
    Scott Eric Catalano likes this.
  17. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    Oh... OK... I get it. JMRI stores the current supposed state of all the function buttons in its "Throttle" object... it keeps separate track of the on/off toggle state and the momentary state... I haven't dug high enough into the upper level code to see just how this is handled, but it's in a standardized, generic form (all abstract throttles are the same at some point).

    It's entirely possible that I've done this wrong, and I'm not at all certain how it handles start-up state initialization (the functions are stored as boolean, so there's no option for an "unknown" state), but at least once things get going, JMRI will be able to keep track as long as everything going to the base station is fed through the computer in one way or another (e.g. LocoNet-connected throttles).
     
    Scott Eric Catalano likes this.
  18. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    BTW, News Flash: JMRI 4.2.0 DCC++ support is also broken. I did a pretty major rewrite to fix the problems in 4.1.6, but those changes got bumped to 4.3.1 (due to the timing).

    I'm hoping/lobbying to get those changes included in a 4.2.1 bug-fix release, if there is one.
     
    Scott Eric Catalano likes this.
  19. hoyden

    hoyden TrainBoard Supporter

    815
    778
    30
    I got my DCC++system working today; Mega 2560 with Arduino motor shield fed from a 15V power supply. I used the terminal monitor to send manual commands successfully.

    TwinDad, how does JMRI interface with DCC++?

    Since about 2008 I have been using a Digitrax Zephyr with JMRI with mostly excellent results except for the 2.5A current limit and having only 10 slots. I am unsure how I want to use DCC++ and I will be experimenting with its capabilities now that I have it working.

    Thank you, Greg, for sharing your design.
     
    Scott Eric Catalano likes this.
  20. TwinDad

    TwinDad TrainBoard Member

    1,844
    551
    34
    This should help:
    http://www.jmri.org/help/en/html/hardware/dccpp/index.shtml

    Post back or PM me with any specific questions and I will do my best to help.

    NOTE: Use version 4.1.5 only. 4.1.6 and 4.2.0 are broken, as far as DCC++ support.

    Once you have it installed and hooked up, you can just use DecoderPro or the Throttles or turnout controls or whatever same as any other command station interface. If something doesn't seem to work, let me know.
     

Share This Page