I have been thinking a little more, and the downfall of this might be the extra effort required to protect the LEDs against the reverse voltage. I don’t have time to think of a good way around it, I’m sure it’s been done before.
Yup, I think the two-LED solution with LED, Rectifying Diode, and current limiting resistor all in series between the frog and each stock rail will work. One should be red, the other green for the signal. The LED for the polarity opposite the frog will be on and the other will be off. The rectifier will protect the LED from the reverse voltage and the resistor will limit the current. The diodes should be wired facing the “same way” so current will flow through both during half of the DCC waveform and off during the opposite polarity. Here’s a (bad picture of one half:
DCC is not an AC signal. DCC is a differential Pulse width DC modulation scheme. The differential voltage between the two rails (let’s call them A and B) will always be changing from bit to bit. Putting a rectifier in line will only chop off half the waveform not provide a on/off decision point. Now what you can do is detect voltage between rail A and B or between common rails (an off condition). So for your example when the frog is not against the stock rail there will be a voltage differential bewteen the two but when the switch is thrown
jktrains: I really appreciate you testing the LEDs with resistor! Anxiouly waiting your results.
jim22: You seem confident in your final analysis and your diagram is very clear. Thanks! What do I ask for at Radio Shack for the “rectifying diode”? Will I know by looking at the diode the direction some how? Facing the same way means … each diode pointing toward its outside rail, or the other direction… or something else?
jbinkley: In your followup to jim22, do I understand you are agreeing it will work but just defining “why” it will differently, or do you still feel it probably won’t work? Thanks for hanging in there with me.
You can do it with one resistor, between the common track and both LEDs. Add a vanilla diode in the opposite direction parallel to each LED to prevent high reverse voltage across the LEDs.
Rail 1 -----diode-----|
-----LED-------|-----resistor------Froggy
Rail 2 -----diode------|
-----LED--------|
‘Obviously’ that’s one diode and one LED to each rail, all four tied to one resistor to the Froggy. At any one time one one of the four paths should be active, since one rail will be at the same voltage as the frog, and the diodes and LEDs are oriented oppositely.
There’s a distinction between rectifying diodes and small signal or logic diodes. The rectifying type diodes are the 1N4001 1N4003 1N4004 1-amp diodes. The differences between these is the max reverse voltage and any of them will work fine.
The diodes have a band around one end - thats the cathode end where positive current will flow out of. LED’s have an anode and cathode too. The schematic diagram of a diode is usually a triangle with a line accross the point and looks somewhat like an arrow. Conventional current flows from positive to negative power supply terminals, and to get the current to flow through the diode, the arrow must point in the direction of conventional current.
I agee that a single current limiting resistor can be used, so follow the bouncing ball…
Connect stock rail 1 to 1st rectifier anode, 1st rectifier cathode to 1st LED anode, 1st LED cathode to resistor, other end of resistor to frog. Stock rail 2 to 2nd rectifier anode, 2nd rectifier cathode to 2nd LED anode, 2nd LED cathode to resistor (and 1st LED cathode, other end of resistor to frog as in the previous sentence).
The DCC signal is an alternating square wave with the pulses on the square wave modulated in width to send the commands to the decoders. As such, it spends part of it’s time with one rail positive and the 2nd rail negative, and part of it’s time with them the other way around. During the positive portion of the cycle, the diodes will conduct and the LED will be illuminated. At the same time, the opposite stock rail is connected directly to the frog by the switch in the ground through - no voltage at all, so that LED will be off. During the negative portion of the cycle, both LED’s will be off, but the frequency is so fast, you will not be able to see the “ON” LED flicker. The “OFF” LED will be off continuously.
Hope this helps. I don’t have a convenient way to d
There’s a distinction between rectifying diodes and small signal or logic diodes. The rectifying type diodes are the 1N4001 1N4003 1N4004 1-amp diodes. The differences between these is the max reverse voltage and any of them will work fine.
The diodes have a band around one end - thats the cathode end where positive current will flow out of. LED’s have an anode and cathode too. The schematic diagram of a diode is usually a triangle with a line accross the point and looks somewhat like an arrow. Conventional current flows from positive to negative power supply terminals, and to get the current to flow through the diode, the arrow must point in the direction of conventional current.
I agee that a single current limiting resistor can be used, so follow the bouncing ball…
Connect stock rail 1 to 1st rectifier anode, 1st rectifier cathode to 1st LED anode, 1st LED cathode to resistor, other end of resistor to frog. Stock rail 2 to 2nd rectifier anode, 2nd rectifier cathode to 2nd LED anode, 2nd LED cathode to resistor (and 1st LED cathode, other end of resistor to frog as in the previous sentence).
The DCC signal is an alternating square wave with the pulses on the square wave modulated in width to send the commands to the decoders. As such, it spends part of it’s time with one rail positive and the 2nd rail negative, and part of it’s time with them the other way around. During the positive portion of the cycle, the diodes will conduct and the LED will be illuminated. At the same time, the opposite stock rail is connected directly to the frog by the switch in the ground through - no voltage at all, so that LED will be off. During the negative portion of the cycle, both LED’s will be off, but the frequency is so fast, you will not be able to see the “ON” LED flicker. The “OFF” LED will be off continuously.
What I am saying is that the polarity of the diode is irrelevant as far as the track “polarity” and only matters with respect to LED. The concpet of opposing polarities doesn’t matter since the rails will always be changing polarity in rerefence to each other. I’d pull the diodes. They really aren’t needed. Just use an LED and a 1k resistor. I just tried it and it works fine. An LED is a diode and while most don’t specify a PIV rating, I’ve never seen one that could handle 12-20V. We use them back-to-back on Tortoise machines all the time where the PIV is close to 12V.
You again have proven how awesome this forum is for a novice like me. You have shown how I don’t have to rip out my installed ground throws with SPDT lugs and yet have LED lights on my control panel. I learned so much from everyone’s responses. Thanks to Jeff, jim22, and jktrains for testing it for me. Thanks Jim22 for the exact wiring specs, and others for the diagrams. I think I can summarize as follows:
I can use a red and a green LED as long as I put a 1K resistor in series to both.
Two diodes (1N4001, 1N4003, or 1N4004 and 1 amp) could be used parallel with each LED.
Consensus in the end, is that the diodes are not necessary.
The wiring can follow directions given in this thread (above). (Similar to wiring from a Tortoise’s SPDT lugs except driven by turnout’s DCC track power, and not a DC power source).
One correction: the rectifying diodes must be in series with the LED’s! It is possible that the LED’s will tolerate the 12V reverse bias resulting from the negative portion of the DCC Cycle, but the extra parts cost less than $1 each and may prevent rebuilding them as they fail in the future.
Ok, here’s the picture (not so hard after all, but not the neatest job I’ve ever done…). Click on it to enlarge so you can see all the lines!
Why not put small signal diodes in parallel with the LEDs, oriented oppositely. Then when the voltage reverses it would conduct, and the reverse voltage across the LED would be just a diode drop. Of course you would be drawing 10 mA or so, rather than just killing everything off.
That’s possible. Most of the manufacturer spec sheets I found didn’t have peak reverse voltage ratings. A few did. I found a couple of Fairchild LEds that were 5V. I tried an LED with a 1k resistor and it worked fine across my track.
Not sure it’s better, just wanted to make sure I wasn’t missing anything. I guess it might be marginally cheaper, but we’re pretty far in the noise at that point.
While I was thinking this stuff up, I tried it at the reversing gap on my layout. This is another good application of the circuit. Use a red LED to indicate that the reverse loop is configured incorrectly for the particular route. Could even run a red LED on the bad side and a green LED on the good side, i.e. two LED’s in parallel (same direction, one physically on each leg).