I admit it: I'm a total geek. I love electronics, programming, 3D art, vintage Apple hardware, and whisky. I'm always juggling half a dozen projects. I also enjoy documenting it all: my successes, my failures, my experiences... and everything geeky along the way.

Seeed Studio Fusion - $9.90 for 10pcs 2 layer 10x10cm boards


 
 
 
 
 

RGB Night Light Build | Kevin Rye.net - Main

Kevin Rye

Geek Extraordinaire. Yeh, I said it.

RGB Night Light Build

I finally received the 30 RGB LED breakout boards that I designed. They’re tiny!

rgb_pcb_build_0007

I broke them all apart and cleaned up the sides with my Dremel.

rgb_pcb_build_0010

I soldered 24 LEDs into the breakout boards. I’ll save 6 for a rainy day.

rgb_pcb_build_0033

I then clipped off the excess leads.

rgb_pcb_build_0036

I then cut a ton of 2” wires and began to solder all the LEDs together.

rgb_pcb_build_0043

Once I had three soldered together, I powered them off my breadboard just to make sure that what I was doing was working.

rgb_pcb_build_0049

It works. I then went ahead and soldered the rest onto the chain. It’s a little like making your own Christmas tree lights. 12 done. 12 to go.

rgb_pcb_build_0055

Once I had all 24 soldered together, I soldered some pins to the last one in the line so that I had an easy way to connect it to the header on my ATtiny board.

rgb_pcb_build_0058

Sweet! It works.



Now it’s just a matter of cramming it into the enclosure. I started off with the old box that I made for the SoundBox.

oldSoundBox_0034

I pulled the guts out and taped a drill guide to it.

rgb_pcb_build_0024

Drilled the holes….

rgb_pcb_build_0026

…and popped in the LED bezels.

rgb_pcb_build_0029

Hum. I’m not liking it.

The arcade button is cool, but it’s huge. It doesn’t leave enough room inside for much else. I doubt I’m gong to be able to fit all that wiring, a battery pack, and the ATtiny board. Not to mention, I never made a bottom for it. It’s just open. Making a bottom for it is going to be a pain. I’ll spare you the details, but it’s going to look crappy. The only reason I was dead-set on using the box was so that all the work I put into it wouldn’t be wasted. Seeing it now validates my original suspicion that it would be so much better having all 24 LEDs on one surface as opposed to some on 5 sides of the cube.

I headed back to the craft store and picked up another box. This one was only a dollar. It’s actually a pencil case. The top slides open, which will be perfect for getting to the battery pack.

rgb_pcb_build_0076

If I flip it over, it’s a nice clean looking no-frills enclosure. I’ll be able to drill some holes into it and have 3 rows of 8 LEDs on the top. It’s perfect.

rgb_pcb_build_0077

I threw together a SketchUp model to get an idea of what it would look like. Three rows of 8 should space out nicely.


rgb nightlight sketchup concept

I jumped into Eagle and made a drill guide based on the measurements taken from SketchUp.

Screen Shot 2013-04-20 at 9.12.21 PM

I then taped it to the box…

rgb_pcb_build_0078

…and drilled away.

RGB Night Light Painting_01

A few coats of primer…

RGB Night Light Painting_02

…followed by a few coats of white.

RGB Night Light Painting_03

Finally, a few coat of lacquer to make it shiny. I figured the extra shine will help reflect some of the light.

RGB Night Light Painting_04

I inserted the RGB LEDs and added a little hot glue to hold some of the bezels in. A few of the holes ended up being just a tad too big once I sanded off some of the rough bits.

RGB_nightlight_final_assembly_0006

OK, it’s not perfect. I could have done a better job of drilling those holes, but in my own defense, this is the first time using my new drill. There was no way I could drill a 5/8s hole with my Dremel, so I ran out and picked up a “real” drill.

RGB_nightlight_final_assembly_0007

Instead of using a 2xAA battery pack, I opted to use a 1/2AA because it’s 3.6V at 1200mA and is a fraction of the size. Hopefully it runs in there for a while.

RGB_nightlight_final_assembly_0013

I wired the battery in along with my Bare Bones Arduino and Pololu switch. I added the Pololu switch so I can shut the Night Light down after 20 minutes.

addedbatteryandpololu_1

In order to shut down the Night Light after twenty minutes, I had to add a timer to the code. I imported the Timer library and added the following code to my sketch:

#include <Event.h>
#include <Timer.h>

int sdown = 9;

Timer tmr;

void setup() {                
  pinMode(sdown, OUTPUT); 

  digitalWrite(sdown, LOW);

  tmr.every(10000, activatePololu);
}

void loop() {

  tmr.update();

}

void activatePololu() {

  digitalWrite(sdown, HIGH);
}

As a simple test, I set it to shut down after 10 seconds just to make sure it works:



Cool!

I then drilled a hole on the end and inserted an on button.

RGBNightLight added on button_01

I tweaked the code to fade the LEDs through the colors of the rainbow and set the shutdown interval to 20 minutes.



It’s not perfect, but this kids think it’s awesome.

See this project from start to finish:
Fun with RGB LEDs
RGB Night Light
RGB Night Light Build