DCC++ Hardware - Motor Shields

KE4NYV Jan 25, 2016

  1. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17

    Heading up on THE TRAIN :) Thursday morning and heading back Sunday. I'll be mostly in North Braddock, West Mifflin and maybe run over to South Park to see a cousin. Going for a first communion, so I know a good part of my Saturday is taken up. Planning to go to the Bucs game on Friday. I'll be in the Strip lunch time Friday for a sandwich at Primanti's. My table is open to anyone who wants to come have lunch!
     
    HVT and Scott Eric Catalano like this.
  2. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    The train is good....good railroading in that area too...start my RR career on the URR....take some pictures if you can
     
    HVT likes this.
  3. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17
    Always do and I usually get HD video, too! :)
     
    Scott Eric Catalano and HVT like this.
  4. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    I assume you know that the TOTAL current for the h-bridge must go through the current sense resistor(s).....the BTS7960 is the chip used in the high power motor driver that Dave Bodner got working, and the current sense pins only output proportional current, so instead of needing a multi-watt resistor like the L298, only low current (1/4 watt or so) resistors are needed.


    Unfortunately, there's only one h-bridge on the board Dave found, but if you ever decide to engineer a higher power module, the BTS7960 still looks attractive, especially for the main track power. The board Dave used required an inverter (one xistor) to work, but so does the L298....it's just already in the standard motor shield design.


    Concerning your current sense problem, are you using opamps like on the original? If not, the sense values would likely be quite different than the original. Just a thought possibly maybe you're overlooked.
     
    Scott Eric Catalano likes this.
  5. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    Problem with Deek-Robot motor shield.

    I was looking at the Deek-Robot motor shield just now while installing the hardware to mount it permanently to the Mega clone--it will be hanging upside-down under my shelf layout. The hardware is long 4-40 screws, 1/2" long Nylon spacers between the boards and 1/2" long, 3/16" diameter female threaded aluminum spacers under the Mega. I'll screw up through a .090" aluminum plate to mount the stack, and the plate will also hold the associated terminal strips etc. to make a "power module" mounted under the shelf layout.

    Deek-Robot-1.jpg

    Observe the white strip passing under the L298P H-bridge chip. That is a strip of printer paper. There is no contact at all between the bottom of the chip and the PCB--I can move the paper edge-to-edge under the chip.

    As opposed to the upright "Multiwatt15" L298 (I've used a number in the past in CNC stepper-drive circuits, with substantial heatsinks and fans), the bottom surface of the L298P "PowerSO20" is designed to be soldered to a heat-wicking trace on the PCB. It is designed to reject waste heat through the bottom of the chip.

    The fact that the Deek-Robot shield has the gap is at least a fabrication flaw, if not a design flaw. I'd need to pull the chip to see if there is any heat-wicking provision built into the PCB itself.

    Adding a heatsink to the top of the L298P won't give much useful thermal protection at all. The best that can be done with the board as-is, is to arrange a fan to blow air onto the little tabs at the ends of the chip. They are the only exposed parts of the internal heatsink plate on the bottom surface of the chip.

    At work we have SMD rework capabilities, so I might try pulling the L298P from one of my shields to check the board design.

    So far, I've only been testing the motor shield on a programming track, and on a single piece of N-scale flextrack with a single loco, so my current draw has been fairly minor. But before I install the shield on even my shelf layout I want to make sure it will be developing anything near its rated current.

    Randy
     
    Last edited: May 2, 2016
  6. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    It is an error of fabrication. I haven't pulled a chip, and at this point won't, but further examination of one of the boards does show the end of a pad under the heat slug end. And looking at the rear of the board, there are 7 vias in the area of the heat slug ends. The slug itself is visible through several of them.

    Reading online, the standard method of manually replacing a chip like this is to solder down the pins and then wick solder up through the thermal vias. With the chip still in place the former is already done, so tonight I'll try the solder wicking. There is enough access on the ends of the chip that I should also be able to wick in some solder from the top side also.

    Randy
     

    Attached Files:

    Scott Eric Catalano likes this.
  7. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    I misspoke a little above. The vias on the Deek-Robot shield are not large or numerous enough to be actual thermal vias.

    There is an L298P motor shield on eBay that has proper thermal pad and vias: www.ebay.com/itm/New-L298P-2A-Motor-Shield-2-Way-7-12V-Motor-Driver-Board-For-Arduino-/221464801087 It has a dense grid of large-diameter vias connecting the pad on the top side of the board with a large area on the bottom side.

    I wish I had been a little more observant before I bought the Deek-Robot shields.

    I'm not sure how my soldering job will affect the thermals, or hold up long-term. The rework flux I have is almost like a gel, and I don't think it wicked under the chips, even on the second one where I tried diluting it with IPA (it's alcohol-cleanable flux). I have no idea either whether any solder wicked underneath. The attached photo is of the better-looking of the two boards.

    I did find an "upright" L298 motor shield called a Motomama, and bought two and will use them instead of the Deek-Robot shields.

    Randy
     

    Attached Files:

    Scott Eric Catalano likes this.
  8. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    Be careful related to the current sense implementation.....I did the same thing as far as getting an upright mounted L298 with heatsink, but there were no current sense resistors implemented, and the resistors need to carry ALL the current for each h-bridge, so implementation isn't always easy.
     
    Scott Eric Catalano likes this.
  9. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    Thank you for the heads-up. The L298N and L298P are identical electrically, and the Deek-Robot shield has the current sense pins tied to ground through 15-ohm resistors.

    current_sense.jpg

    so I'd think (not being an electrical type, just faking it...) that I'd make sure the Motomama board is set up the same way. On the Deek-Robot board it looks like analog pins A0 and A1 are the current sense pins.

    This is a little different--on the stepper drivers I used, there were L297 chips feeding the H-bridges, with current set resistors to hold a constant current through the stepper coils. This is, from what I read, sensing the actual current to shut down the H-bridge if there is a short or at least excessive current draw.

    Randy
     
    Scott Eric Catalano and sboyer2 like this.
  10. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    Correct, but there's more potential issues using a different board.....the 'standard' board has an op-amp between the current sense HW and the sense pin(s). I assume it's that way to isolate the Arduino pins from the L298, but that's a guess. The op amp may change how to do the current sense related to the Arduino.

    Secondly, there are inverters in the design on 2 of the control signals that may not be implimented in the HW.....get a schematic of the board you plan to use if you can, and we can determine what or if you need to add anything or change the current sense values in the DCC++ code to compensate. It's not super difficult.
     
    Scott Eric Catalano likes this.
  11. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    Yes, thank you again, I've been looking into that this morning.

    I'm attaching the schematic of the Motomama board. On it the sense pins are just tied to ground.

    EDIT: I just found the schematic for the Deek-Robot shield. It's the "Rev3" pdf and shows the sense lines feeding the LM358 op-amp.

    Randy
     

    Attached Files:

    Last edited: May 5, 2016
    Scott Eric Catalano likes this.
  12. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    It looks like the MotoMama schematic I attached above is out of date. It shows the CSA (L298N pin 1) coming out to a header named J16, and CSB (L298N pin 15) coming out to a header named J17. The boards haven't arrived (I just ordered them) but from online photos, it appears that pins 1 and 16 are literally soldered to the ground plane. That would mean needing to pull the pins off the board to feed the op-amp add-on circuilt. I've opened a support ticked at Itead and will report any reply.

    Randy
     
    Scott Eric Catalano likes this.
  13. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    You don't HAVE to use the op amp, but you DO need to add the resistors, because the resistors form a voltage divider so the current drawn can be read as a voltage.

    Look at Dave Bodner's web page (he's a member here) for some direction.....

    http://trainelectronics.com/
     
    Scott Eric Catalano likes this.
  14. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    Oh yeah! The resistor network Dave replaced at the bottom of his DCC++ page is part of the current-sensing circuit. And that page is also why the Deek-Robot schematic was vaguely familiar... I had seen it a couple weeks ago.

    In the pre-edited version of my previous post, I had traced out the voltage divider, but don't know enough about op-amps to understand what it's doing.

    Randy
     

    Attached Files:

    Scott Eric Catalano likes this.
  15. mrtinvan

    mrtinvan TrainBoard Member

    34
    8
    9
    I tried purchasing a couple of these eBay shields and unfortunately the seller has just stopped responding to all requests. I placed the order over 4 months ago! Luckily Paypal has my back.
     
    Scott Eric Catalano likes this.
  16. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    I can't recommend the Deek-Robot shield, if in general they are made like the two I bought without the heat slug soldered to the pad on the board. I have been emailing back and forth with the eBay seller alice1101983, and all they suggested was for me to try soldering the chip. I told them I already tried without success, and that the chip needed to be soldered correctly when it was first assembled to the board. Then they sent me a link to the board schematic. I told them I have given up on the board and am warning other people away.

    Randy
     
  17. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12
    Randy,

    Sorry to hear yours Deek-Robot Motor Shields are Kaput.
    I received a Deek-Robot Shield last week from Good-Module for $5.59 w/ free shipping and its chip is tight to the heat sink and board. I tested it on both Uno and Mega and it works fine. I have purchased items from alice in the past and had no problems.

    You should be able to return any board you have not re-soldiered for a full refund. and maybe be able to contact the Manufacturer/distributor for the one you did modify and they may offer a swap.

    Best of Luck
    Kevin
     
    Scott Eric Catalano likes this.
  18. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2
    Thanks, Kevin. I'd be happy to swap the Deek-Robots if alice1101983 would pay the shipping both ways. But I'd want confirmation that the chips on the replacements were properly soldered. "tight to the board" isn't enough--the heat slug needs to be actually soldered to the board plane. My little Nomad883 benchtop mill uses the L298P chips to drive the stepper motors, and they are properly soldered to a properly-designed board with proper arrays of thermal vias, similar to the other motor shield I linked to above.

    But I will work out the current sensing on the Motomama shields I have on the way. My first CNC controllers "way back when" used the upright L298N chips and it is easy to verify the heat-sinking on them... :)

    Randy
     
    Scott Eric Catalano likes this.
  19. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    When people have tested these type units, both original and clones, the specified/rated outputs was never reached, and was actually much lower than expected. Your observation of the issue with the lack of the heat sink soldering was most likely the cause.....I doubt that the desiners of the PCB with the horizontal (as opposed to vertical) mounting had any idea how to correctly have the L298 soldered to use the heat sink on the base of the chip.
     
    sboyer2 and Scott Eric Catalano like this.
  20. zephyr9900

    zephyr9900 TrainBoard Member

    34
    51
    2

    Attached Files:

    sboyer2 and Scott Eric Catalano like this.

Share This Page