DCC++ Hardware - Motor Shields

KE4NYV Jan 25, 2016

  1. Jirka

    Jirka TrainBoard Member

    32
    39
    3
    Does the current indicator show some current? If not, you would be without short circuit protection...
     
    Scott Eric Catalano likes this.
  2. Mdwildcat04

    Mdwildcat04 TrainBoard Member

    30
    30
    6
    whats the serial command to read the current?
     
    Scott Eric Catalano likes this.
  3. Mdwildcat04

    Mdwildcat04 TrainBoard Member

    30
    30
    6
    I installed JMRI. I am getting a number on the current meter and I am able to read CVs from the decoder. Looks like Im set!!!!
     
    Scott Eric Catalano and Atani like this.
  4. Atani

    Atani TrainBoard Member

    1,470
    1,769
    37
    <c> will return <a NNNN> where NNNN is 0-1023
     
    sboyer2 and Scott Eric Catalano like this.
  5. Jirka

    Jirka TrainBoard Member

    32
    39
    3
    BTW, I like the LMD18200 H bridges so much that I replaced the "standard" motor shield by breakout boards with them:
    - the chip can be obtained at eBay for 4$ now (not 20$ anymore as KE4NYV mentioned)
    - yes, 3A continous current!
    - minimum number of discrete components around needed. DIR signal for second half of H bridge is inverted internally. Current sensing resistors have "comfortable" value 4.3kOhm, unlike the L298N ...(0.15 Ohm)
    - 5V not needed. Just the bridge supply voltage.
    - they switch fast > minimum phase distortion of the DCC signal. Decoders might like this.
    - they provide thermal overheat flag signal

    Still does not look interesting?
     
    sboyer2 and Scott Eric Catalano like this.
  6. Atani

    Atani TrainBoard Member

    1,470
    1,769
    37
    do you have pictures of this? Would be interesting to see some DIY motor shields...
     
    Scott Eric Catalano likes this.
  7. Jirka

    Jirka TrainBoard Member

    32
    39
    3
    Not a big deal. I used two modules purchased from China. Above the WiFi router is Arduino Mega with Ethernet shield, above it two modules connected by 7 wires. As you can see the right module is not used yet since I do not have the programming track yet. The orange bumpers for Arduino and the modules are printed at 3D printer.
    P1020577.jpg
     
  8. Mdwildcat04

    Mdwildcat04 TrainBoard Member

    30
    30
    6
    Are you having to modify the code for those? How are you wiring up the LMD18200 modules?
     
    Scott Eric Catalano and sboyer2 like this.
  9. Jirka

    Jirka TrainBoard Member

    32
    39
    3
    When using the current sensing resistors about 4.4 kOhm no code modification is necessary except it is reasonable to change the CURRENT_SAMPLE_MAX value as recommended by Gregg here: Introducing DCC++ ---a complete open-source DCC station and interface

    The 7 wires are (in case of Arduino Mega):
    common ground
    Mega pin 3 (Signal Enable Main) - LMD_Main pin PWM
    Mega pin 12 (Direction Main) - LMD_Main pin DIR
    Mega pin A0 (Current Monitor Main) - LMD_Main pin Current Sense
    Mega pin 11 (Signal Enable Prog) - LMD_Prog pin PWM
    Mega pin 2 (Direction Prog) - LMD_Prog pin DIR
    Mega pin A1 (Current Monitor Prog) - LMD_Prog pin Current Sence
     
    sboyer2 and Scott Eric Catalano like this.
  10. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    One of the issues with those parts is that they are nearing End-of-Life, meaning they won't be manufactured for much longer. Designing a new product with soon to be obsolete parts isn't a good idea.....maybe that's why the parts are now available at a lower cost???
     
    Scott Eric Catalano likes this.
  11. Jirka

    Jirka TrainBoard Member

    32
    39
    3
    Can you please let me know where you find this info? At the TI vendor's webpage I see status ACTIVE: recommended for new designs.
     
    Scott Eric Catalano likes this.
  12. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    Just repeating what the original person who started the thread......
     
    Scott Eric Catalano likes this.
  13. Jirka

    Jirka TrainBoard Member

    32
    39
    3
  14. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    New to the forum, I enjoy working with Arduino, and I came across DCC++. it renewed my interest in trains. unfortunately all I have is some old atlas brass track, and an Athearn GP38-2 (2009) that I recently found was not even close to DCC compatible. but the interest is still strong (the wallet however is a little weak).
    I have DCC++ loaded on an UNO with a L298 clone from SeedStudio, I think. I can control it via JMRI, though it doesn't really affect much, other than my oscilloscope. I really have no idea if it really works. I see some motor controllers need jumper wires to adapt them. is that an issue with a 298?

    ~Travis
     
    Last edited: Aug 22, 2016
    Scott Eric Catalano likes this.
  15. Atani

    Atani TrainBoard Member

    1,470
    1,769
    37
    all motor boards will require at least one jumper.
     
    Scott Eric Catalano likes this.
  16. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    Found my motor shield was defective. figures
    H-Bridge_v1.png
    now, if I made my own H-Bridge, like attached Eagle Schematic , would it work with DCC++? J1 is the Input connector (1, 2, 3 --> Gnd, Enable, DCC), and J2 is the track output. I would need two of these, obviously. but if I connect it so SIGNAL_ENABLE_PIN_* connects to the Enable pin, and DCC_SIGNAL_PIN_* connects to the DCC pin. if it will work, then I just have to find the correct MOSFETs to suit the project.

    ~Travis
     
    Scott Eric Catalano likes this.
  17. Atani

    Atani TrainBoard Member

    1,470
    1,769
    37
    I don't see an external power supply connection on the schematic. This would be required to allow you to exceed the power limits of the Arduino.
     
    Scott Eric Catalano likes this.
  18. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    common ground, and VCC (I didn't find the right symbol in the few minutes I drew it in) goes to the external power supply.

    Sorry, I should have explained that.

    ~Travis
     
    Scott Eric Catalano likes this.
  19. Atani

    Atani TrainBoard Member

    1,470
    1,769
    37
    I missed that as well :) I think it might work. Its worth a try!
     
    Scott Eric Catalano likes this.
  20. Travis Farmer

    Travis Farmer TrainBoard Member

    352
    320
    14
    well... after a little more research, my H-Bridge is wrong. maybe I will just buy an H-Bridge, and save myself from burning up MOSFETs from shoot-through current during switching. oh, well. you win some, you lose some.

    But on the plus side, I found a sight detailing how to convert my Athearn GP38-2 to DCC. :)
    ~Travis
     
    Last edited: Aug 23, 2016
    Scott Eric Catalano likes this.

Share This Page