DCC++ Hardware - Motor Shields

KE4NYV Jan 25, 2016

  1. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17
    I guess I'll start the motor shields use/development thread :)

    I'm currently debugging what Gregg and I are calling the RPC-Motor/Interface Shield.
     
  2. Jean-Eric

    Jean-Eric TrainBoard Member

    25
    24
    8
    What about using LMD18200T?
     
    Scott Eric Catalano likes this.
  3. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17
    I haven't worked with that IC yet. Looks promising, if it can provide a continuous 3A of current per channel.
     
    Scott Eric Catalano likes this.
  4. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17
    This is the current RPC driver/interface shield I am working on:

    [​IMG]
     
    KC Smith and Scott Eric Catalano like this.
  5. mikegillow

    mikegillow TrainBoard Member

    116
    117
    13
    A very quick look at the spec suggests it has short circuit detection similar to the Pololu board which would make it incompatible with auto reversers or circuit breakers for power districts.

    Edit: after a closer look I suspect I am wrong.
     
    Last edited: Jan 25, 2016
    Scott Eric Catalano likes this.
  6. Jean-Eric

    Jean-Eric TrainBoard Member

    25
    24
    8
    In France most of DCC with Arduino are using LMD18200T instead of L298. I will try to translate the following explanation:

    Le L298 est parfait pour piloter un moteur pas à pas mais pose des problèmes pour l'amplification d'un signal DCC. Le LMD 18200 est préférable. En effet, les retards entre le changement d’une entrée du L298 et le changement correspondant de la sortie sont asymétriques. C’est à dire que les retards ne sont pas les même selon que le signal d’entrée passe de 0 à 1 ou de 1 à 0 (ce qui entraine une forte distorsion du signal DCC). Le signal obtenu n'est pas apprécié de certains décodeurs (en particulier les décodeurs LENZ). Le LMD 18200 ne présente pas ce défaut

    The L298 is perfect to pilote step motors but is problematic for the DCC signal amplification. The LMD 18200 is preferable. As a fact the delay between change of a L298's input and the corresponding changes from the output are asymmetric. IT means the delay are not the same in case the signal is changing from 0 to 1 or from 1 to 0 (this lead to strong distorsion of the DCC signal). The resulting signal is not appreciated from some decoders (in particular LENZ Decoder). The LMD 18200 does not have this issue.

    I do not know if it is true but I give it as an information in case of.

    So the booster used is the following one
    dcc_17_03.jpg
    GND to ARDUINO's GND
    PWM to +5V

    DIR to DCC output from ARDUINO
    BRAKE to GND

    Amplified DCC is available on OUT1 & OUT2
    DC 16V connected to V+

    For those who can read french: http://www.train35.fr/dcc18.html

    JEZ
     
  7. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12
    LMD 18200 Technical Specs English attached

    I just realized that I used this H bridge to build Dave Bondar's DCC IR Controller back in Sept.
    Check your bench work Jason and others you may have one already.

    Jason Question; If you use this LMD18200 with a Heat sink on the new RPC Motor Shield, I'm assuming it's height would require us to position it as the top Shield. Which may require us to cover the Wifi Shield.

    Kevin
     

    Attached Files:

    Last edited: Jan 26, 2016
    Scott Eric Catalano likes this.
  8. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17
    Did a little checking into the LMD18200T tonight. First off, it's a $20 part. There's your first clue why no one is using it on "cheap" motor boards. So it looks like the original part is EOL (End Of Life) so there is no way I am developing a new product around a part that is less than a year from existence. However, looks like they have the LMD18200T/NOPB available. Even the new part is $15/each. That's a tough sell when I was hoping to make the entire board available for around the $25-30 price point.

    I'll keep looking into it, but I already have significant time and money invested in the L298 design. I'm not saying no, I'm just saying let me weigh the options.

    EDIT: Keep in mind we need TWO DCC outputs for main track and programming. That would require two of these, since it's a single output device. Scratch $15, we're talking $30 just in driver IC's. That's before the cost of PCB and ANY other parts. I really doubt most people are going to buy a $50-60 interface board over the $5-10 boards most are buying on eBay right now.
     
    Scott Eric Catalano likes this.
  9. HVT

    HVT TrainBoard Member

    74
    93
    15
    Jason,
    In response to Jean-Eric's comments about the wave form and Dave Bodnar's thermal shut down test results I have to ask a couple of practical questions.

    1- Is anyone using DCC++ having any problems that can be attributed to the wave form or is it 'good enough' to meet our needs? I would like to hear from a user with Lenz decoders.

    2- How many locomotives has a user been able to run before having a thermal overload?

    Regards,
    Dave
     
    Scott Eric Catalano likes this.
  10. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    I've been using 2-3 HO Scale Locos during an 8 hour christmas show in 2015 using an Uno, Pololu motor shield and using a digitrax multiscale power supply...no over load
     
  11. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17
    I intended the wifi/ethernet shield to always be the bottom of the stack for the reason that it needs the 2x3 SPI header for communication. From that point up, it's mostly general I/O.
     
    Scott Eric Catalano likes this.
  12. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17
    I'm assuming it's a "good enough" scenario, since every example I have seen has has a bit of noise in the waveform. Some worse than others. Honestly, the cleanest I have seen from a "handmade" DCC station was on my L293 design I was playing with several years ago. In fact, as part of my testing, I broke that old breadboard out (that still had the circuit on it) and connected it up for comparison.

    That's a good question...also gauge specific, I would imagine. As an N scale guy, I'm willing to bet I could run 30% more, than say an HO layout.
     
    Scott Eric Catalano likes this.
  13. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12
    Dave

    Unscientific test.

    I had three HO engines on the track.
    One Steam Tsunami w/o sound at Idle
    One Steam Tsunami With Sound at 80+%
    One Diesel NCE w/o sound at 60+%

    Both Engines were pressing against a wall thumb tack for load resistance.

    The DCC++ Track Current Meter went to 27:5% to 28:2% before the Arduino Motor Shield shut down.

    I have a;
    Leland Arduino Uno Rev3
    Original Arduino Motor Shield
    18vac w/ a PM-3000 tuned to 16.5vdc 3amp power to the Shield (thank you w8bone for the advice)
    14.6 vdc thru track and 02:3% DCC++ Current meter w/ all 3 engines at idle

    How would you decipher the current shut down result at peak.?

    Update Note: Both Steam engines can run 100% at the same time and no Motor Shield shut down. Adding the Diesel slowly throttled up to 50% takes it over the limit and Shuts down the Motor Shield. Current Monitor showing 27.8%

    Kevin
     
    Last edited: Jan 28, 2016
    Scott Eric Catalano likes this.
  14. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    Sound units always bring DCC command stations to its knees....even the commercial ones...in noting one Digitrax large (25' x 75') ho scale layout I operate on once a month there were so many sound units showing up that he had to upgrade to an 8amp system and cut the layout into more isolated booster sections. When a short would occur in a section with alot of sound units a normal reset couldn't be done....the sound units had to be taken off the track or just turned to one side until the system reset.....now I used sound units on my christmas display using DCC++ for 8 hours with out a break and the Pololu motor shield did not heat up to the point of overload and shutting down....it could be the Arduino motor shield could not handle the load.
     
    Erik84750 likes this.
  15. mikegillow

    mikegillow TrainBoard Member

    116
    117
    13
    The Pololu is rated for 5A peak. Specs say 3A continuous without adding heatsinks and fans. The Arduino motor shield is rated for 2A peak.
    In the original thread there were some posts about running shield outputs in parallel, in theory doubling the load capacity. There was a prototype test to see if it would work (it did) but not a load test.
     
    Scott Eric Catalano likes this.
  16. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Note that the parameter CURRENT_SAMPLE_MAX in the DCC++ Base Station CurrentMonitor.h file controls the level at which the auto short-circuit protection is tripped. The default value is 300, which implies a very conservative 800 mA threshold. Since the Arduino Motor shield is rated for 2 Amps per channel you can probably double the value to 600 or more without too much worry (unless you've done so already). Should allow you to run twice the number of trains. On my layout I am using a 1 amp power supply so I need to set the threshold at 800mA to identify a short circuit (if you set the threshold above the capacity of your supply you will never trip the circuit breaker, even if you have a short).

    Also, the Pololu shield has a much less sensitive current sensing circuit (if I recall, by a factor of about 3). So a setting of 300 translates into a short-circuit cut-off of close to 2.5 amps, which would likely rarely be tripped before the Pololu ran out of steam.

    Also note that the Pololu has its own built-in short circuit protection, but for the above tests we are really testing total current draw, as opposed to a spike in current that implies an actual short-circuit. DCC++ doesn't look for a spike, just a total current draw that exceeds the specified threshold.

    I will move this parameter into the main config file and create a scale factor so it is more obvious what the setting does. Sorry for any confusion.
     
  17. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12

    Gregg,

    Thank you for the quick replay and for always taking the time to explain clearly at length of the systems capabilities and your intent.

    Set C_S_MAX to 600 and all three engines running 100% under Load with no thermal shut down.
    Current monitor flow between 27:1% and 29:x% sometimes peaking into 31:x%.

    I'm I correct in estimating Current draw from the Monitor as 28:1% of 2Amps = .562 amps,
    or 28:1% of 3amp power supply = .843 amps, or neither.

    Pleased don't ever feel the need to say your sorry .... Your project and effort is Awesome and much appreciated.

    Kevin
     
    Scott Eric Catalano likes this.
  18. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Kevin, good to hear that raising the limit solved the issue and thanks as well for the kind words.

    As for the current monitor, are you using JMRI? The reason I ask is that the base station itself only returns an absolute number (which needs to be translated back into a current) and DCC++ Controller shows absolute current (properly scaled for the Arduino Motor Shield). If using JMRI my guess is that the percentage is based on the max of the board (which would need to have been pre-programmed) as opposed to the max of the supply (which would not be known by he software).
     
    Scott Eric Catalano likes this.
  19. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12

    Gregg

    I am referring to JMRI DecoderPro tab DCC++ Traffic Current Meter which shows 00:0%.

    Thanks again
    Kevin
    '
     
    Scott Eric Catalano likes this.
  20. conrailandrew

    conrailandrew TrainBoard Member

    18
    29
    11
    Hello all!

    I've gotten my Arduino clone motor shield working with an Uno, and I'm now trying to get it working on a Mega 2560. I've got the one wire jumper from pins 2 to 13, but I must be missing something. In diagnostic mode, the A outputs only have one non-blinking LED on, while the Programming track is blinking both LED's as normal. From what I found in the main thread, this might be a pin mapping problem?
    (From Page 23 in the main thread)
    The text in bold is what I'm getting.

    If I connect pin 2 to pin 12 instead of pin 13, the A outputs flash normally, but the B outputs only have one light steady on.
    Anyone know what's going on?

    Andrew
     
    Scott Eric Catalano likes this.

Share This Page