Polarity Issues

JohnForsythe May 29, 2020

  1. JohnForsythe

    JohnForsythe TrainBoard Member

    25
    3
    4
    Greetings all,

    Background: HO railroader 20+ years ago. Mostly Rail Power Product kits or bashed Athearn blue box. Can motors, on board battery lights, nice detail. Kids, shifting interests, etc. Getting back into it, now.

    Everything seems to be DCC these days so I decided to do some exploration. Bought an Adruino and a motorshield along with a Digitraxx DH126. Downloaded, compiled, loaded and got JRMI running.

    I'm having some weird issues with lights/functions. First, I was fiddling with my old incandascent setup, main and ditch lights. Couldn't quite get things sorted. Not the end of the world, but frustrating. Couldn't get the lights to behave how I prefer, which is non-directional, ie headlights on/off, ditch lights on/off without regard to the motor running.

    Then the weirdness started. First the F1 light stopped working. OK, fiddle with ditch lights. Mean time, I ordered some 0603 LEDs. Those came in today and I wired things up to test. However, nothing doing. Mkay, try ditch lights. Nothing. So, out comes the voltmeter.... Somehow the voltage on the output is reversed! Aaaand that explains why my ditch lights are also not working. 10 volts to 2 tiny lights and they burned out.

    Wiring is per digitraxx diagram:
    Rail pick ups: Left side is black, right side red. Those feed to the engine on gray/orange.
    Lighting:
    Blue is common, white is main light, yellow is ditch.

    When I activate my function and connect my test probes negative to blue and positive to white I get a reversed reading of -9.8 volts. I've tested my meter against a battery and it is reading correctly.

    I tried a factory reset on the decoder but it didn't change the behavior.

    So, the question is, how is it that my common is now feeding positive? Is the decoder defective or is there some programming or config tweak I can do to fix this?
     
  2. Jimbo20

    Jimbo20 TrainBoard Member

    274
    178
    11
  3. JohnForsythe

    JohnForsythe TrainBoard Member

    25
    3
    4
    Jimbo,

    Thanks for the reply.

    You are right! I was using the paper doc and my eyes aren't young enough to decipher that distinction.

    So, if I'm understanding this correctly, the blue is a common bus positive and the function leads are just disabled negative leads that are activated to complete the circuit for a given function? Very strange to me if that is the case.

    Next piece is the light programming. Is there a resource somewhere that explains what each of the modes is? I can't seem to find anything, which means I'm probably not using the correct search criteria.
     
    Last edited: May 29, 2020
  4. Sumner

    Sumner TrainBoard Member

    2,841
    5,994
    63
    Yep, the decoder is controlling the circuit on the ground side of the circuit,

    Sumner
     
  5. RBrodzinsky

    RBrodzinsky November 18, 2022 Staff Member TrainBoard Supporter In Memoriam

    5,685
    2,786
    98
    That is the standard. All DCC function "outputs" are connections to ground, with a common positive. You must also put a current limiting resistor on one leg of the LED (doesn't matter which). 1000 ohms is a good generic value
     
  6. JohnForsythe

    JohnForsythe TrainBoard Member

    25
    3
    4
    It all makes sense now. Not really sure why they would do it that way though. All the low voltage stuff I've ever wired, ground is the common bus and positive is by device. Now I know.

    Regarding the LED resistor: I already have 100 ohm resistors on my LEDs (I had them on my incandescent bulbs as well, but fat lot of good that did me on the wrong side of the leg). The question is, in general, does one wire a single higher value resistor and run each circuit through it, or a multiple resistors per circuit?
     
  7. woodone

    woodone TrainBoard Member

    959
    51
    24
    you better up the value on the resistors to at least 1K
    Don’t think 100 ohm will be enough to protect the LED.
     
  8. RBrodzinsky

    RBrodzinsky November 18, 2022 Staff Member TrainBoard Supporter In Memoriam

    5,685
    2,786
    98
    One resistor per LED. Most LEDs have approx 2V of forward voltage (Fv i.e., uses 2V) . At 10V input, less 2 V Fv and 100 ohms, you are putting 80mA through the LED. LEDs have maximum current around 20mA, and most of the time, one really wants to limit down to about 10mA (most LEDs are very bright).
     
  9. BigJake

    BigJake TrainBoard Member

    3,310
    6,377
    70
    The outputs are done that way (open/ground) because the circuits to do so are smaller and/or more efficient (less power lost into heat) than those for switching the positive side (open/high).
     

Share This Page