Changing LED color with button press

Discussion in 'The Projects Forum' started by caram, Sep 16, 2013.

  1. caram

    Thread Starter New Member

    Sep 16, 2013
    1
    0
    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! :)
     
  2. adam555

    Active Member

    Aug 17, 2013
    858
    39
    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:

    [​IMG]
     
  3. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    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?
     
Loading...