Changing LED color with button press

Thread Starter

caram

Joined Sep 16, 2013
1
Hey everyone,
I'm new to the world of electronics and wanted to ask you how do I go about changing LED color with a push of button or switch..

example: lets say we have 5 LEDs in a line and they all the switch to the same color once I push the button and then to another when I push it again, etc. A fading transition between colors would also be a nice thing to have, but not necessary.


I have RGB LEDs as well as different colored ones.

Is there a simple schematic or tutorial that I can use as reference? I've looked everywhere but I can't seem to find one that explains how to do this.

I can use a breadboard and possibly an Arduino.

Any help would be appreciated! :)
 

adam555

Joined Aug 17, 2013
858
Hi, with arduino is very simple: you connect each color anode of the LEDs to a different pin, the cathode to ground (through a resistor), and an additional pin for the switch. Then program it to change colors as the switch is pulsed.

Without arduino you can do with a monostable flip-flop, for example:

 

Bernard

Joined Aug 7, 2008
5,784
Try using a 4017 0r 4022 counter. connect desired number of outputs with RC coupling to emitter followers to drive the LEDs. Are LEDs common anode 0r common cathode?
 
Top