Recommended modifications to Arduino motor shield.

Gary Granai Nov 7, 2017

  1. Gary Granai

    Gary Granai New Member

    6
    6
    1
    The information at this link https://github.com/DccPlusPlus/Documentation/blob/master/Motor Shield Pin Mappings.pdf says that the braking feature controlled by pins, 8 and 9 must be left open or always set low.


    Question one: How does one set the braking feature low?


    Question two: Will cutting the pins 8 and 9 so that there is no connection between the motor shield and the underlying mega be a way of leaving the circuit open? If so, will anything else be affected?


    Thank you for the time.


    Gary Granai
     
    Scott Eric Catalano likes this.
  2. Atani

    Atani TrainBoard Member

    1,469
    1,757
    37
    you would add something like this in the setup() method:
    Code:
    digitalWrite(8, LOW);
    digitalWrite(9, LOW);
    However, if you go with this approach you won't be able to use those pins for any purpose, not even sensors or outputs. It is highly recommended to cut the trace with a hobby knife, you don't need to go very deep at all. If you decide to repurpose the shield in the future you can simply recreate the trace with a blob of solder and the functionality will work as normal.

    Cutting the trace is the recommended approach as it frees up those two pins for use by the Arduino for other purposes. By cutting the traces the braking feature will not be used by the motor shield and there will not be any side effects from this.
     
    Scott Eric Catalano likes this.
  3. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Hi Gary,

    I don't have a standard motor shield myself, but looking at the schematics the following is my understanding:

    Without any modification you would have to ensure that Arduino pins 8 & 9 are low voltage by altering the code.

    However it is simpler just to cut the traces on the Motor shield (I've marked with red lines on the photo) so that Arduino pins 8 & 9 are isolated from the motor shield and are then free for other use if needed.

    Because the brake-A and brake-B lines are then isolated from the Arduino, resistors RN2A and RN2B will pull the motor shield pins down to low voltage.

    So to confirm, all you need to do is cut those two traces and you are good to go!

    I hope this helps

    Jim
    md-2.jpg md-1.jpg
     
    Last edited: Nov 7, 2017
    Scott Eric Catalano likes this.
  4. Gary Granai

    Gary Granai New Member

    6
    6
    1
     
    Scott Eric Catalano likes this.
  5. Gary Granai

    Gary Granai New Member

    6
    6
    1
    Just so I fully understand, were I go with the code addition, in which tool in the Arduino IDE would I add the code?
     
    Scott Eric Catalano likes this.
  6. Atani

    Atani TrainBoard Member

    1,469
    1,757
    37
    It would go in the DCCPP_uno.ino file in the setup() method. However, cutting traces would be best.

    Sent from my ONE E1005 using Tapatalk
     
    Scott Eric Catalano likes this.

Share This Page