DCC++ EX Software Thread

David Cutting Apr 8, 2020

  1. french_guy

    french_guy TrainBoard Member

    I couldn't have said it better..............I have both (DCC++ EX and a NCE Power Cab) and for now, i'm "playing" more with DCC++EX
    Maybe I will end up selling my Power Cab.....who knows ?
    Mark Ricci likes this.
  2. FlightRisk

    FlightRisk TrainBoard Member

    Maybe we need an "technical thread" or equivalent to keep all these detailed discussions out of the "how do I get my layout running" thread (or switch and create a "keep it simple" thread for conductors.
    Sumner likes this.
  3. Sumner

    Sumner TrainBoard Member

    I like that. Maybe a moderator could change the title of this to 'DCC++EX Development' (or something like that).

    An and as you said start a thread on how easy it is for someone that has very little electronic of computer savvy to setup and use DCC++EX....'DCC++EX For Anyone' (or whatever works with the first post giving an easy outline of the steps to setup DCC++EX).

    Mark Ricci likes this.
  4. FlightRisk

    FlightRisk TrainBoard Member

    I will mention one more slightly technical thing, and that is our standard configuration does something special with the signal and defaults to a cool but usually unnecessary method that creates a highly accurate signal that can help with reading some old decoders or a few other special cases. It requires using the "standard" signal/direction pins (11, 12 and 13 on a Mega) so it is on by default on all 100% Arduino Motor Shield compatible boards and many others. For other boards (ones that need 2 pins for signal for example) we default back to the normal way to generate the signal. Sort of like the difference between something with a tolerance of 5 percent vs. 1 percent. ;)
  5. Mark Ricci

    Mark Ricci TrainBoard Member

    Sounds similar to how the DCC EX website differentiates Conductor, Tinkerer and Engineer levels. Great way to categorize threads too!
  6. Nick8564

    Nick8564 New Member

    Wanted to see if anyone has tried the Makerfabs H-bridge as specified on the dcc++EX website. I have ine one but cant get the motordrivers.h config right ti run a train. I use pin 9 for the power, 4 for signal 1 and 5 for signal 2. I am not sure where to put pin 6 for enable
  7. Ash

    Ash TrainBoard Member

    You will likely need something like this in your config.h file.
    // Current sensing via Pololu ACS724 0-10A current sensor  0A = 0.5v  400mv/A
    #define MY_MOTOR_SHIELD F("MY_MOTOR_SHIELD"),    \
            new MotorDriver(9, 4, 5, -6, A3, 12.2, 5000, UNUSED_PIN), \
            new MotorDriver(10, 7, 8, UNUSED_PIN, A3, 12.2, 2000, UNUSED_PIN)
    This motor board definition shows the use of a single external current sensor for both ops and programming track. In order to avoid interference from the ops track, so that you might read CVs on the programming track, you could try this:
    1. Turn off track power.
    (DCC++EX turns on power to the programming track when needed.)

    2. Use the command <1 PROG> if you want to maintain power to the programming track. This can be helpful if keep-alives are used, and/or when you read/compare full sheet on the CV Pane in JMRI.

    With this current sensor, I was able to read some decoders. But for reliability in reading CVs, use a standard motor shield for programming; it has the sensitivity needed. If more current is needed for the ops tracks, perhaps this motor shield can also be used. (And some changes would be needed to avoid pin conflicts -- perhaps bending or cutting some pins. Along with updates to the motor board definition in config.h)

    pin 6 question: I don't know if pin 6 should be defined on both lines, or on only one of them, and which one... Its been a while since I've looked at creating a definition for this shield, and I don't have experience with the Makerfabs shield.

    power pin question: On the standard motor shield (and also other motor boards), there is a modification required to avoid sending high voltage into the Arduino (or the logic circuit of the motor board). Sometimes it it cutting a trace, or bending out pins. What is needed for this board?

    If you choose to run without current sensing, you will need to tie pin A3 to GND, and the software overcurrent protection will be disabled. Make sure to use fuses or circuit breakers. Avoid fires.

    Documentation is not complete for this motor shield. Read the notes regarding its lack of current sense.
  8. FlightRisk

    FlightRisk TrainBoard Member

    I'll have to fix the web page or add a definition for that board to the code.

    For the Makerfabs shield, you might use the Pololu ACS724 0-10A. The MAX471 is a 0-3A sensor, and might be fine if used with a 3A or less.

    Juzt to clarify,, in your config.h file, find:


    And replace it with this:

    // Current sensing via single MAX471
    // MAX471 outputs 1V/A, Current conversion factor is ((5/1024)/1)*1000 = 4.88
    new MotorDriver(9, 4, 5, -6, A0, 4.88, 3000, UNUSED_PIN), \
    new MotorDriver(10, 7, 8, UNUSED_PIN, A0, 4.88, 3000, UNUSED_PIN)

    Lots of caveats here. Follow Ash's advice.. Not sure about brake pin use. This assumes using a MAX471 for current sense. The sense factor will be different for a different sense board. This assumes using both h-bridges with the second one for the program track. If you can, change the program track definition to the one for an arduino motor shield and use half of each shield. Makerfabs for main and arduino for prog.

Share This Page