RailPro > RailPro Specific Help & Discussion

Control Bi-Colour LEDs

(1/3) > >>

Gino:
I have an interesting problem.

I have an USA Trains locomotive that has Classification Lights (LEDs), front and rear. The LEDs are Bi-Colour, Red and Green.
Currently when the polarity is one direction the LED lights up Green. When the polarity is reversed the LED lights up Red.

The question is how to control the LED with 1 output of an LM-4S-G?

I know that the LED can be controlled using 2 of the outputs on the LM-4S-G but this will use 4 of the outputs, 2 outputs for the Front Class Lights and 2 outputs for the Rear Class Lights.

But I also want to use the other outputs for the Headlights, 2 outputs, and Number Boards, 2 outputs. Not enough outputs to do what I want. I would like to control the Front and Rear Class Lights using the remaining 2 outputs.

Suggestions are appreciated.

Gino

Gibs:
Wire the green front and the rear red to the same output wire, just use a different resistor before each LED that you connect to the output wire. One rated for the green LED, one rated for the red LED. Just because a " light" is at the front and the back doesn't mean each one needs their own output wire. You can quite happily wire them up in parallel. JUST make sure each COLOUR has its own resistor ok.

When the loco goes the opposite way, then you do the same as above but in reverse, rear green in parallel with front red. Total outputs used....2.

gregeusa:
The LED in USAT is BIPOLAR, 2 leads only, not the 3 lead type.

You need to reverse the polarity, and I would use a small DPDT relay to do this, engage the relay for one polarity, and disengage the relay for the other.

Since this is a BIPOLAR LED, only one current limiting resistor is possible.

I don't know the details on the RP function outputs, so the standard BEMF shunt diode across the coil would not be a bad idea, cheap insurance.

Greg

Gibs:
My bad, late night up at the mine. I missed the bit about it being polarity sensitive. And that's the reason why I  swap out bipolar LEDs, it's easier to set up with three leg LEDs. No need for a micro relay. It's a tight enough fit already in an HO scale. You G scale guys have so much more usable realestate.

Gino:
Well I think I figured it out with all the help.

The LEDs have 3 legs so only 1 resistor is required.
Based on the suggestions I am using 1 output to power the Green LEDs in the front along with the Red LEDs at the rear. The second output will be used to power the Green LEDs in the rear along with the Red LEDs in the front.

The next challenge will be to program the 2 outputs so that when the locomotive is moving forward one set of LEDs turn on and when the locomotive is reversed the other set of LEDs light automatically.

Thanks again for the help.

Gino

Navigation

[0] Message Index

[#] Next page

Go to full version