Dcc++ Arduino Mega Problem Help!!! What am I missing?

David Downham Jan 4, 2021

  1. David Downham

    David Downham New Member

    First of All Greeting from the UK
    Could some one please explain what is going on with the following:
    I have built and run several Dcc++ systems and JMRI using the Arduino Uno with no issues and all seems to work fine. I used an Arduino Clone and a Deek-Robot Motor shield 15v 2A power supply, again everything works. I appear to have sorted out my 308 error problems with this setup and seem to get good and consistant programming so I was keen to see if I could add wi-fi etc.
    I decided to experiment and build one with an Arduino Mega using either the Dcc++ ex software or the original Dcc++. So following the original instructions I used the same Deek-Robot Motor shield and Mega 2560 (Clone) and using one jumper from Pin4 to Pin 13, i loaded up the original basestation Dcc++ software. Before attempting to program anything I decided to test the voltage on the Main Track and Program Track Outputs: Main Track 15v (ac) Program Track 30v (ac) or 14v(dc). Using a multimeter on the ac setting gets 15v on the Main Track.On the Program Track either 0 or 30v depending which probe goes to which terminal or on the dc setting 14-15v dc. They should both be 15v ac. I notice that only 3 of 4 leds light on the Motor shield, both are lit on ther Main, Only one is lit on the Prog side.
    The result is the same on 3 different Mega from 2 separate sources, purchased at least 12 months apart and 3 different Motor shields and I have checked all of my measuring equipment and downloaded the source code and tried that, same result.

    If I then remove the jumper from Pin4 to Pin 13 and load the Dcc++ ex software and repeat the measurements i get: Main Track 15v (ac) Program Track 15v (ac) which is what I expect.It works but I am struggling to get consistant programming with the 308 error back again. I have tried the suggested fixes on the dcc++ex threads but none seem to work.

    Does anyone have any idea what I am doing wrong here? It should be simple since it works ok with the Uno but I am at a loss to know what I have done?Probably something dumb! Any comments would be gratefully received.
  2. Ash

    Ash TrainBoard Member

    With DCC++EX, one issue I had was understanding the wiring for the Mega -- and removing the jumper on Pins 2 and 13. You might review the steps previously required for DCC++ motor shields vs. the steps from the dcc-ex.com site. (with regard to your reference: Pin4 to Pin 13.)

    I initially used the installer, but have since downloaded the zip file to install updates (Arduino IDE method). Before overwriting files, I review existing files in file manager, sorted by date -- helps me remember changes, etc.

    I do not have optional features enabled (or installed) -- wifi, LCD, etc. Train control via JMRI to Mega (DCC++ EX); accessories via JMRI, using CMRI/RS485 to Arduino pro mini with PCA9685 and MCP23017 modules.
  3. crusader27529

    crusader27529 TrainBoard Member

    I'm pretty sure that DCC-EX uses NO JUMPERS on the standard motor driver board, and 1 jumper when you use DCC++.
  4. Roger Coleman

    Roger Coleman New Member

  5. Ash

    Ash TrainBoard Member

    I am doing some testing with another current sensor and motor board, and ran into the 308 error.

    I will check further on getting the problem resolved -- and it may not be a problem with the standard setup.

    There is a hard-coded static current of 65ma. This gets divided by the current factor to check pin readings on A1. With my new engine and decoder, 65 was too small. 90 worked, but does not work for the other locomotive I tested (-- that one works at 65).

Share This Page