I would like to have three led lights on the front and rear of a locomotive (garden railways) so 6 leds in total. These are (LED, bi-colour, 5 mm, red + yellow 3 Pins - L-59EYW).

The part I'm struggling with is when the current reverses (direction of locomotive changes) I need the lamps to change, so the rear would go all red and the front all yellow, and vice versa. The voltage is a maximum of 12VDC and and the leds are 2.1V in one direction and 2.4V in the other. Would anyone be able to draw a diagram that I can follow to make this work?

  • 1
    \$\begingroup\$ What's wrong with DCC? \$\endgroup\$
    – Andy aka
    Oct 3, 2019 at 9:16
  • 3
    \$\begingroup\$ "Would anyone be able to draw a diagram that I can follow to make this work?" This sounds like "solve it for me". What have you tried to far? \$\endgroup\$
    – winny
    Oct 3, 2019 at 9:18
  • 1
    \$\begingroup\$ It would be much easier if you had bi-colour LEDs with 2 pins, where the direction of the current determines the colour. But with some additional diodes (1N4148) it can be done with a common cathode Bi-colour LED as well. Just make sure the current flows only though the Red LEDs for one polarity and only the Yellow ones for the other polarity. \$\endgroup\$ Oct 3, 2019 at 9:38
  • \$\begingroup\$ Andy aka, unfortunately DCC doesn't like uninsulated rolling stock, or uninsulated live steam engines.. \$\endgroup\$ Oct 4, 2019 at 10:28

1 Answer 1


You need to create a bridge rectifier using the common-cathode LED and two other diodes:


simulate this circuit – Schematic created using CircuitLab

The red LED is lit when A is positive with respect to B. The yellow LED is lit in the opposite case. Build 6 of these; hook three of them up one way at one end of the locomotive, and hook the other three up in the other way at the other end.

R1 sets the current through the LEDs; a value of 390 Ω provides about 30 mA, and it needs to be rated for at least 1/2 W. Use a higher value if the LEDs are too bright at this current.

If you haven't done so already, you can do something similar with the headlights:


simulate this circuit


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.