DCC++ with 2 Motor Shields

RCMan Mar 5, 2017

  1. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    Can you add a second motor shield and have three boosters plus a program track.

    The second shield would be for dividing the power into sections on the layout.

    Will be using the Pololu MC33926.

    RCMan
     
  2. Atani

    Atani TrainBoard Member

    1,469
    1,756
    37
    You would need to do some code modifications but yes it is possible.
     
  3. RCMan

    RCMan TrainBoard Member

    271
    132
    12
    Thanks:

    Forgot to add I have control boards for Points, and signals that I want to operate and power through a separate booster and not the main booster.
     
  4. Atani

    Atani TrainBoard Member

    1,469
    1,756
    37
    As long as they operate on a DCC signal that should be fine. You could configure the points as a turnout in DCC++ using either "<a [addr] [subaddr] [state]>" (treat it as a standard accessory decoder) or "<T [id] [addr] [subaddr]>". With the "<T...>" approach you would toggle the points via "<T [id] [state]>" (0 = closed, 1 = thrown). Internally DCC++ will convert it from "<T [id] [state]>" to "<a [addr] [subaddr] [state]>" and respond with "<H [id] [0|1]>" after it sends the DCC signal to the decoder.
     
  5. David Jennex

    David Jennex TrainBoard Member

    15
    16
    6
    Actually, I think this can be done with some jumper doubling and header pin bending.

    I've already changed my Pololu into a two Main output system with the Prog output on a switch so I can go back to one Main and one Prog when I need to - no sketch change necessary.

    I believe I can piggy back two more Pololus to make a one Prog, five Main District system in the same way.

    David
     
    RCMan and Atani like this.
  6. William E Van Buskirk

    William E Van Buskirk TrainBoard Member

    40
    22
    3
    Sure can. No code change, just feed the Main PWM to both H bridges on the second shield. It amounts to bending the 'program track PWM pin a little, so it won't seat into the first shields socket. Then run a jumper from second shield's "main track' PWM socket to the 'Program track' socket (the pin you bent). So when done, both H bridges on the second shield are being feed with the same PWM signal.
    Bill
    PS The current feedback pins on the second shield should also be bent out, I think. The down side is the DCC++ BS Arduino won't be able to read the current on the other districts. I don't recall if anyone has solved this. Might want to look into using a booster that has over current protection such as Dave Bodnar's Booster, http://www.trainelectronics.com/DCC_Arduino
    /DCC_Booster/index.htm It uses a Pro mini Arduino to monitor current and provide over current protection.
     
    Last edited: Sep 15, 2017

Share This Page