Yay! Got DCC++ running on Win10 & Ubuntu

DougL Nov 7, 2016

  1. DougL

    DougL TrainBoard Member

    Finally I created a dual-boot system, Loaded Arduino IDE and JMRI on both, and all the communications worked. The engine moved on the test track for both OS. Yay!

    This took a long time because
    1. Some of the essential hardware information was wrong (on Mega 2560, use pin 13 to 2, NOT 13 to 5 or 4) and neither the early videos or written descriptions were corrected. I stumbled across it with much searching.
    2. Win 10 is special. Say you want to share the Arduino sketches between the OS on a shared drive. Win makes linux-win shared drives unreadable to Linux unless you disable the Win quick-boot ability
      1. solution: disable "Turn on fast startup". Step-by-step at http://www.tenforums.com/tutorials/4189-fast-startup-turn-off-windows-10-a.html#option1
      2. Note: Win 10 updates may re-enable this and then you must re-do the process. Thanks, MS.
    3. Sometimes (OK, often. Frequently. Every dang time.) in Linux your Arduino IDE will throw "timeout" when you try to upload to Arduino. Linux has denied access for <user> to the serial port. Of the suggested solutions, this has worked consistently for me but I must run it in the terminal every time I log on:
      1. sudo chmod 666 /dev/ttyUSB0 (or ttyUSB1)
      2. I tried many other solutions that did not work - adding <user> to the serial group, etc. Maybe they will work for you.
    4. Once you create a DCC++ profile in JMRI YOU MUST TURN IT ON EACH TIME. Not necessarily obvious.
      1. If previously you connected to NCE the system is on by default so you do not even notice this.
      2. For DCC++, look at the top center of the main JMRI window. Find an octagonal icon, Off (red) Indeterminate (yellow) On (green). click it until it is On (green).
      3. LEDs should light up on your motor shield. If not, then choose menu Actions ->Program.
    5. Test, measure, and verify everything.
      1. Can you load the "blink" sample onto Arduino and see an LED flash every second?
      2. Did you really upload the DCC++ sketch? (you might see one or two timeout errors before it loads. If dozens, then verify your access to the serial port. And the USB cable is plugged in. D'oh!)
      3. Is the 15V DC (or higher) power supply to the motor shield actually delivering the voltage? Measured at the terminal screws on the motor shield.
      4. Once the DCC++ sketch is loaded and JMRI is ON, do the LEDs light on the motor shield?
      5. Is there measurable AC voltage on output terminal screw pairs A+ to A- and B+ to B-?
      6. Verify the motor shield has built-in short protection. Does the motor shield turn off when the track is shorted, and slowly turn on again after the short is removed?

    Anyway, that is what I had to do.

    Some people have it start up effortlessly. That never happens to me. OTOH, I learn one heck of a lot about any system and communications protocols.

Share This Page