Issues w/DCC++: Auto Reverse, Motor Shields & Current

H0Guy Sep 17, 2019

  1. H0Guy

    H0Guy TrainBoard Member

    25
    6
    3
    Over the summer I started experimenting with DCC++.

    DCC++ with Arduino Motor Shield - Works Great!
    I was able to get DCC++ working with a Arduino Uno and a Arduino Motor Shield and it works great.
    • Auto Reversing works fine
    • Programming on the Program Track works fine
    DCC++ with Pololu Motor Shield - Not so great!
    • I also tried to use the Pololu Motor Shield and was able to run trains
    • However:
    • I looked over the DCC++ Code from v1.2.1 and found a number of potential issues with the way the Base Station code handles the Pololu Motor Shield. From my observations, the DCC++ Base Station code is hard-coded to work with the Arduino Motor Shield in a number of places and will have difficulty working with any other Motor Shield. (See below)
    • That is why I was looking for a more up-to-date version of the DCC++ Code that may have resolved these issues.
    Auto Reversers - Pololu doesn't work at all
    • The Pololu Motor Shield does not work with a Tram Valley Dual Frog Juicer operating as an Auto Reverser.
    • After investigating this issue there are a number of TrainBoard boasts that say the same thing including one that Greg acknowledged
    • The problem has to do with the Pololu Motor Shields has its own Short Circuit with trips in approx. 16 micro sec whereas the Tam Valley Auto Reverser trips in approx. 200 micro sec
    • The Arduino Motor Shield does not have its own Short Circuit capabilities and relies on DCC++ to identify shorts which occurs in a much longer interval than 16 micro sec (mili sec)
    • The DCC++ Base Station Code needs to be updated to properly handle the Pololu Motor Shield
    Programming Trains - Pololu not so great
    • When I tried to program a decoder on the Program Track I had issues with Error Code 308 Decoder not responding to program requests on the Program Track.
    • This apparently has to do with the way the DCC++ Base Station handles current sensing
    DCC++ and Other Motor Shields
    • I believe the problems with the Pololu Motor Shield are due to issues in the DCC++ Base Station code and will cause major problems with other Motor Shields.
    • The DCC++ Basestation may have problems with any Motor Shield other than the Arduino Motor Shield
    Regards,

    Larry - aka HOGuy ​
     
    TrinityJay likes this.
  2. Trusty

    Trusty TrainBoard Member

    52
    33
    6
    Hello.
    You could have a look to my version of DCC++, DCCpp ( https://github.com/Locoduino/DCCpp ), a real library able to use any power driver. At Locoduino group, we use mainly LMD18200 with Max471 as current sensor, but also the Pololu and other shields, and it works very well.
    If you have ideas to improve DCCpp according to your observations, feel free to propose improvements in the form of a pull request...
     
  3. H0Guy

    H0Guy TrainBoard Member

    25
    6
    3
  4. Tom Hale

    Tom Hale TrainBoard Member

    14
    1
    2
    Sorry to necropost, but does this mean that DCC++ handles AutoReversing _without_ an autoreverser, if you use the good motor shield? I wouldn't think it would, but .... (Maybe I'm just being optimistic for once....)

    T.
     
  5. Softec

    Softec TrainBoard Member

    27
    9
    6
    Tom
    The DCC++ Base Station inherently DOES NOT provide auto reverse functionality. A separate device is required.
    Dan
     
  6. Tom Hale

    Tom Hale TrainBoard Member

    14
    1
    2
    Thats what I figured, just got excited when I read the post.

    Thanks
    T
     
  7. David Jennex

    David Jennex TrainBoard Member

    15
    16
    6
    Larry,

    The Pololu Current Sense is hard wired into the board. There is nothing you can do to change it either on the board or in the DCC++ software.
    Change the jumpers to give yourself two main outputs and use an Arduino shield for programing.
    David

    David
     
  8. H0Guy

    H0Guy TrainBoard Member

    25
    6
    3
    Dave:

    Thank you for the information. I am glad to see that someone else found out the same thing that I found out the hard way.

    After many hours of trying to get the Pololu Motor Shield to consistently work, I talked with Pololu Tech Support last summer. They told me that the board had a hard wired circuit breaker that activated in 16 microsecond and could not be modified or deactivated.

    So I started using a Arduino and an Arduino Motor Shield running the DCC++ Base Station software, an old laptop running JMRI and an old iPhone for a wireless throttle to Control my layout.

    The DCC++ system controls both the main operations track and a programming track and everything works great including 2 Tam Vally Dual Frog Juicers acting as Auto Reversers.

    As my layout grows I plan to get one or more DCC boosters and set up different power districts still using the Arduino based DCC++ Basestation for DCC Signal generation, operations and programming.

    To me this is easier and cheaper than trying to get a different Motor Shield like the Pololu to work for an extra 1 or 2 amps of power.

    - Larry
     
    Sumner likes this.
  9. TrinityJay

    TrinityJay TrainBoard Member

    28
    59
    2
    Add another one to that list, Larry :(

    So if I understand things correctly, using one of the different DCC++ forks is not going to help with the 16 microsec circuit breaker? The only way to get around it is to simply use a different motor shield?
     

Share This Page