Since you are running from a 12V supply, try this:
sw1-------resistor-------LED1---------LED2-----------sw2
Wire the LEDs in oppposite directions from each other, try a resitor around 820 Ohms (if you have a 1k around that might work). If the LEDs don't light try a smaller value. When you reverse the polarity the LEDs should light the opposite colors.
EDIT: I made the assumptions here that you know how to use the DPDT to reverse the polarity to the LEDs. If not, holler!
Jeff But it's a dry heat!
You can do this with a 2-lead bipolar LED or a pair of regular LEDS back to back, plus a pair of regular diodes, or a pair of power supplies.
For 2 power supllies (2 small wall warts will power many many LEDs), hook the + of oen power supply to the - of the other. This becomes the common line to all the LEDs. The free side of one power supply goes to one side of the switch, the free lead of the other supply goes to the other side of the switch. The center switch lead goes to the other side of the LED (with approriate resistor).
Or you can use an AC power supply, plus a pair of ordinary diodes at each switch. One side of the supply is again common to all LEDs. the other side of the supply gets 2 diodes at each switch, one with the banded end conenctect to one switch terminal, the other with the blank end connected to the switch terminal, center switch terminal again goes to the LED.
Or take the AC power supply and connect a couple of higher amperage diodes to one side of it, one witht he banded end tot he power supply and one with the banded end free. One diode's lead goes to oen side of all the switches, the other diode's lead goes to the other side of the switch. The free power supply lead is common, and again the center switch terminal goes to the other side of the LED.
For two seperate LEDs, connect one side of each LED together and tot he common of a DC supply, connect the other side of the DC supply to the center switch terminal, and each LED to one of the other switch terminals
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
Jeff/Randy here is a diagram of what I have. Sorry I ama picture kind of guy. Maybe with this you can walk me thru whatyou think will work.
By he way I mislabled one of the LEDs.
Terry in Florida
Lets see if this one works.
TIF
If you plan to use either Switch 1 or Switch 2 to power your frogs, you won't be able to use a single bi-color LED (the 2-lead type) for what you want to do. You COULD use a 3-lead bi-color LED, or 2 individual LEDS.
Alright, here we go....
+ of power to A of one side of the switch, C of the other. - of the power the opposite. Now in one position of the switch you get + on one B, - on the other, the opposite when you throw the switch. From B of one switch got to one of the resistors (by the way, you Ohm symbol is upside down), if my quick thinking is right, one resistor should do the trick. From the other end of the resistor to A of one LED, from C of that LED to C of the other, then to B of the other half of the switch. In one switch position you should get R, G, in the other G, R.
rrinker wrote: If you plan to use either Switch 1 or Switch 2 to power your frogs, you won't be able to use a single bi-color LED (the 2-lead type) for what you want to do. You COULD use a 3-lead bi-color LED, or 2 individual LEDS. --Randy
Good point, I wasn't thinking of powering the frog. And I'm going to work on my railroad right now!
scubaterry wrote: I am using a 12v supply from a computer, 3mm red/green two lead LEDs. . . using a slide switch (double throw, double pole). I am trying to wire it so I get the following results: When the T/O is closed the top LED is green and the bottom is Red. WHen the T/O is thrown the opposite, Red on top green on the bottom. Can this be done with two lead bi-colr LEDs? Also I realize I will need resistors for the LEDs so we can eliminate them from the equation Terry in FLorida
Also I realize I will need resistors for the LEDs so we can eliminate them from the equation Terry in FLorida
Sure, DC into one end of switch. Criss cross these leads to the other end of the switch. LED to center terminals. 2nd LED in the same place but with opposite polarity. Both LEDs will be on all the time and with opposite colors. Combo depends on switch position.
Good luck.
Karl
The mind is like a parachute. It works better when it's open. www.stremy.net