Arduino Bed BackLights! [ Led Fade Control With a Push Button ]

by Ayush Sharma in Circuits > Arduino

4528 Views, 31 Favorites, 0 Comments

Arduino Bed BackLights! [ Led Fade Control With a Push Button ]

14 8:02 pm.jpg
14 8:02 pm.jpg
Hi EveryBody,
Today we will make Arduino Bed BackLights! In Which led Fade is controlled by a Push Button!.
When we Press the Push Button the Lights Starts Fading in and out and when we release the Push button then Lights Stop at that brightness. When we again press the button then lights will again fade in and out from that position.
I think a video will explain it more Smoothly so Please see it .

Video of LEDs in Action

Arduino Bed BackLights Demonstration (Full Tutorial in Instructables[See Description])

Please See the Video To See what the code does.

Get the Parts .....

14 8:02 pm.jpg
14 8:02 pm.jpg
14 8:02 pm.jpg
14 8:02 pm.jpg
Get the Following :-
1x Push Button
————————
4x UV Lights ( Or any color of your choice but remember to add a resistor if using red or yellow LEDs)
————————
1x 10k Resistor
————————
Ribbon Wires
And
Arduino Uno (Obviously)
[Mine is a Clone which I Bought from eBay]

Solder the LEDs in Parallel

14 8:05 pm.jpg
14 8:06 pm.jpg
Solder the Leds in Parallel and leave a gap between each led [Leave a Gap according to your bed's back ]

Now the Push Button

14 8:06 pm.jpg
14 8:02 pm.jpg
14 8:02 pm.jpg
14 8:03 pm.jpg
Solder the Wires to Push Button and Bend Legs to Fit on back of bed.

Solder Solid Core Jumper to Wires

14 8:02 pm.jpg
14 8:02 pm.jpg
Cut Small and solder them at ends of Wires.
We will be using this to connect to Arduino directly.

Add 10K Resistor

14 8:05 pm.jpg
Add a 10K Resistor from Ground Wire to Pin 2.
Without this it Will not Work!

The Code!

I made this Code with the Intermixing of Button and Fade Example!

As the Result i could see the fade effect only when i pushed my Button!

Code - Push Button to Fade.ino

(Right Click and Click "Save Link" ^^ to get the File)

Connections to Arduino

14 8:05 pm.jpg
Connect The Power Line of LEDs to Pin 11 and Ground to Ground.

The wire of button which was Soldered with a resistor will be Attached to Pin 2 and other Wire to +5v Pin.

Now Bed ( We Will Stick Behind It )

14 8:08 pm.jpg
14 8:02 pm.jpg

You can see that there is a plenty full space behing my bed.

Stick the LEDs on Wall to Give a Effect.

14 8:02 pm.jpg
14 8:06 pm.jpg
Paste their Heads with the wall with no gaps.
This will give effect when leds are lit.

Now Stick the Arduino With Double Tape

14 8:06 pm.jpg
14 8:06 pm.jpg

Apply the Double Tape to Arduino and Stick it to Wall or Bed.

Connect the Arduino With a 5v Power Source

14 8:18 pm.jpg
14 8:02 pm.jpg
The usb Wire I Got was Very Short So I Had to Buy a New Which is very much long to reach the 5v charger in outlet.

Run It!

14 8:02 pm.jpg
14 8:02 pm.jpg

Hurray!! We Have Made it!

Impress your Friends with this cool Effects in your room!