Introduction: Easy Pixel Nightstand Lamp
After finishing my last big project (Chained-mood-light) I started playing with digital LEDs. What I wanted was a easy to do pixel matrix, without having to use custom driver chips and spending hours of wiring. Doing some online research in various electronic shops I found some LED strip lights that were perfect for my use.
I am talking about the WS2811 type LEDs. The neat trick with these is, that each LED chip includes three LEDs and a driver chip that can be digitally programmed with a 24bit color code. It will then hold that color until a new one is set. This makes everything very easy compared to the classic way where you constantly have to pulse each LED either with a driver chip or directly with a microcontroller. Sounds expensive? Nope, they are dirt cheap. When bought on ebay, they are not a lot more expensive than the standard led strips and still way cheaper then the ones you can get at IKEA.
With these LEDs it is possible to build big LED matrix style panels, maybe I will add some links at the end to a video showing my bigger versions. But now, let's get going with the nightstand sized piece of art. It is really easy to make, it took me less than 2 hours to finish the one documented here.
List of things you need:
-RIBBA frame from IKEA (yet another IKEA hack)
-Cardboard, 1.5-3mm thick
-6 pieces WS2811 LEDs on a strip, spaced 33mm (30 LEDs per meter)
-Arduino pro mini (I used a Freaduino Pro 328 from ElecFreaks)
-Programmer for the Arduino (any USB to UART converter will do, get them online for less than 5$ or use another arduino board)
-A tactile button with a long actuator (at least 3mm long)
-Thin white paper for the diffusing screen
-USB cable for power supply
-Soldering equipment (iron, solder, wires)
-Some household stuff (scissors, glue, tape, drill, ...)
Step 1: Making the Grid
First, we need a grid for the pixels. This is made from cardboard. I used 1.5mm cardboard because it is easy to cut using scissors, thicker gives more distinct lines between the pixels but it is harder to cut.
Use the attached layout, print it (unscaled to A4 paper) and glue it to the cardboard. Cut along the lines making the cutouts as wide as the thickness of your cardboard. As drawn, they are 3mm wide. If the gaps are too big, light can pass through the grid. Put the pieces together and use glue to fix it. A rubber band and/or some tape can keep it from falling apart while the glue dries. Important: one side of the grid needs to be flat. That is the side that will go against the glass. The backside can have some uneven heights, it will not make any difference at the end.
Step 2: The Frame
Take the RIBBA frame and remove all parts including the glass. Put some glue in to the inside corners of the frame and put the glass back in. This is optional, but it makes handling easier later on if the glass is glued in. Make sure the glue is not visible from the front (clean if necessary).
Using the frame insert as as a stencil, cut a piece from the paper. This acts as a diffuser for the light. Use thin paper, not thick drawing paper. I used cheap white paper that is like 60-70g/m2.
To add an artistic effect you can also rumple the paper and flatten it using an electric iron.
Put the sheet of paper into the frame on top of the glass.
Step 3: Electronics
Take the LEDs and the wooden back of the frame. We will put two rows of three LEDs each, stick it to the frame and solder the tactile switch, the Arduino and the USB cable directly on.
First, mark the backplate with the positions for two of the LEDs as shown in the picture: 34mm from the long side, 40mm from the short side. The placement is not very critical. The LEDs just need to be within 5mm of the marked spots.
Cut the LED strip into two parts of three LEDs each. I used transparent double sided to stick them on, normal tape or glue also works, they do not get very warm, so don't worry about melting tape. My strips have arrows on them, marking the way the signal runs through the strip. I made the input on the bottom left so the arrows are from left to right on the lower strip and from right to left on the top one.
Using the soldering iron, connect the two strips on the right side. Make sure data out of the bottom strip connects to data in on the top strip. Also connect the +5V to +5V lines and the GND to GND of the two strips.
On the left side, connect the Arduino like this:
VCC (or +5V or VIN) of the Arduino goes to the +5V of the strip. Arduino GND goes to strip GND. Connect the strip data input (DIN) to pin 7.
Solder two wires to the button so the button connects these two when pressed (I used a normally open button, be aware of normally closed versions). Then connect one of the wires to Arduino pin 4 an the other one to Arduino GND. The button is used to change programs.
On the left of the top strip, solder the USB cable as a power supply. I cut off the plug of the cable and stripped it so the wires come out about 2cm. In my cable, GND is black and +5V is red. The two data lines are not needed (the Arduino pro does not have a USB converter) so I cut them. After stripping the wires you may want to use a multimeter to make sure you have the right wires. If you get the wrong ones it will not work. You can also just try blindly, it will not destroy your USB port of your computer but it might kill the LEDs or the Arduino or both so be careful to get this right.
Before we can actually test the LEDs, we need some code. A simple demo with three programs can be found on GitHub. To upload it to the Arduino pro, you need to solder the four-pin header as shown (that is VCC, GND, Rx, Tx). Using a dupont cable, connect it to the USB to UART converter, hook it up to your computer and upload the code like on a standard Arduino.
The circuit is being fully powered through the Arduino and the LEDs should start to light up in bright colors.
Step 4: Assembling It All
All running smoothly? Time to add the grid to the backplate. Center it nicely on the plate and use some glue (not obligatory to be swiss made ;) ) to fix it in place. Make sure it is nicely centered and not distorted. Remember the part about the grid needing to be flat on one side? Make that side face upwards!
After the glue has set, drill a 4mm hole (or whatever the size of the tactile button) in the backplate where you want the button to be. Fit the button through the hole and fix it using more glue. Make sure the glue does not flow into the hole so it will actually still work afterwards.
Using some tape (or more glue still), fix the Arduino and the wiring to the back plate at the side of the grid (lots of space there). If your Arduino has a power indicator LED on it, you might want to cover it with something black like black tape or black glue (marker pen is not enough) or completely remove the LED to avoid a red or green dim light on the outside of the grid.
To get the USB cable out of the frame I cut one of the corners of the backplate. You can also drill another hole for the cable (too late now if you already soldered and glued everything like I did). I also put a cable tie on the USB cable so it does not pull out that easily.
Now it is time to put it all into the frame. For testing I just fix it with scotch tape along the sides. Later I use hot glue to fix it permanently. Well, semi-permanently, hot glue is not too hard to remove. In case you want to be able to take it apart easily you can also glue two small strips of wood inside the frame and use screws (the nicer way to do it) rather than glue.
Step 5: Enjoy
Now turn off the light and enjoy the colorful dim light.
The paper gives it some nice texture. Also check out the photo with the rumpled paper.
A short description of the modes:
I wrote three modes:
1. Rainbow: colors move by in rainbow color order
2. Random colors: completely random colors are faded in and out
3. Similiarity: a random hue is chosen and all pixels show a color close to that hue, slowly fading
I hope you like my idea. If I get some good feedback, I could even take a video.
In case you want to see what the bigger versions look like, just leave a comment.
If this is too complicated for you but you still want one, message me and when I find the time, will make a few to sell.
If you cannot find the LEDs, send me a message, I still have a few (actually, lots).
Participated in the