Help Arduino Decoder Problem with DCC++

miguelcarmor Jan 14, 2018

  1. Rich McClure

    Rich McClure New Member

    9
    0
    1
    Unfortunately that does not look like the issue I am having. The decoders are already programmed with address's and work fine with dcc. switch to dcc++ and use turnout control and nothing. Tried a 270pf capacitor, will try a 0.1uf capacitor.
     
  2. Pieter

    Pieter TrainBoard Member

    134
    43
    8
    Have you selcted DCC++ in all the radio buttons in JMRI's default tab in the preference page?
     
  3. Rich McClure

    Rich McClure New Member

    9
    0
    1
    I verified that all the settings were set to dcc++. I did realize that the dcc interface circuit I am using is based off of the circuit from Geoff Bonza's blog which has some differences in the circuit. Will make up a new interface from Dave Falkenburg's design
     

    Attached Files:

  4. Rich McClure

    Rich McClure New Member

    9
    0
    1
    So I have made an interface circuit using the Dave Falkenburg's design and verified that it worked using my dcc system. I connected to my dcc++ unit, verified my loco operated but still no control of the stationery decoder. I am starting to think that I'm not using the system properly. Still scratching my head.
     
  5. Pieter

    Pieter TrainBoard Member

    134
    43
    8
    With Geoff's decoder there are two variants -accessory and function mode. Last work like a loco. Once programmed you have to make a change to the code and program a gain. If are using the accessory modem set up a switch in JMRI to test it or use the command window with typed commands.
     
  6. Rich McClure

    Rich McClure New Member

    9
    0
    1
    I'm using Ruud Beor's decoder sketches which are accessory versions, I was only using Geoff's dcc interface for talking to the arduino. I am working on setting up the mynabay dcc monitor. I'm not sure what you mean by setting up a switch in jmri, still trying to learn it. As far as the command window, do you mean in arduino or jmri? Thanks
     
  7. Rich McClure

    Rich McClure New Member

    9
    0
    1
    I got a dcc monitor setup and found that when I put a turnout address in the turnout control (action/turnout) and hit the throw or closed command, the address sent from jmri is 4 numbers off. For example if I select address 7, jmri sends a signal for address 3 and so forth. Once I compensated for the offset I was successfully able to control the turnouts. My question now is am I missing something in the jmri settings or is this something I just need to adjust for?
     
  8. Neil McKechnie

    Neil McKechnie New Member

    6
    3
    1
    There is a problem with the Optocoupler circuits caused by the 1N4148 diode. Replace it with a schottky diode Bat41.

    See https://wp.me/pcDzMI-B for a full analysis and recommendations.
     
  9. Neil McKechnie

    Neil McKechnie New Member

    6
    3
    1
    UPDATE: BAT41 was a bad choice as it contains silicon diodes to give it higher reverse voltage breakdown.

    Improvements to the 6N137 Optocoupler circuit:
    1) Add a capacitor (1nF) across pins 2 & 3, this eliminates diode ringing effects on the DCC rising edge (falling edge into the Arduino). Smaller values may work at low DCC supply voltages but 1nF is more reliable.
    2) Change pull-up resistor on pin 5 to 470 ohms. Higher values give a slow rising edge into the Arduino.
    3) Pull-up resistor on pin 6 is unnecessary and may be omitted.

    See https://wp.me/pcDzMI-B for a full analysis and test measurements.
     

Share This Page