DCC++ and G.Bunza decoder

Michael Calicchia Jan 27, 2018

  1. Michael Calicchia

    Michael Calicchia New Member

    5
    2
    14
    Hi Everyone,
    Having a little issue getting the 2 to work together.
    I put together the DCC++ base station and everything works. i can control my locos, connect to JMRI, use the programming track, etc... everything works! now i've moved onto the next step and built one of Geoff Bunza's decoders. When used with my NCE throttle it works great. i can control my servo turnouts using the AccDec_15Servo sketch. on the nce throttle i select ACCY, enter address 40, hit 0 or 1 to move the turnout and it moves.
    Now the problem......
    When i try to add the turnout to the base station nothing happens. i'm using the T command to add the turnout <T 10 40 0> and i get the expected <O> response saying it was accepted but when i try to control the turnout <T 10 1> or <T 10 0> nothing happens. I get the expected response on the serial monitor <H10 1> but the servo does not move.
    I'm guessing its an addressing issue but not sure. I've searched for over a day now and can't seem to find an answer so any help would be greatly appreciated.
    Thanks
    Mike
     
    Scott Eric Catalano likes this.
  2. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
    Hi,

    The setting up of accessory decoders with DCC++ needs an address/sub address to be programmed. I fell foul of this when I first set up my system!

    Have a look at this page - specifically the first post in the comments section;

    http://model-railroad-hobbyist.com/node/27318?page=11

    So to store the first turnout (with an id of 10) that is at address 40 needs the command:

    <T 10 10 3>

    HTH

    Jim
     
  3. Michael Calicchia

    Michael Calicchia New Member

    5
    2
    14
    Thanks Jim,
    I saw that page and started reading through the comments but I guess I didn't go far enough. I knew it was an addressing issue but just couldn't figure out what the proper format was.
    Still trying to figure out all this Arduino stuff. I graduated from College way back when with an Engineering degree in microprocessors and Digital Circuit design but its been a long long time since i used that part of my brain. :)

    Something else I discovered that may be useful to someone else..... ALL the GNDs have to be tied together for everything to work properly. The BaseStation, Decoder and the Power Supply for the servos must all be tied together or the servos will do all kinds of strange things or they may not work at all. I stripped the gears on a couple cheap servos before i discovered that the ground on the servo P/S needed to be tied to the decoder GND. The strange thing is it only happened when I used the base station. when the decoder was used with NCE, i didnt have that issue.

    Thanks Again
    Mike
     
    Jimbo20 likes this.
  4. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    Now, I'm confused.....I plan on just using JMRI through a second DCC++ system to control switches and signal mast outputs. The trains will be controlled through the 'primary' DCC++ system, each having a separate electrical output and USB connection to the JMRI system.

    Using the hardware as accessory decoders with JMRI, assuming the base address for the decoder of 40, what device do I command to make a servo move?

    I assume that one of Bunza's controller's addresses don't overlap, and I can have another controller at address 41, and then 42, etrc.......so how do I command one of the turnouts say on the other controllers?

    If I understoof the addressing scheme, life would be easy.
     
  5. crusader27529

    crusader27529 TrainBoard Member

    247
    167
    11
    Never mind.....I figured out the addeessing scheme by looking at the Arduino code........each decoder responds to 16 addresses starting at the defined base address, one for each output pin/function.
     
  6. AndyH

    AndyH TrainBoard Member

    77
    9
    6
    The relevant answer from Geoff starts:

    "If you have configured your decoder as an accessory decoder, then each servo will have its own "switch" address with the default addressing starting at 40. If you configured your decoder as a mobile/function decoder, then each servo is operated by a numbered function of that decoder address (default 24) F0-F16."

    How do I know whether I have configured my decoder as an accessory decoder or a function decoder? I'm on DCC++/JMRI, and relatively competent at adapting other people's programming for Arduino.

    Thanks.
     
  7. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    look for where CV29 is defined:
    Code:
    {CV_29_CONFIG,CV29_ACCESSORY_DECODER|CV29_OUTPUT_ADDRESS_MODE|CV29_F0_LOCATION}, // Accesory Decoder Short Address
    
    This declares that it is an accessory decoder. If "CV29_ACCESSORY_DECODER" is left off it will be a mobile decoder.
     
    vasilis likes this.
  8. vasilis

    vasilis TrainBoard Member

    110
    39
    10
    if the name contains acc then is an accessory decoder.
     

Share This Page