Let's Make Robots!

2 LEDs on only one output

So, this challenge is for anyone!
From analog guys to digital guys.
Only thing you should make is get leds turn on and off alternately, when you switch on and off the power.
You can do it from MCu or from power source with button.

Output off.
Led 1 turns off. Led 2 turns on.
Output on.
Led 1 turns on. Led 2 turns off.

1. It's your solution! Use ready IC's or your own circuits.
2. Only one MCu pin or button.
3. You can make it to breadboard, or make a PCB.
4. Make a video which shows your circuit in action, and how is it connected.
5. No mechanical switches allowed on solution!

Here's some pics:

Analog solution

Digital solution

So nice time to solve this challenge!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

set pin 9 of arduino to blink and use one NPN and one PNP as shown 

thats it


Maybe I dont understand the full Idea of the contest, but couldnt you just use a relay........

Actually my version is intended to be used with a bi-color led and controlled by a micro-controller.

I used a simple push button just to test the idea with the transistors.



To see a small video with the device in action follow this link http://www.youtube.com/embed/bbTQ278JIqg?rel=0


I'd Connect the output to both inputs of an AND gate. This would output to both LED's but one would be via an inverter. Simples

That was stupid, forget the AND gate -.- just the inverter, its already been said I apologise!

set the pin as input to turn on both leds. I have a simple circuit somewhere here to do this with a 3 leg duo-led. a red/green one then can also be orange. I search for it if anyone is intressted.

oh and this one is for 3 leds on 1 pin. (not tested myself):

Nothing, just a fun test.

Ok, two were easy enough. How about three?

video: http://youtu.be/yHHlvAd4nDM

And the program:

#define PIN 2
#define dly 500
void setup() {               

void loop() {
  pinMode(PIN, OUTPUT);    
  digitalWrite(PIN, HIGH);
  digitalWrite(PIN, LOW);
  pinMode(PIN, INPUT);    


Congratulations! You will get the diplom later!

you can connect the anode of one led to the pin and the catode of the other to the pin. then you connect one led to gnd and other to vcc.. when the pin is high, the one connected to gnd will light up, and when the pin is low, the one connected to vcc will light up too. simple!

i can post one image tomorrow!