No power to track

dottney Apr 11, 2017

  1. dottney

    dottney TrainBoard Member

    118
    19
    20
    My Deek motor shield finally arrived today so I put the jumpers on, put track connectors on, cut the vin trace and put the shield on the arduino. I plugged in a 12v DC power supply to the shield and connected to the computer with a USB cable.
    JMRI shows as connected to the DCC++ system. When I open a JMRI throttle and select a loco it shows correctly but there's no power to the track or loco.
    I checked voltage to the track with a multimeter (AC setting) and it shows no voltage. I put the probes to the track outputs on the motor shield and they show no voltage. The DC power input shows the 12v DC.
    I have reloaded the sketch twice successfully.
    I'm at a loss. Does anyone have any suggestions. I'm kinda bummed.
    Thanks,
    Dave
     
    Scott Eric Catalano likes this.
  2. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Without JMRI running, Have you tried the Arduino IDE serial monitor and sent the command <1> ? That should turn on the track power...

    Jim
     
    Scott Eric Catalano likes this.
  3. dottney

    dottney TrainBoard Member

    118
    19
    20
    Thanks for the reply Jim. I plugged everything in again and ran the Arduino IDE. I ran the serial monitor and a bunch of random jibberish characters showed up. So I reloaded the base station sketch and the DCC++ title came up when I started the serial monitor. I typed in 1 and sent it and still no power to the programming or ops track terminals.
    Then I closed the serial monitor and pushed the reset button on the motor shield. Upon opening the serial monitor again the jibberish showed up in the window. Typing 1 or <1> (not sure which to do) doesn't turn on any power to the track terminals.
    Opening JMRI everything looks fine and the connection to the boards is made. I've tried this on a Windows 10 machine and a Mint Linux machine and I get the same results.
    I've downloaded the base station sketch again thinking maybe I had a bad download and loaded the sketch again. The problem persists.
    Being new to the Arduino I did try the Blink sketch and it worked. Therefore I know that that I have communication to the boards and uploads to the Arduino work.
    Is there a way to clear everything off the Arduino and start with a clean slate?
    Again any help will be greatly appreciated.
    Dave
     
    Scott Eric Catalano likes this.
  4. dottney

    dottney TrainBoard Member

    118
    19
    20
    This is what shows in the serial monitor when I upload the sketch and immediately go to the serial monitor-
    <iDCC++ BASE STATION FOR ARDUINO UNO / ARDUI_H)tù
    Send 1 or <1> does nothing.

    This is an example of what shows after the reset button is pressed and the serial monitor is reopened-
    ^H9š
    Dave
     
    Scott Eric Catalano likes this.
  5. dottney

    dottney TrainBoard Member

    118
    19
    20
    This is what shows in the upload window when I have loaded the sketch-

    C:\Users\Dave\Documents\Arduino\DCCpp_Uno\DCCpp_Uno.ino:427:152: warning: backslash and newline separated by space

    R.currentBit=0; /* reset current bit pointer and determine which Register and Packet to process next--- */ \

    ^

    C:\Users\Dave\Documents\Arduino\DCCpp_Uno\DCCpp_Uno.ino:433:100: warning: backslash and newline separated by space

    R.tempPacket=R.currentReg->activePacket; /* flip active and update Packets */ \

    ^

    C:\Users\Dave\Documents\Arduino\DCCpp_Uno\DCCpp_Uno.ino:449:103: warning: backslash and newline separated by space

    } /* END-ELSE */ \

    ^

    C:\Users\Dave\Documents\Arduino\DCCpp_Uno\DCCpp_Uno.ino:450:88: warning: backslash and newline separated by space

    \

    ^

    C:\Users\Dave\Documents\Arduino\DCCpp_Uno\DCCpp_Uno.ino:196:59: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    CurrentMonitor mainMonitor(CURRENT_MONITOR_PIN_MAIN,"<p2>"); // create monitor for current on Main Track

    ^

    C:\Users\Dave\Documents\Arduino\DCCpp_Uno\DCCpp_Uno.ino:197:59: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    CurrentMonitor progMonitor(CURRENT_MONITOR_PIN_PROG,"<p3>"); // create monitor for current on Program Track

    ^

    Sketch uses 18388 bytes (57%) of program storage space. Maximum is 32256 bytes.
    Global variables use 896 bytes (43%) of dynamic memory, leaving 1152 bytes for local variables. Maximum is 2048 bytes.
     
    Scott Eric Catalano likes this.
  6. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Hi,
    The serial monitor must be set to 115200 baud. Note that nothing else should be connected to the arduino's serial connectors Tx/Rx lines, and nothing else should be running on the PC/Computer that may try to use the serial connection at the same time (EG JMRI).

    Pressing reset should produce a status on the serial monitor - EG mine shows:
    '<iDCC++ BASE STATION FOR ARDUINO UNO / ARDUINO MOTOR SHIELD: V-1.2.1+ / Dec 19 2016 20:09:59><N0: SERIAL>'

    Any commands sent to the DCC++ Arduino must be surrounded by '<>' So to turn the power on you type <1> and then press return. It should turn the power on and send the confirmation message <p1> to the monitor. <0> command should turn the power back off.

    You should also be able to send <s> (lower case s) which will return a status message similar to the message you get when you reset it (as above).

    Jim
     
    Scott Eric Catalano likes this.
  7. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Just seen you previous warnings created when you compile. They are just warnings and will not affect the operation of DCC++. They show because you have the IDE preferences set to show all warnings (including minor syntax errors) rather than just fatal errors.
     
    Scott Eric Catalano likes this.
  8. dottney

    dottney TrainBoard Member

    118
    19
    20
    Thanks Jim. Changing to 115200 baud allowed the serial monitor to connect and the <1> command indeed turned on the power to the track and the correct status shows on the monitor. I can toggle with <0> and <1>. The lights & power on the shield by the ouput terminals go on and off. Cool.

    Now when I try JMRI the lights go off and the track power is gone. Do I have to dig around in JMRI to find a setting there to get it to keep the power on to the track?

    Again thanks for the help, I feel I'm getting closer.
    Dave
     
    Scott Eric Catalano likes this.
  9. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Sounds like your hardware is good Dave!

    As regards JMRI I'm afraid i can't help much - maybe someone else can jump in.

    However I have just tried firing up PanelPro (which I only used briefly a few weeks ago) and I remember that in preferences/connections I had to have the port no set (Com6 on my PC) and System connection set to DCC++ Serial Port.

    Then in PanelPro Tools/Power control I could turn the power on and off...

    Good luck!

    Jim
     
    Scott Eric Catalano likes this.
  10. dottney

    dottney TrainBoard Member

    118
    19
    20
    Ahhhhh, brilliant observation about JMRI Jim. I never use the power control option in JMRI because I usually have it connected to my NCE system which i turn on/off manually.
    I'm not at home right now so I'll have to try your suggestions later today.
    Again thanks,
    Dave
     
    Scott Eric Catalano likes this.
  11. dottney

    dottney TrainBoard Member

    118
    19
    20
    Success!! DCC++ is working with Windows 10 & Mint Linux machines. JMRI WiThrottle server and web server are working. I had to get the baud rates correct and use the JMRI power controls to turn on the track power. Android phones are working as throttles.
    Thanks again to Jim and a big thank you to Gregg who wrote the program and freely distributed it. A functioning DCC system for around $20, who would have thought it was possible.
    Dave
     
    Jimbo20 likes this.
  12. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    That's great to hear Dave. DCC++ is pretty amazing isn't it!

    Jim
     
    Scott Eric Catalano and sboyer2 like this.

Share This Page