Basic setup help

Bob McCown Oct 8, 2018

  1. Bob McCown

    Bob McCown New Member

    4
    1
    5
    Hey folks. I've been trying to get a BaseStation node set up, and I seem to be having some kind of basic problem, because I havent been able to work it out.

    I have various Arduinos (SainSmart Mega, Fundiuno Uno, and some generic Uno clones). I have a Pololu motor shield. I have been unable to get the BaseStation to work, so I pulled the motor shield and started basic sketch debugging.

    Regardless of which Arduino I use, I cant get the first step of the debugging here:

    https://github.com/DccPlusPlus/BaseStation/wiki/Diagnostics---D---Command

    to do what it asks. DCC_SIGNAL_PIN_MAIN and DCC_SIGNAL_PIN_PROG dont blink the LED, but SIGNAL_ENABLE_PIN_MAIN and SIGNAL_ENABLE_PIN_PROG do. Any have an idea of what I should do next to try and sort this?

    Thanks
    -=Bob McCown
     
  2. NScaleKen

    NScaleKen Permanently dispatched

    157
    128
    5
    The sketch needs an update and save of the motor shield variable for the Pololu. From what I recall in the config.h there is a motor shield input variable, you need to change the 0 to a 1 and save it then reupload the DCC++ sketches. If you already did that sorry just checking. Other than that, always suspect the cable, so check your jumper wires on the arduino/shield twice at least. Hope things get resolved.
     
  3. Atani

    Atani TrainBoard Member

    1,466
    1,736
    37
    Make sure this line: https://github.com/DccPlusPlus/BaseStation/blob/master/DCCpp_Uno/Config.h#L17 is set to 1 (as @NScaleKen references). Make sure you have the correct jumpers in place for the Pololu board and the Arduino you are using.

    The steps in the wiki page you reference may not be applicable to your boards as well, not all boards use pin 13 for the built-in led. Instead I would skip that step and just make sure that basic commands are working via the serial console from the arduino ide, you can use <s>, <1>, <0>, etc to test basic functionality of the base station and then move to testing with <D> which should blink the LEDs on the motor shield (if there are any!). What you should see with <D> is the polarity of the M1A/M1B and M2A/M2B going back and forth between + and - respectively. It will not be at the same speed as the DCC signal so you will be able to visually see and/or measure with a multimeter.
     
  4. Bob McCown

    Bob McCown New Member

    4
    1
    5
    Having spent the last hour doing the entire debugging suite, then going back and checking *all* my soldering connections, and using a loupe to make sure the traces were cut properly, and *still* having no joy, I decided to open JMRI and see if anything in there would help me out. After poking a bit, I decided to try to send packets from JMRI, and, VOILA, it works. So it looks like the On/Off "button" in JMRI doesnt work for my setup, I have to open the send packet window and send a 1.

    Learning experience. Thanks for the pointers anyway, at least it got me to know that everything *is* working...
     
  5. Atani

    Atani TrainBoard Member

    1,466
    1,736
    37
    The power button in JMRI should be working, if it doesn't then that generally means that JMRI is not successfully talking to the base station and is not able to receive/parse the basic status output via the <s> command. Can you capture the monitor output and confirm that JMRI does not show any errors when you start up JMRI and do not send a <1> manually? It should send the <s> command roughly once per minute and if you hit the power buttons in JMRI it should send the <1> or <0> commands for you, the state will not change if it does not understand the response though.

    Also what version of JMRI are you using and which fork/version of the base station are you running?
     
  6. Bob McCown

    Bob McCown New Member

    4
    1
    5
    I'm running JMRI 4.11.6, and the BaseStation code from the repo here https://github.com/DccPlusPlus/BaseStation

    The system console shows me this:

    2018-10-09 17:54:45,318 xml.AbstractSerialConnectionConfigXml INFO - Starting to connect for "DCC++" [main]
    2018-10-09 17:54:45,428 serial.DCCppAdapter INFO - COM7 port opened at 115200 baud with DTR: true RTS: true DSR: false CTS: false CD: false [main]
    2018-10-09 17:54:47,275 util.FileUtilSupport INFO - File path program: is D:\JMRI\ [main]
    2018-10-09 17:54:47,276 util.FileUtilSupport INFO - File path preference: is C:\Users\Bob McCown\JMRI\DCC\ [main]
    2018-10-09 17:54:47,276 util.FileUtilSupport INFO - File path profile: is C:\Users\Bob McCown\JMRI\DCC\ [main]
    2018-10-09 17:54:47,276 util.FileUtilSupport INFO - File path settings: is C:\Users\Bob McCown\JMRI\ [main]
    2018-10-09 17:54:47,276 util.FileUtilSupport INFO - File path home: is C:\Users\Bob McCown\ [main]
    2018-10-09 17:54:47,276 util.FileUtilSupport INFO - File path scripts: is D:\JMRI\jython\ [main]


    I dont see anything in the DCC++ monitor when I toggle the power button, nor just sitting there doing nothing for several minutes, but when I send 1 and 0, I get:


    Track Power ON Cmd
    Power Status: ON
    Track Power OFF Cmd
    Power Status: OFF
     
  7. Atani

    Atani TrainBoard Member

    1,466
    1,736
    37
  8. Bob McCown

    Bob McCown New Member

    4
    1
    5
    Interesting. Ok. I’ll keep an eye on it but at least I can get the connection to work manually. Thanks.
     
    Atani likes this.
  9. jonnno

    jonnno TrainBoard Member

    18
    16
    3
    I would like to ask for help on a problem which I cant explain nor fix
    A bit over a year ago I managed to build , program and run a loco using DCC++ with Greggs interface. I had a great deal of help from this forum to make it work.

    Recently I tried to run it again and to load controller into Processing gave me an immediate fatal error message with a list of failed files. The base station was not even connected at this stage.

    I updated processing to 3.4 no different
    I redownloaded controller from github no different

    When I connected via USB PC to base station and used arduino serial monitor I could not get communication. Again I reinstalled base station from github with no change.
    After changing hardware I came to the conclusion that the arduino itself was faulty and replaced it and things started to improve. I followed the troubleshooting instructions in
    beginners guide to DCC++ on utube "Cobo in HO" --very helpful and easy and recommended

    I found that the lights came on and off on motor shield from <1> and <0> on arduino serial monitor and the implication was that the system was working, at least as far as the arduino iDE.

    I now loaded JMRI 4.4-R1ccf76b to try and connect up but no success. I cant find v4.72 mentioned in discussions. Does it exist?

    I am confused. I considered this might be an issue with win 10, but everything else seems to work and the testing I have done seems ok

    help


    jonnno
     
    jfcastiglia likes this.
  10. Atani

    Atani TrainBoard Member

    1,466
    1,736
    37
    EFA Train Guy likes this.

Share This Page