DCC++ Hardware - Motor Shields

KE4NYV Jan 25, 2016

  1. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    I have used a Pololu shield with an Uno...I however have not used it to program engines....I just used it to run trains with.
     
  2. DougL

    DougL TrainBoard Member

    81
    46
    6
    What is the voltage drop through the shields and decoders? This dictates the supply voltage.
     
    Scott Eric Catalano likes this.
  3. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    I do not know the voltage drops as I use a digitrax variable DC power supply to run the pololu shield for HO Scale trains as I can select this on the digitrax power supply.....I cut the trace so I can power the Uno from a wal-wart or a computer/laptop etc
     
  4. wvgca

    wvgca TrainBoard Member

    313
    125
    16
    Are current limiting resistors of 0.15ohm required for the programming track? .. At this point I use that track only for reading CV values [for storage with Decoder Pro] from known good loco's off the layout ... Or just recommended for safety when trying out new decoder installations?
    Everything seems to work properly
     
    Scott Eric Catalano likes this.
  5. Travis Farmer

    Travis Farmer TrainBoard Member

    342
    312
    11
    Depends on what you mean by current limiting resistors. current sense resistors, maybe? if that is what you mean, then yes. it is how the arduino knows there are current pulses on the line from the DCC decoder pulsing out the values.

    ~Travis
     
    Scott Eric Catalano likes this.
  6. crusader27529

    crusader27529 TrainBoard Member

    246
    166
    9
    The 0.015 ohm resistor in the circuitrty of the standard motor shield is there so a voltage cn be developed that's proportional to the current being used. It's used for 2 things.....first, on the programming track, it's used to sense the responses to the reading of the CVs, as the decoder pulses the motor to acknowledge read CV requests. Second, it's used to shut down the motor driver board if the current is petcieved as excessive.

    Some manufacturers recommend putting a resistor in series with the programming track to limit current in case there's an error in the wiring, in order to minimize damage when a decoder is tested in a loco for the first time.
     
    Scott Eric Catalano likes this.
  7. wvgca

    wvgca TrainBoard Member

    313
    125
    16
    I wasn't sure if the motor shield that I am using [Deek Robot R3] had these on board, tonight I found the appropriate schematic that indicates that these are already in place on SnsA, and SnsB..
    As of now I have no additional in line current limiting resistors between the shield and the programming track, all seems to work well ...
    thanks
     
    Scott Eric Catalano likes this.
  8. esfeld

    esfeld TrainBoard Member

    420
    374
    14
    Hey Scott ...... been a while .... playing around with a Motor shield from Seeed Studio (https://www.seeedstudio.com/Motor-Shield-V2.0-p-1377.html)
    Have you or anyone else on this thread had any experience with it? It uses an L298 chip which I understand has a lag .... just wondering if anyone has had some practical experience in a Base Station stack. Thanks
    Steve F
     
    Scott Eric Catalano likes this.
  9. Josh G

    Josh G New Member

    2
    3
    1
    Scott Eric Catalano and sboyer2 like this.
  10. crusader27529

    crusader27529 TrainBoard Member

    246
    166
    9
    Look nice with all those jumpers! BUT the 2.5A rating is the rating of the chip, but you won't realize that in the real world......you'll probably be able to get 1.5A in the real world.

    Good Luck.....
     
    Scott Eric Catalano and sboyer2 like this.
  11. Josh G

    Josh G New Member

    2
    3
    1
    Quick update on the Velleman motor shield.

    It seems to work with the standard Arduino R3 motor shield setup with two small changes.

    1. Change the A5 code to A4 in the DCCpp_uno tab. The Velleman has power constantly running through A5, so nothing will happen except returning your setup.
    2. Change DIRECTION_MOTOR_CHANNEL_PIN_A from 12 to 7. The Velleman has specific jumpers for DirA and 12 is not one of them.


    One question though. It seems I have voltage coming out of the unit whether I am sending a <1> or a <0>. Is that normal?
     
    Scott Eric Catalano likes this.
  12. crusader27529

    crusader27529 TrainBoard Member

    246
    166
    9
    No......those commands obviously are supposed to shutdown or enable track power.

    I wonder if the board can shut down for an overload??? That'd be bad.
     
    Scott Eric Catalano and sboyer2 like this.
  13. TwinDad

    TwinDad TrainBoard Member

    1,844
    548
    34
    Question.... I have a Pololu MC33926 shield on its way...

    ... if I don't care about having access to programming track output, can I tweak the code to output main track on both drivers, and hook them both to the track?

    I mean, I know I can tweak the code to send the same output to both drivers, but am I overlooking some dumb thing that will blow everything up if I tie the driver outputs together to the same track?

    I'm thinking it will either give me twice the current capacity or allow me to run the chips twice as cool for a given load...
     
    Scott Eric Catalano likes this.
  14. DougL

    DougL TrainBoard Member

    81
    46
    6
    "can I tweak the code to output main track on both drivers, and hook them both to the track?"

    Much simpler to substitute a higher amperage capacity motor shield. They are not at all expensive. I cannot remember the model number right now.
    In the mean time, practice with the shield you will soon have in your eager hands.
     
    Scott Eric Catalano likes this.
  15. crusader27529

    crusader27529 TrainBoard Member

    246
    166
    9
    The datasheet for the L298 class of IC say that you definitely can parallel their outputs on the same IC to increase current handling capacity, but only on the same part, not using multiple ICs.

    I don't know about the MC33926 IC.......the datasheet should tell the story....

    Also, you don't have to change any code. Just jumper in input control pins together, and then the output pins, and only connect the inputs to the Arduino pins that normally drive the main track, assuming the MC33926 allows it like the L298.
     
    Scott Eric Catalano likes this.
  16. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    Since I will be using a decoder programmer to do programming I am not interested in DCC++ doing. So what I plan on doing is making a power district with the second motor output on the Pololu shield....I have not tried to do anything else with it yet....and I assume if you stack motor shields you can make several power districts...correct?
     
  17. TwinDad

    TwinDad TrainBoard Member

    1,844
    548
    34
    I would say so, I think. If you stack two or three or twenty motor shields up, and all of the input (Arduino interface) pins are tied together, as long as the Arduino can drive/sink the currents required by the inputs on all of the shields, then all of the stacked motor drivers will give the same (logic) output. This would be the functional equivalent of multiple boosters tied to one command station. Each driver on each shield could then power a separate power district.

    HOWEVER... you could not rely on the Arduino to do current limiting independently on all of these districts, unless you explicitly wired the current feedback of each shield to a separate Arduino input, and then modified the DCC++ code to test each input independently... and it STILL won't work the same as multiple commercial boosters because ALL of the shields share the same inputs, so shutting down one shield means shutting them all down.

    Now, of course you can wire each shield or driver's enable pins independently to a separate output on the Arduino, but again you have to tweak the code to handle all the new/separate IOs and you have to have enough IOs to go around.

    So it can be done, but not "out of the box" without some customization.

    Not to put too fine a point on it, but while I agree the L298 datasheet explicitly says you can parallel up the two drivers within the package, by my reading it says nothing at all about paralleling up multiple L298 packages, pro nor con.

    I've sent an email to Pololu to ask what they think. My hunch is, given that they are a board vendor, not a chip manufacturer, they will say "no", as they will not want to be liable for any problems. Thus, in the morning, I plan to also contact Freescale Semi and see what they think.

    It does seem to me that as long as the logic inputs are doing the same thing, it should be OK to parallel up multiple chips... unless there's too much part-to-part variability in the chip response times, leading to conditions where one chip shorts the other out. But if that were the case, I would expect the L298 to have some (smaller) risk of problems, too.
     
    Scott Eric Catalano likes this.
  18. DougL

    DougL TrainBoard Member

    81
    46
    6
    Thank you, I have leaned another block for DCC++ building.

    The Arduino and motor shield combination is much more forgiving and flexible than I imagined. I tend to be conservative because I seem to make all the possible errors before getting -anything- to function. For that reason I would get another motor shield to have on hand after I let the magic smoke out of the first one. (sigh) Some ppl just plug stuff together and it works.(envy)

     
    Scott Eric Catalano likes this.
  19. french_guy

    french_guy TrainBoard Member

    447
    137
    19
    Scott Eric Catalano likes this.
  20. TwinDad

    TwinDad TrainBoard Member

    1,844
    548
    34
    I did eventually hear back from both the folks at Pololu and the folks at NXP Semiconductor about paralleling up the chips...

    Pololu predictably said "No" and cited the possible brief short circuit if the timings were off...

    NXP was a bit more nuanced about it... They actually shared an Application Note that they have which at least sideways-mentions that it IS possible to parallel up drivers in separate packages BUT the maximum power output must be derated due to unequal load sharing (one might go into thermal or current latch-up before the other, suddenly overloading the other chip).

    I quote: "If two independent H-bridges are used (separate MC33926 or similar), the load sharing may not be quite as even, resulting in a reduction in maximum drive capability."

    SO they didn't exactly come out and say "Sure! There's no problem! Go right ahead!" but they also did not say "No, you'll fry them instantly."

    For my part, I've set aside the idea. I'll use the single driver and when I'm ready, upgrade to a bigger board.

    If you are curious, check out Application Note AN4833 at NXP.

    One nice thing, even though I told them it was a hobby application, the NXP folks were very helpful. I suppose sending the request from my work email didn't hurt...
     
    Scott Eric Catalano likes this.

Share This Page