Friday, October 25, 2013

Daft Punk Helmets: Vacuumed Visors



Previously, I covered the process of shaping the helmets and getting them ready for painting. In doing that I removed the opaque visors, since they would be replaced with clear copies. The goal was to mold clear plexiglass on to each visor so that I could control the shape of each precisely. Once I had the clear replacements, I could shade them black. After estimating how much plexiglass would be needed for each visor, I collected my materials.




The basic procedure is to heat up the plexiglass until it is malleable, then while it is warm, let it 'slump' on to the opaque visors. As the plexiglass cools back down, it hardens into the desired shape. The felt is to keep the plexiglass from sticking to anything. I had seen many people on the internet using vacuum formers to aide in the slumping process, but I had a hunch that it wasn't necessary. I was wrong, but more on that later. First I did the simple visor.


I heated the 0.125" thick plexiglass in my oven at 285F for about 10 minutes. I could see that it was ready for slumping when it started to sag in the oven. I carefully took the first sheet out and placed it on the first visor. Using some extra felt to push the plexiglass down in the corners, I made sure it would solidify with the right shape. Once it cooled, I had an plexiglass replica of the opaque visor (along with some extra material around the edges)



Using felt to avoid scratches

I then carefully cut off the excess plexiglass from the edges, then sanded where I had cut for a smooth edge.


Since this visor was easy enough to make, I went ahead and tried making the more curved visor with the same method. I stuck a sheet of plexiglass in the oven, and prepared to mold it by hand.


It failed. The plexiglass was too thick and would not bend in two directions without folding around the edges. I decided the plexiglass itself was the issue, so I bought a few sheets of 0.06" and 0.02" thick PETG. This plastic becomes malleable at a lower temperature, and I figured the thinness would also help. After heating up the oven, I followed the same procedure as before.


My process still wasn't working, but I could see I was on the right track. Kind of. I decided it was time to use a vacuum former for help. Since I was running out of time on the whole helmet project, I decided to first look at local plastic companies that do vacuum forming. I contacted one about my project, and they said both that it would cost nearly $2000 to do it, and that they simply would not attempt it. This is not specifying a type of plastic or tolerance level, just the job of vacuum forming anything around our model visor. With few options left, I decided to build a vacuum former as fast as possible and for as cheap as possible.

If you search "diy vacuum former" you can find quite a few good examples of cheap vacuum formers that can be made with scrap wood and a shop vac. After glancing through a few instructables on the subject, I went to work. I was lucky enough to be able to borrow a nice 6hp shop vac through some friends, so that would keep the cost down. I was able to get the rest of the materials at Home Depot for around $25.

The basic idea behind a vacuum former is to have a flat surface that creates a uniform vacuum to pull a piece of heated plastic down. The model you want replicated sits on the vacuum surface and holds the plastic up away from the bottom. The plastic is heated so that it will bend and stretch around your model while being sucked down around it. Once the plastic cools, it will retain the shape of the model.

The vacuum former has two parts. The first is the frame which holds the plastic while it is being heated. The second is the vacuum box which supports the model and creates an even vacuum surface. I built the frame out of some 1x2 wood pieces and a couple nuts and bolts to tighten the two sides around the plastic. I built the vacuum box out of MDF, 1x4 pieces, and some rubber weather strips.



The edges of the box were sealed with duct tape. I drilled around 200 1/8" diameter holes in the top of the box on a rough grid I traced out and taped the shop vac hose to a hole I cut in the side of the box. The rubber strips had an adhesive backing, so I just stuck them right where the frame would sit.


With the vacuum former ready to go, I loaded a new sheet of plexiglass into the frame and put the frame in the oven. This time I got a little fancier with my baking and did 8 minutes at 300F and finished with about 3 minutes of broiling. The plastic was sagging by about 3" when I took it out and had just started to create tiny bubbles in a few places. With the shop vac running, I quickly placed the frame over the vacuum box and pressed down to ensure a nice seal between box and frame.



Yet another failure. At this point I was seriously worried for the helmets. Without a visor, the gold helmet was pretty useless. I took some time to think through how this attempt had failed, and luckily saw a reason to try again. A big issue for this attempt was that the plexiglass had fallen free of the frame in one corner during the heating process. I found this was because the plexiglass has slipped to one side while tightening the frame, so it was not being clamped down on that corner at all. This could be fixed by being more careful during the set-up. I also added some cardboard in-between the frame and the plexiglass in order to get a better seal. I wondered if I had drilled enough holes, so I computed the collective cross-section of every hole together and compared it to the cross-section of the shop vac hose. The shop vac hose was about 5 square inches, while my holes were only adding up to around 2. I went through and widened most of the holes in the top of the vacuum box to bring that figure much closer to the hose area.

With these modifications done, I set up for another attempt. Luckily the plexiglass sheets were only costing me about $7 a piece and I could get them cut to the right size at my local hardware store.



It finally worked. Well, mostly. Under the pressure of the vacuum, the model visor actually bent out of shape, causing the bottom of the visor to become wider than I wanted. This was surprising because the model was cured Bondo reinforced with thick fiberglass. I decided this visor would work well enough with some bending, and I was too sick of molding plastic to try again. I cut out the visor and prepared it for tinting.



Both if the visors were tinted black using Nite-Shades. This is a spray intended for vehicle lights to make them look black when there is no light inside shining out. I tested the spray on the many failed visor attempts to make sure I wouldn't accidentally ruin the visors I had finally made.



Once both visors had been tinted, I began attaching them to the helmets.




The second visor did not fair so well. After a day or two the plexiglass became brittle and cracked down the side. I carefully glued it back together with special plexiglass adhesive, but once I tried bending it again, another crack formed. The visor was doomed. After 6 failed attempts at making a visor for this helmet, I was pretty let down. Luckily, after 6 failed attempts I was getting better at making them. I ordered a sheet of PETG to make a new one, with the intention of vacuum forming it just like the plexiglass.


I'll stop here now that I've covered my process for making and tinting both visors, even though the second one is not 100% done. I'll try to update with a picture or two when it has been fixed.

UPDATE: It seems like 0.03" PETG is the way to go. I've formed a new visor that is reasonably strong and fairly flexible. The material was much easier to heat up (~300F for ~3 mins) and actually allowed me to redo the vacuum forming process twice. On the first attempt the PETG didn't get pulled down as well as the plexiglass did, probably due to human error in placing the frame on to the vacuum box. The sheet cooled into an almost-visor shape, but I put it back in the oven and watched the plastic return almost to it's original shape. This was a life-saver.


I reinforced the fiberglass/Bondo visor mold this time to prevent the bottom from bending out, but the visor was still slightly misshapen. Luckily the formed PETG is flexible and allows me to bend it back into place. Next step is to attach lights to the visor, then glue the visor on to the helmet.

Thursday, October 17, 2013

Daft Punk Helmets: Icing a Toxic Cake



At the end of my last post, both Daft Punk helmets had been formed with papercraft and fully reinforced with fiberglass. Once the fiberglass had cured, the helmets were rock hard, but fairly lumpy on the outside. The fiberglass cloth was applied to the inside, leaving the hard edges and seams of the original papercraft on the outside. To smooth out these bumps and produce a nice surface for painting, I used Bondo. Bondo is a putty-like substance that starts as a two-part mixture, goes through exothermic curing once mixed, and ends up as a hard clay-like substance. The final state is relatively easy to sand, allowing for fine tuning of the surface shape. The idea here is to iteratively shape each helmet by applying Bondo, letting it cure, then sanding it down. With each iteration of this, the helmets get closer to their final shape.

It's a lot like icing a toxic cake.

With some 60 grit sandpaper, I was able to shave off a lot of the goopy unevenness of the first layer of Bondo. My goal was to sand it down to the correct shape, and if I hit fiberglass, add some more Bondo everywhere to allow for more even sanding. I enlisted some help for sanding, since doing two helmets lends itself easily to two people working.

Helper with tiny power sander was a life saver.

Not quite what I had in mind..

The biggest issue we ran into was air pockets. I was not at all careful with my first layer of Bondo, so as we sanded it down we found many dents and pockets caused by uneven application of Bondo. At first we tried filling these holes with more Bondo, applied with a small stick for precision. This took a long time and was not nearly as precise as I wanted. In some areas we also needed to add an even layer to get away from the fiberglass beneath, but would end up with even more pockets and dents using Bondo.

Fixing past mistakes and adding future ones.

You'll notice in the pictures that the visors have been cut out already. In order to create the clear plastic visors later on, all we need is a solid block that mimics the desired shape. Since the mold doesn't need to be perfectly smooth, I went ahead and cut them out using a Dremel rotary tool. The key was using the right cutting bit and being very careful. I ended up breaking two different cutting bits in during the process, so I won't claim I know which one is best to use.

To get the rest of the helmets smooth faster, I tried a two-part solution. I bought some liquid nails that claimed it was easy to sand once cured and used a small nozzle applicator to fill in dents and holes. Unfortunately, each application was taking days to fully cure, and I didn't have that much time to waste. The next part of the solution was to use filler primer spray paint. This is a type of primer that has a decent amount of volume to it when applied, so it helps fill in small dents and holes. Once the helmets had all of the major bumps smoothed out, I switched to primer.


The difference in surface area was surprising.

Dat back.

To eliminate dents, we followed a simple pattern: apply two coats of primer, let dry, sand with 220 grit until Bondo shows, wash, let dry, repeat. After three or four iterations of this, most of the dents had disappeared. During this process I also cut out the mouth slit on the helmet that needed it, since the hole left by papercraft had been accidentally filled in during the Bondo process. Again I used my Dremel and switched between a few bits while cutting.

This whole shaping ordeal took a long time and a lot of effort. Most of the helmets are large smooth surfaces, so hand sanding wasn't too hard. For the smaller details around the ears, I used a Dremel to carefully sand them down while maintaining the angles I wanted. While the final shape was not 100% perfect, it was good enough for a costume.




At this point, both helmets were ready for real paint. In one of my next posts I'll cover what steps we go through to get the nice reflective silver and gold surfaces needed. Spoiler: there is lot's of sanding involved.

Tuesday, October 1, 2013

Daft Punk Helmets: Papercraft to Fiberglass



Progress has been made on the helmets. As mentioned in the introductory post, the first steps were to create full-size paper versions of each helmet and then reinforce them with fiberglass. I've been following some guidelines put out by a few sites like this one.

The idea behind papercraft is that you can create a folded-paper version of a 3D model that has been designed on a computer. There is software that takes imported 3D models and splits up the geometric faces into pieces that can be cut out from paper and glued back together to re-form the 3D shape. This software outputs a series of 8.5"x11" images that are printed to cardstock. In order to connect the various 2D pieces together to form the 3D shape, the software adds on flaps and fold lines to instruct what pieces need to be glued where.

After finding nice-looking 3D models of the helmets on the internet, I set out to print, cut, and glue. I didn't have access to a printer that could handle cardstock, so instead I just printed to normal copy paper and glued each sheet to a piece of cardstock.

Hints of a 3D structure.

Rising from the fold.

The whole papercraft ordeal seemed daunting at first, but then I realized it was 1am, had just spend 6 hours gluing my fingers together, and had no intention of stopping. When I got busy cutting and assembling (with the help of a friend) I noticed it wasn't as bad as I had anticipated; the mindless work was actually a little addicting.

Went through a few X-acto blades.

Hoping I can fix slight lumps later..

Each helmet ended up needing about 6 hours of work. I was very happy with the final product, even if my occasional sloppiness in cutting caused some unwanted lumps on the helmets. Both helmets were lightweight, but still able to support their own shape.

The next step was to reinforce the helmets with fiberglass. Fiberglass is a strong, lightweight material that is made of two components: resin (glue-like stuff) and fiberglass cloth (a cloth that is made of bits of glass). If handling a cloth made of glass shards sounds like a bad idea to you, then you are a reasonable person. Don't let the stuff touch your skin. I've made this mistake when installing insulating wrap on motorcycle exhaust pipes and had to cover my hands with duct tape in an attempt to pull the tiny glass fibers out of my skin. Also, the resin comes in two parts that are mixed together to initiate curing (hardening/drying). This is an exothermic reaction (gives off heat) and it can really heat things up. A thin coating of the stuff probably won't heat up noticeably, but a cup of the stuff can start to smoke and will burn your hand if you hold it. In all, don't try to make fiberglass things unless you are familiar with the hazards. Do it outside, wear protective gear, etc.

The first step in reinforcing the helmets is to coat the inside of them with a thin layer of resin. I mixed the two parts together in a mixing cup and used a cheap paintbrush to coat each helmet.

Outside looks wet due to the epoxy from the inside seeping through.

Once the helmets were thoroughly coated I let them dry in an outdoor closet. After a day they were much stiffer than before, but still not robust. This first coat of resin was primarily to ensure the paper helmet doesn't fall apart or warp during the application of fiberglass cloth. To efficiently apply the fiberglass cloth to the inside of the helmets, I cut a large sheet into smaller strips (about 3"x1") and coated the inside of the helmets again with a thin layer of resin for stickiness. I would place 4 or 5 overlapping strips inside the helmet, then dab more resin on top until they looked soaked. I found that my resin would start to harden in the mixing cup after 10 or so minutes, so I made small batches in order to not waste materials.

After being left alone for another day or two to cure, the fiberglass was hard as rock. My rough estimate is that each could withstand having about 40 pounds placed on top before buckling. Don't blame me if you try this and they collapse with less than that. I'm certainly not going to put my beloved helmets to the test.

Ready for the next step!

The next step we be to coat the outside in Bondo (or similar) and sand it down to fine-tune the shape.

Sunday, September 29, 2013

Daft Punk Helmets: Intro

Halloween approaches, which means it's time to spend far too much of my free time working on a costume. Last year, I used my costume as an opportunity to refresh myself on basic electronics and get up to speed on Arduinos. I was pleased with the results, but was very much limited at the time by what I knew. Now I've had a whole year to experiment with embedded electronics, so I figure it's time to apply myself a bit more and see what happens.

During this last year, Daft Punk released their new album Random Access Memories. In case you don't know, Daft Punk is a French electronic music duo consisting of two robots that are sometimes erroneously referred to as men. They look like this:


Their heads contain all kinds of electronic goodies, most of which control LEDs that light up beneath the visors. The one on the left (which I will refer to as Thomas) has a 2D matrix of red LEDs that can display patterns or words that scroll across the visor. The one on the right (Guy) has a few horizontal strips of colored LEDs going up each side of the visor. Over the years, there have been a few iterations of the robot-heads that have shown different amounts of LED activity, but what I have described seems to be the most recognized set of lights.

My goal this Halloween is to make helmet versions of both of these robot heads. Each will contain embedded electronics to recreate the LED patterns that make them identifiable.

The first big challenge I see in this project is the creation of the non-electronically-enhanced helmets. Luckily, there is a fairly evolved online community of folks who are similarly interested in mimicking the looks of these fashionable robots. A common practice for creating props like these that I will use is to start with a papercraft model, reinforce it with fiberglass, cover with Bondo, then fine-tune the shape through sanding. This creates a hard helmet that can later be painted. To create the semi-transparent visors, I plan on replacing the fiberglass/Bondo visors with clear acrylic molded into the right shape.

Once the helmets are forged, the electronics must be added. Both need LEDs, control electronics, and power. Since I anticipate the helmets impeding vocal communication (I assume the robots communicate via wifi instead), I'm interested in implementing some kind of 2-way communication between the helmets.

In all, this is the intended order of operations:
1 - Create full-size paper helmets (post)
2 - Reinforce helmets with fiberglass
3 - Shape helmet exterior with Bondo
4 - Paint helmets
5 - Replace solid visors with acrylic visors (post)
6 - Install lights and control electronics
7 - (Optional) Install 2-way communication
8 - (Optional) Tack on any other neat electronic components I have sitting around.

Taken one step at a time, I think this is a completely doable project, given a few weeks to complete. I will post updates to this project as I complete the steps listed above (assuming plans don't change, which they always do).

Wednesday, September 18, 2013

Music Box (Software)

In my previous post, I covered the build details of a 'music box' that could listen to music being played, compute a response, and display the output on a 12 RGB LED display. This purpose of this post is to talk some more about the software and algorithms behind the device. There are a couple parts to this, so I'll try to introduce them in an order that makes sense.

The code for the Music Box is available on github.

1 - LED control
There are 12 RGB LEDs that can each be set individually using 3 16-channel PWM drivers. This means that 36 of the 48 channels are wired directly to the LEDs, and each controls the brightness of a single color of a single LED. I've used TLC5940 drivers for this project, which basically act as shift registers. The output value of each channel is set by an internal 12-bit register that is filled by shifting values through each channel register sequentially. The drivers are daisy-chained together so that only one long string of bits needs to be shifted out to set the value for every LED.

The brightness of an LED is logarithmically related to the current running through it. This means that the increase in brightness per increase in PWM value actually decreases as you move up in value. While you may think this only matters if you plan on linearly dimming LEDs back and forth, it actually has a profound effect on color mixing. With only a narrow range of PWM values that cause an LED to appear dimmed, linearly sliding through PWM values will cause each color of an RGB LED to mostly appear on or off. Without correcting for this logarithmic response, sliding through hue on an RGB LED will look more like cycling through the primary and secondary colors (red-yellow-green-cyan-blue-magenta-) with little mixing in between.

To correct for this, I used a pre-computed 12-bit look-up table for each value in [0-255] that would approximately linearize the brightness. While I could only set the color values with 8 bits per channel, the output to the PWM drivers was 12 bit to maintain precision at the low end of the look-up table.

There are a few inputs on the drivers that need to be toggled while shifting data in, but this is well documented elsewhere.The only tricky part is getting the overall PWM frequency right. The grayscale clock (GSCLK) pin needs to be toggled 4096 times to complete one pulse cycle in our PWM setup. In order to have LEDs appear continuously on, the pulse frequency needs to be at least 60Hz or so. This means the GSCLK line needs to be toggled at 4096*60Hz = 246kHz or higher.

When the music box is powered up, it begins by testing the LEDs and drivers by displaying a simple pattern. Then it jumps into Ambient Mode, where the value of each LED is set based on some simple math.


The pattern cycles itself randomly forever, creating an endless sequence of new color patterns. After letting the music box sit around in ambient mode for a few hours, I've decided I should really make more of these. Someday..

2 - Sound Reactive

To react to music, first the software must be able to react to what the microphone picks up. The microphone is hooked up to one of the analog input pins of the Teensy3, so I just need an analogRead() to grab the current state. In order to sample at a constant rate, I used an interrupt that would force the code to take a microphone measurement every few microseconds. After a measurement is made in the software interrupt, the sound reactive algorithms perform some incremental calculations to update the frequency-dependent output.

Since the microphone-sampling interrupt occurs every few microseconds (~350us), any computing that is done using a new microphone reading needs to complete in a very small amount of time.

The following video shows the Party Mode. Six different frequency bins are updated as the microphone samples come in and the amplitude of these bins are displayed on the LED circle. This mode acts as a simple graphic equalizer.


I'm not 100% happy with how it acts, but I think it's a great start.

The final mode is Tuner Mode, which keeps track of 36 different frequency bins that are spaced much closer in frequency. This is the mode I originally designed the music box to run, and much of the math and theory for it was covered in my last post. Unfortunately this mode is also the least impressive right now, so I don't have a video at this point. I think it needs some careful adjustments in the code and possibly some circuit modifications to deal with electromagnetic interference (EMI) produced by the LED drivers. If I can get it working satisfactorily, I will update with a third video!

Thursday, August 8, 2013

Music Box (Hardware)



In this post, I'll be covering the build details of a project I've recently finished that has ended up as one of the more advanced things I've attempted. In another post, I'll cover some of the programming details, as those were equally as challenging to sort out. The original purpose of this project was to make a small gift for a musician, but it ended up being much more rewarding for myself as the builder/programmer than for the recipient (in my mind).

The original concept was to have a small device that would react to music. Since the device would be given to a violin player, I wanted it to be specifically designed to react to someone practicing an instrument, rather than to regular music being played through speakers. The distinction I make here is that a single instrument (like a violin) being played on its own will create a fairly simple sound wave, consisting of one or two base frequencies as well as a limited set of harmonics, while 'regular' music is a complex mixture of many instruments (possibly including vocals) that create a much more difficult waveform to analyze. There are endless examples on the internet of DIY graphic equalizers that are designed to handle this wide variety of sounds, but I wanted something a little more precise.

At this point I would like to make a note on musical scales, but after a few minutes of research to make sure my language is precise, I realized that I am very much unqualified to give a small lecture on music theory. So I'll keep this short. In modern western music, there are 12 pitches in the chromatic scale that separate each octave (a factor of 2 in frequency). Each of these pitches has a letter name with a possible modifier (ex: D# / Eb). You can also add a number after the name to specify which octave you mean (ex: A4 is 440Hz, A5 is 880Hz). While more traditional tuning is done using various ratios of frequencies to construct the 12 pitches of an octave, a modern approach is to space them out evenly on a logarithmic scale:

f = f_0 * 2^(n/12)

Here, f is the frequency of a note you wish to calculate, f_0 is an initial frequency, and n is the number of pitches away you want to calculate for. So by knowing one frequency (A4 is 440Hz), we can find any other one (A#4 is 440 * 2^(1/12) = 466.13Hz, B4 is 493.88Hz, etc).

In a later post on the software I've written for this project I'll go into more details about how I've used this math to do some clever things, but for now the point I'd like to emphasize is the cyclic nature of the chromatic scale. Every 12 pitches, you return to the same note but an octave higher or lower. It was this idea that led me to think of a circle of 12 lights that would represent each pitch of the scale.

To differentiate different octaves of the same note, I would use RGB LEDs for each light and have each octave glow a different color. To drive these 12 LEDs, I sprang for a couple 16-channel PWM drivers to make my life easier. In order to react to any sounds at all, the device would need a microphone, as well as a fast enough processor to handle the real-time calculations. For the mic I went with a MEMS microphone, and for the processor I sprang for a Teensy 3.0. I've been using one of these Teensy boards for another project and have really loved them. They are fully Arduino compatable, much smaller than most standard Arduinos, and also much faster (overclocking to 96MHz). In contrast to most Arduinos (not the Due), the Teensy is built around a 32-bit ARM Cortex-M4 processor which has a built-in digital signal processor (DSP). I've never used any DSP capabilities before, but I figured this project would be a good one to learn with. As for the aesthetic, I decided to grab a few 6"x6" diffused acrylic panels like the ones used in my water level box project. This way the box will have a nice soft color glow when running and reacting to music.

After testing the PWM drivers and microphone on a breadboard, I went ahead and soldered everything together on a few small protoboards I got for cheap on ebay. While the circuit looks fairly complicated, most of the wires are for daisy-chaining the PWM drivers and linking the outputs to the LEDs. Amazingly, everything seemed to work right off the bat.

At this point I start to wonder if I should plan these circuits before I solder them.

Obviously not done, mostly because the mic isn't connected to anything.

All good things are held together with hot glue and prayers.

While writing the waveform analysis algorithm for this, I realized that I was limiting the usefulness of this device to times when a single instrument is being played nearby. This seemed like a waste of so much soldering, so I decided that the whole device could operate in a few different modes. Some could react to instruments, some to general sound, and some could be oblivious to the environment and just display some pretty colors. In order to switch between these modes, I needed a method of user input. I wanted something sleek, so I went with two small pads of aluminum tape wrapping around the back panel. One is grounded, the other connected to an analog input of the Teensy with an internal pull-up resistor. When the pads are shorted together with a reasonably high resistance object (say, a finger), the Teensy registers a change in the analog read value and the mode is switched.

Gluing everything together.

Once completed, I had a plain white box with 12 individually addressable RGB LEDs in a circle with a microphone and processor to handle the music processing. Power is supplied by a 5V AC adapter dropped to 3.3V with a voltage regulator, and reprogramming can be done right on the Teensy with a micro-USB cable. It actually took longer to write the firmware for the music box than it did to build the whole thing, so I'll cover those details in another post. The goal was to give this box as a birthday gift, and I was pretty rushed to get it done. While I did have it completed in time (neglecting a few coding errors that were fixed post-birthday), I didn't get a chance to take nice pictures of it with my non-phone camera. Hopefully I will have nicer pictures and maybe a video in the next post as well.

Party hard.

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: