Wednesday, July 17, 2013

LED Color Wand

I've got 6 or so posts drafted on reasonably advanced projects, but I figured it was time to log something that was extremely simple to make. In all, this project took about 3 hours on a Saturday morning.



I do a lot of nighttime photography. I think the reason it appeals to me more than daytime photography is that you can capture an image that the human eye is incapable of seeing. Not only will a long exposure record the movement of light and present it as a still image, but it can reveal color in scenes where the eye would see nothing.



A fun thing to do with long exposures is 'paint' a scene using a light source. In the picture above, I stood below the rock arch waving a flashlight around in my hand to light up the bottom of the arch while the camera shutter was open. You can see the path of the flashlight with the circle of light surrounding my body. I ended up really liking this picture, but I wish I could have changed the color of the flashlight to something a little warmer. My flashlight can light up pure white or pure red, but I wanted something a little more orange-red.



Instead of going out and finding a colored flashlight close enough to the color I wanted, I decided it was time to make my own 'color wand' for night photography.

 This little project ended up being the easiest of any I've shown on this blog so far. I wanted the wand to be extremely versatile in that it could have a wide variety of colors. An important goal was having the ability to change colors quickly so I can combine multiple colors in one complicated exposure.

For the light source I went with 2 diffused RGB LEDs, because I happened to have them sitting around (in fact, they were hooked up to my breadboard with current-limiting resistors already in place). Instead of working with a microcontroller to set the color through PWM, I decided to do things very simply by just using three potentiometers to set the current going through the red, green, and blue channels. This way, a color can be dialed in by setting the RGB levels just as in Photoshop or Paint. At my local electronics store I was lucky enough to find a couple linear 10k pots that would work perfectly.



Battery power is always an issue for me because I hate having to throw away dead batteries and buy new ones. Rechargeable batteries can be expensive and often require special circuitry to change them without lighting things on fire. Luckily, I happened to have a handful of 3S (9.9V) 2100mAh LiFe batteries sitting around from a previous project. I already have a specialized charger for them, so I was good to go.

Ignore the Teensy3, this was just testing the slider and an LED.

The circuit is simple enough that I won't bother posting what I did. When the pushbutton is pressed, current runs through each color channel and is limited by a resistor and a potentiometer. At maximum, each color will have about 20mA running through it, and at minimum about 1mA.




With everything soldered and taped together, I noticed two problems. The first is the non-linearity of the brightness as a function of current. While I designed the potentiometers to vary the current in each channel linearly, the nonlinear response of each LED means that most of the brightness change happens at the low-resistance end of the pots. There's not a whole lot I can do to change that at this point. If I were to redesign the whole thing, I would include a microcontroller that could translate the linear input into a nonlinear output that would create a smoother brightness response.

The second problem with the wand is the LEDs I chose. Because they are diffused, the wand does not produce a beam of light, but instead acts as a beacon that spreads light in all directions. Since the individual colors within the LED package are separated by some small distance, the sides of the LED glow stronger in one color than the others depending on the angle. This means that even when you create an even mix of red, green, and blue to make white, the wand will appear slightly more red, green, or blue depending on which way you look at it. I'm guessing that clear LEDs might not have had this problem, but I'm not entirely sure.



At this point I have yet to use the color wand for any real night photography, but I will try to post an update to this post when I do.


UPDATE: I've tested the wand, and it works wonderfully: