DCC++ EX / Arduino & motor shield won't drive my trains

Mark Truelove Aug 31, 2022

  1. Mark Truelove

    Mark Truelove TrainBoard Member

    72
    53
    5
    This is an oldie for me and basically why I stopped messing with DCC++ a few years ago. I recently had need of a programming track for my computer (away from my layout) so I went back to this to set that up.

    I setup variations of DCC++ and DCC++ EX on three different Arduino boards, two Unos and one Mega. I had the same problems in each case but never found a relevant discussion or solution in my searches.

    Once the DCC++ EX (currently on the Mega) is setup with a 15V power supply and USB connection, I can use JMRI to handle my roster, reading and programming my decoders just fine. Interestingly these read/write operations produce the on-track motor stutter that is typical when communicating with a decoder.

    I say it's interesting because in order for that to happen, small pulses of 15V track power must be getting through the decoder and to the motor to make that occur. I can even turn off/on track power and can feel the voltage in my forearm draped across the track while typing, or create a short with my metal pen.

    Unfortunately, if I load a throttle (JMRI, WiThrottle, it's all the same), with the same communicating loco sitting on the track, turning up the throttle has no effect and the basic (light) controls do not produce any changes on the loco.

    I take all three of these locos to the layout in the basement running on my Zephyr and they all operate as expected.

    The thing is, I replicated this problem _three_times_in_a_row_ with different hardware pieces back in the day. Whatever it is I'm doing wrong, I must be doing it consistently. After many many videos on the subject I can't imagine what that will be.

    Hopefully I've included enough detail to avoid redundant questions and maybe someone will have something new to add.

    Thanks!
     
  2. sidney

    sidney TrainBoard Member

    1,243
    2,110
    38
    im no expert at this but are you using the mega with enough memory? 2 is the 15 volts going only to track power . 3 did you clear the mega of any other sketches and then in stall the dcc++ex ? are you using the mega with a motor shield (maybe stupid question i know ). if so what motor board are you using ? withrottle is on phone so does that mean you also have a wifi sheild on top of the motor shield as well.
    i think dcc++ex will not work on the uno (i think again im no expert )... someone with much better knowledge may be along shortly.....
     
  3. IronMan1963

    IronMan1963 TrainBoard Member

    161
    173
    9
    I believe you are trying to run the locos on the programing track. The system does not let you run on the programing track set up another track on the other output of your motor shield. After programing move the loco to the other track and try to run it.
    Later Richard
     
    Mark Ricci likes this.
  4. wvgca

    wvgca TrainBoard Member

    499
    305
    21
    yes, i know with DCC++ the program and main tracks are seperate ..
     
  5. Sumner

    Sumner TrainBoard Member

    2,834
    5,968
    63
    The guys are right about can't run on the program track while it is connected the the programming outputs on the motor shield but...

    1. You can use a DPDT switch connected to the two motor shields outputs to switch the piece of track between programming track and the main. Program and throw the switch and run the loco.

    2. DCC++EX now also has a 'Join" command which does the same thing with a programming command while the loco is on the track or if you run it onto the track or you want to drive it off the track. Look down the page here just a little bit to see how to use it....

    https://dcc-ex.com/reference/software/command-reference.html?highlight=join

    Sumner
     
    Mark Ricci likes this.
  6. Mark Ricci

    Mark Ricci TrainBoard Member

    481
    652
    13
    I'm not a DCC EX expert either but can offer some ideas + suggestions...

    Do need clarification... the first half of your ? refers to PROG or Channel B output for programming.. the 2nd half of your question refers to MAIN or OPS or Channel A using throttles. You did not mention whether you moved loco or "switched" to MAIN Output. Are referring to the A channel or MAIN or OPS Track out when attempting to run locos. Also, since you mentioned JMRI+PC, are you using it just as a programming tool or is it intended to serve as the command station for a DCC EX base only?

    Assuming you are attempting to run locos and the track is connected to the MAIN output....

    What is the AC voltage across the A channel or MAIN or OPS rails? For 12V in, the AC voltmeter reads around 24V and can vary due to meter internals. DC voltmeters essentially measure DCC at 0 V

    When using a supply greater than 12V, the Vin trace must be cut on the shield or issues can develop due to exceeding the 12V limitation of the Arduinos. However, if that occurred it would be surprising anything would work.

    The following assumes some basic knowledge in the operation of the Arduino IDE or use.

    This test can be used even if you installed via the automated installer but does require Arduino IDE Serial Monitor (or some other serial comm tool) installed on computer.
    -Remove all locos from OPS Track-Shut down JMRI I like a reboot everything here to ensure a "clean" start.
    -Connect Arduino via USB to PC and start IDE.
    -Confirm Arduino type and COM port if you have not already used IDE and/or Arduino (Mega or UNO) on the respective computer.
    -Open up serial monitor, ensure baud rate of 115200,
    You should see DCC EX start up code responses

    257105-1064e3f6154c168ec1ef208e69d3aa49.png

    -With the voltmeter across the rails,
    -Enter <0> Voltage should go to or remain 0 VAC
    -Enter <1> Turns on both channels, Voltage across A channel should be approx 28-30 VAC if using 15V DC in.
    -Enter <0> if track power is still on.
    One last test... where x = the loco's DCC address. This should; 1-turn both channels power on, 2-headlight on, 3-headlight off.
    -Place loco on MAIN track Channel A and enter the following
    <1>
    <F x 0 1>
    <F x 0 0>

    If you get this far, it would seem that basic installation and communication is good.

    There are other commands that can be entered to test but I find it far easier if need dictates to use the cloud based DCC EX Web Throttle. Outside use of raw DCC EX commands entered in serial monitor, this is the "cleanest" and "closest" to it. See if you can run loco with EX throttle.

    https://dcc-ex.com/WebThrottle-EX/

    Good luck!
     
    Last edited: Sep 1, 2022
  7. Mark Truelove

    Mark Truelove TrainBoard Member

    72
    53
    5
    Hi guys, thanks for all this info. My EX wasn't pushing trains at all, not just on the programming track but on the Main either. I got it working after a suggestion that I open a support ticket with the EX guys on their discord server. WOW were they helpful.

    Turns out I can now run trains on the programming track also after a config change. I want to do this only so I can get immediate feedback on decoder changes I'm making, not pull trains or anything. Like this other problem I'm working on regarding DCC acceleration. Now my programming track is working properly so I can concentrate on those changes. Hurray!
     
  8. Sumner

    Sumner TrainBoard Member

    2,834
    5,968
    63
    Glad you are up and running, bet you get the other problem figured out.

    When I built my test track they didn't have the 'Join' command and I still haven't tried it but wiring a DPDT switch was easy to do as ....

    [​IMG]

    ... shown above. I program, throw the switch, try the loco, drive it off or continue to program it. Also another DPDT switch controls if the ...

    [​IMG]

    ... layout is DCC or DC. Most all of the locos I buy are older and I need to install decoders. I like that I can run and test them before doing that using a $30 used DC throttle and the DPDT switch. More on all of the above ( HERE ).

    The DCC++EX guys are working and maybe it is already functional in the latest version of DCC++EX the ability to also change any isolated section of track back and forth between DCC and DC via the command station. Once it is DC you can run a DC loco on that section of track with a wireless phone throttle running the free EngineDriver app. Show me another DCC command station that will do that. One of the nice things about DCC++EX is that it is open source and people are coming up with new features for it all the time and you can update your system at any time to take advantages of those features.

    Sumner
     
  9. sidney

    sidney TrainBoard Member

    1,243
    2,110
    38
    so what was the fix if you dont mind ? we would all love to know in case we have similar problems if you would please.
    YEEE you got it working ........(y):D
     
  10. Mark Truelove

    Mark Truelove TrainBoard Member

    72
    53
    5
    I had some sidetracking issues (created a short while switching my wiring channels) that kept this from being clear at first. But once it was working with track power and LEDs on the motor shield, the remaining step is to send the <1 JOIN> command to the Arduino to trigger the programming track to match the main track power settings. Unfortunately the method they suggested to automate this every time EX starts up is not working as expected, so it's necessary to send that <1 JOIN> command manually (either from JMRI or Serial Monitor) each time after I power cycle the Arduino, then reload JMRI before it will work.

    I'll keep playing with automation edits until I hopefully get that working also.
     
  11. Mark Truelove

    Mark Truelove TrainBoard Member

    72
    53
    5
    And @Sumner yes, I heard about that DC-section feature but haven't seen it yet. It seems to me your DPDT solution is most efficient, esp. just for a programming/test length of track. Mine's all mounted on one board and portable, track and DCC++ EX, there's no reason it couldn't have a small DC controller also.
     
    Sumner likes this.

Share This Page