DCC++ Hardware - Motor Shields

KE4NYV Jan 25, 2016

  1. NJNScaler

    NJNScaler TrainBoard Member

    10
    10
    2
    It might have worked, I just don't know what I'm doing ;) After making the light blink with the <D> command and reading a bunch of CV values with JMRI, the most promising output from the Arduino IDE I received was this. Am I on the right track? Is the DCC++ project dead?

    *** DCC++ CONFIGURATION ***

    VERSION: 1.2.1+
    COMPILED: Feb 20 2016 21:10:11
    ARDUINO: UNO

    MOTOR SHIELD: ARDUINO MOTOR SHIELD

    DCC SIG MAIN: 10
    DIRECTION: 12
    ENABLE: 3
    CURRENT: 14

    DCC SIG PROG: 5
    DIRECTION: 13
    ENABLE: 11
    CURRENT: 15

    NUM TURNOUTS: 0
    SENSORS: 0
    OUTPUTS: 0

    INTERFACE: SERIAL

    PROGRAM HALTED - PLEASE RESTART ARDUINO
     
    Scott Eric Catalano likes this.
  2. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    your setup looks good...DCC++ is far from dead....your DC motor responded which shows power is getting to the motorshield and the track. Now put a DCC equipped locomotive on the track and open up the serial window via the arduino and test the loco with the serial commands.....you can find the command structure in the serial command file....or there should be a manual on the DCC wiki/github pages
     
    NJNScaler likes this.
  3. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    Sorry for being away from the board for a while. Just revisiting things now. Unfortunately the new Adafruit board will not work with DCC++. It is not really a motor shield -- rather, it's a standalone PWM processor that is controlled remotely by the Arduino's I2C bus (instead of via the Arduino's digital pins). Then, connected to this standalone PWM processor is a pair of chips that create the motor outputs. Those chips look like they could be useful for DCC++, but they are not connected to the shield's standalone PWM processor, not directly to the Arduino. I recommend one of the "clone" shields that can be found on the Internet for as little a $10 or so.

    -Gregg
     
    Scott Eric Catalano likes this.
  4. NJNScaler

    NJNScaler TrainBoard Member

    10
    10
    2
    Hi Gregg;
    Thanks for the reply! Can you send me the link to a clone shield on ebay or amazon that will work? Having already bought 1 dud I'd rather not trust my own purchase
     
    Scott Eric Catalano likes this.
  5. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    I have purchased 8 of these and set them up for members of our local club - with one exception they work well (see the last section of my web page for info on the problem board http://trainelectronics.com/DCC_Arduino/DCC++/ )

    http://www.ebay.com/itm/310787745501?_trksid=p2059210.m2749.l2649&ssPageName=STRK:MEBIDX:IT

    There are many other vendors on eBay selling the same clone board.

    dave
     
    Scott Eric Catalano likes this.
  6. NJNScaler

    NJNScaler TrainBoard Member

    10
    10
    2
    Awesome - thanks Dave! I just bought one, I look forward to trying out the new board!
     
    Scott Eric Catalano likes this.
  7. in2tech

    in2tech TrainBoard Member

    2,703
    7,639
    78
    Will the ones on ebay work?

    Sent from my SGH-T399 using Tapatalk
     
    Scott Eric Catalano likes this.
  8. Gregg

    Gregg TrainBoard Member

    237
    311
    18
    There are many types on eBay --- anything that uses an L298 chip is likely to work if the pinouts match or are close enough. There are also shields that can work even if they don't use an L298 chip. In some of the other streams on this board you'll find a number of messages with links to shields others have used successfully that they found on e-bay. Unfortunately I don't think there is a comprehensive list anywhere.
     
    Davemil and Scott Eric Catalano like this.
  9. in2tech

    in2tech TrainBoard Member

    2,703
    7,639
    78
    This is the one I want to purchase to try and get my Arduino to be a DCC controller. Any problems with the shipping from over sea's? I also have to convert or add a DCC encoder into one of my existing locomotives, which I am kind of scared to do, and for a reasonable price. Or buy a brand new Switcher N-Scale locomotive with DCC!

    People that have this working with an Arduino can you post video's on YouTube please! And how you did it if possible. The hardware and the sketches if possible.

    Thanks!
     
    Scott Eric Catalano likes this.
  10. mikegillow

    mikegillow TrainBoard Member

    116
    117
    13
    I had no problem with my order of two boards. The hardest part is the wait - took about two weeks.
    If you are using an UNO and one of those boards, the PDF on this page covers the hardware side of it quite nicely. The Arduino sketch is available on this page. There is a wiki page with more info.
    As described in the PDF, the motor shield requires cutting two or three traces on the bottom of the board. Test with a multi-meter to make sure you have fully cut the trace. Two traces are required, the third (VIN) depends on the voltage of the power supply you connect to the motor shield and, if 12v or less, if you want it to power the UNO. I recommend that you cut the trace and power the UNO through the USB connection to the PC that you need to have to send commands to the base station (you have to use a Mega if you want to add an ethernet shield to the mix and not have a direct PC connection). Also, check the output voltage of your power supply. I have a bunch of 9V power supplies that are actually putting out 13V+.
    The motor shield will also require one jumper wire to tie pin2 to pin 13. That's it.
    Before loading the sketch into the UNO, check config.h to make sure it is set to the correct shield type and comm interface.
    As for controller software, I have been using JMRI and not the DCC++ Controller app so I can't answer questions about that app. With JMRI I am using the EngineDriver app on my Android phone as my throttle.
     
    Scott Eric Catalano likes this.
  11. in2tech

    in2tech TrainBoard Member

    2,703
    7,639
    78
    So I can not use my old Tech II as a power supply to power the track? And yeah I downloaded JMRI last night but have not figured it out yet. So I have to learn JMRI too, or learn to use DCC++ controller software. Before I order the board I post and make sure I am getting the correct one.

    I keep seeing post about a separate power supply. I am confused about this. Why not the DC controller I have?

    Thanks,
     
    Scott Eric Catalano likes this.
  12. mikegillow

    mikegillow TrainBoard Member

    116
    117
    13
    Part 1: One HUGE difference between DC and DCC is that you do not vary the power supply voltage on the rail. You need to provide the motor shield a constant DC input which will be passed through the HBridge chip and out to the rail as the DCC signal. For that motor shield, the maximum DC voltage you can supply to Vin is 18V. You would have to measure the output of your Tech II to see what it is. I have never used a Tech II so I am working from what I have found online - it appears that it has a Fixed DC output and a Variable DC output. If the Fixed DC output is more than 15V I would recommend that you not use it. You could use the variable output by adjusting the Tech II throttle knob and measuring the output with a meter but if you do that you had better do something to fix it in place so that it cannot move - the max DC output is 22VDC, which would burn out the motor shield.
    Part 2: You need to supply DC voltage to the Arduino board. By default it gets 5VDC power from the USB port. Alternatively you can connect an external power supply to it, either through the barrel connector on the board or through its Vin pin. The motor shield is designed to pipe the DC voltage that you connect to its Vin connectors to the Arduino Vin pin unless you cut the trace on the bottom of the board. The UNO's recommended limit is 12V. If you are supplying more than 12VDC to the motor shield Vin, you cut the trace. (The UNO's max limit is 20V but more than 12V is going to generate a lot of excess heat.)
     
    Scott Eric Catalano likes this.
  13. in2tech

    in2tech TrainBoard Member

    2,703
    7,639
    78
    Thank goodness I don't throw manuals aways...normally. This is what the Tech II states:

    Specifications:
    Input: - 120VAC 60Hz
    Output: 20VDC, 18VAC, 20.5 VDC - All no load ratings
    Total Output: 16VA

    Pulse Frequency - 60Hz

    Control System - MRC's Proportional Tracking Control

    So it look's like the fixed DC output is 20.5 volt's which is too much right? Or could I use the fixed DC output, because the max does not exceed 22V? And I am going to power the Arduino with the AC adapter included with it or 9V battery.

    I think!
     
    Scott Eric Catalano likes this.
  14. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    205
    57
    6
    In my DC only days of model railroading I've used the fixed DC connections for a walk around cab throttle to control my DC only trains
     
  15. mikegillow

    mikegillow TrainBoard Member

    116
    117
    13
    Assuming the Tech II power output matches those specs then the Fixed output is too high - the motor shield max is 18V. You could put a meter on the Variable output in adjust the Tech II throttle until the output is between 12V and 15V (then do something to fix it in place, like tape it down) and use the Variable output. Or you could go on ebay or amazon and pick up a 15VDC 2A power adapter for about $10. Just make sure you cut the Vin trace on the bottom of the motor shield.
    The Arduino is going to be connected to a computer via USB because your throttle control is going to be either the DCC++ Controller app or JMRI, so you don't need to connect an external power source to it.
     
    Scott Eric Catalano and HVT like this.
  16. in2tech

    in2tech TrainBoard Member

    2,703
    7,639
    78
    "15VDC 2A power adapter for about $10"

    I think I already have one of those. Is this 18V max for the track or Arduino. I get my meter and check the actual output of the DC fixed and check the variable to see if I can get between 12V and 15V. If I can I have to order the Motor Shield still, and maybe a 15VDC 2A adapter too.

    Of course it's 9V's, the Arduino one, what was I thinking...duh!

    Confused!
     
    Last edited: Feb 28, 2016
    Scott Eric Catalano likes this.
  17. mikegillow

    mikegillow TrainBoard Member

    116
    117
    13
    According to this page, the motor shield's max Vin is 18V.
     
    Scott Eric Catalano likes this.
  18. David Bodnar

    David Bodnar TrainBoard Member

    264
    481
    13
    sboyer2, KC Smith, lnxlnx and 3 others like this.
  19. HVT

    HVT TrainBoard Member

    74
    93
    15
    Dave,
    Thanks for sharing. That makes a nice clean installation. Your work in inspiring.
    Dave
     
    Scott Eric Catalano likes this.
  20. KE4NYV

    KE4NYV TrainBoard Member

    219
    281
    17
    Dave, What are you using to test these various setups? JMRI? I found that if I don't have some kind of track current feedback to JMRI or it's getting bogus numbers from a poor setup, JMRI shuts the track down. I wrote my own test program in VB6 to do most of the board testing, but I want to make sure that it's going to work with JMRI too. I guess I need to see if there is a way to disable the track current monitoring/auto-shut off until I can work out the problems.

    Jason.

     
    Scott Eric Catalano likes this.

Share This Page