DCC++ Success

Discussion in 'Other Electronic Interfaces' started by cmcan, Mar 16, 2018.

  1. cmcan

    cmcan Full Member

    Messages:
    474
    Likes Received:
    56
    Joined:
    Jun 11, 2016
    Hi All
    I have finally managed to get this to function.
    Components:
    Arduino uno
    Clone of an arduino motor shield
    LaisDcc 8 pin decoder with stay alive
    PC power supply. Running 12v dc input into the motorshield


    Below is a link to the instructions for testing whether your arduino and the motorshield will be able to perform the necessary functions

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

    Just a note. About the first test.
    The jumpers normally go into pins (13 and 5) and (12 and 10) on the uno I'm not sure if it is the same for the mega. For the first test you connect pins 13 and 11 turn on an off via the arduino serial monitor. Then test pins 13 and 3.

    The DCC signal test (test 2) you connect pins 13 and 5, then 13 and 10. If the LEDs flash as they should the arduino is good to go.

    Testing the motor shield:
    Attach the motor shield to the arduino and power up BUT don't connect to tracks yet. Still using the arduino serial monitor type <1> to turn on. All 4 LEDs near the output sockets should come on. The final test type <D> (must be upper case), all 4 lights should start blinking.

    What does this mean? Your arduino and motor shield can handle the task.

    The next step is where i got confused. I had JMRI all loaded and my Ipad could connect as a controllerbut my train wouldnt move. I knew the decoder was plugged in the right way from last night. When i got JMRI to identify the decoder it selected the wrong company. Jmri did have my decoder and i put it in manually, wrote and saved the data. Got the throttle and nothing. Everything was set to DCC++. The last thing I did was go to the preferences page (i am using a mac) and set the power, throttle, and one I cant remember right now (they were all next to each other - the first three options) to DCC++ from internal. This allows jmri to fire up the motor shield (i think, well when i selected the power on button in JMRI all 4 lights came on. This hadnt happened before)

    I connected the throttle and hey presto, loco is under control.

    Next task - lengthen the test track

    I can make a video of the process if anyone is interested?

    Cameron
     
  2. Toto

    Toto I'm best ignored Staff Member Founder Administrator

    Messages:
    15,419
    Likes Received:
    3,842
    Joined:
    Dec 5, 2017
    Go for it Cameron.
     
  3. cmcan

    cmcan Full Member

    Messages:
    474
    Likes Received:
    56
    Joined:
    Jun 11, 2016
    Hi all

    I have made a video of the testing process for dcc++ as described above



    Cheers

    Cameron
     
    jakesdad13 likes this.
  4. SMR CHRIS

    SMR CHRIS Staff Member Moderator

    Messages:
    3,323
    Likes Received:
    545
    Joined:
    Dec 31, 2015
    Nice work Cameron a bit of satisfaction I’m sure, having done it yourself :thumbs::thumbs::thumbs:
    Can you connect to your layout for a bigger test.??
     
  5. cmcan

    cmcan Full Member

    Messages:
    474
    Likes Received:
    56
    Joined:
    Jun 11, 2016
    Hi Chris,

    Thanks, it was satisfying to have it work.

    The next step will be connect it to the larger layout. I'm just reading upon how to wire things up.

    Cameron
     
  6. Gary

    Gary Wants more time for modelling.... Staff Member Administrator

    Messages:
    7,354
    Likes Received:
    3,909
    Joined:
    Dec 5, 2015
    Remember that DCC is only two wires.... :facepalm:

    Cheers, Gary.
     
  7. cmcan

    cmcan Full Member

    Messages:
    474
    Likes Received:
    56
    Joined:
    Jun 11, 2016
    Gary,

    So they say!

    I am thinking of using a toggle switch arrangement similar to what you did with the industry lane programming track

    Cameron
     
  8. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    :handshake: welldone Cameron, worthwhile you have a look at JMRI as well

    http://jmri.org/help/en/html/hardware/dccpp/index.shtml

    DCC++ is supported for JMRI which will also enhance the core functionality of the DCC++ system.

    Thanks for the test link, as I have a couple of different motorshields to try out, and an Arduino UNO and MEGA.

    The wiring connections on the MEGA are easier than the UNO, but I can't remember which one doesn't need the link.

    Paul
     
  9. Gary

    Gary Wants more time for modelling.... Staff Member Administrator

    Messages:
    7,354
    Likes Received:
    3,909
    Joined:
    Dec 5, 2015
    Look out now Cameron, Paul (aka the 'Darkside Warlock') now knows you are playing with JMRI... You are now walking on shakey ground.... :avatar::avatar:

    Cheers, Gary.
     
  10. Davoetype

    Davoetype Full Member

    Messages:
    745
    Likes Received:
    373
    Joined:
    Jun 14, 2016
    Careful as things come out to bite you in the night!

    Cheers
    Richard
     
  11. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    Don't go scaring him off, he's just taken the bait :avatar:
     
  12. cmcan

    cmcan Full Member

    Messages:
    474
    Likes Received:
    56
    Joined:
    Jun 11, 2016
    Hi All,

    Thanks Paul, I will keep exploring.

    I know enough about programming to break things.

    Gentlemen as I said in an much early post on an earlier version of this site "I am a blunt force coder, It's not efficient but it works, sometimes........:scratchchin:
     
    Colin_W likes this.

Share This Page