HeadLamp
Need a new night light? Friend? Lover? Deity? Why not all four?
Introducing HeadLamp.
The focal point of HeadLamp is a styrofoam head stuffed with LEDs for a bright glow, on top of a body made from a flexible air conditioner exhaust tube that softens the bright LEDs, creating a pleasing gradient of rainbow light. Recycled food containers are used as spacers inside the tube to hold the LED strip securely in place to minimize bright spots and shadows. A button on the end of the tail provides a quick way to cycle through a library of color patterns. HeadLamp's brains consist of an ElectroMage Pixelblaze LED controller, which comes with a WiFi controller for easy access to the LED settings and a library of color patterns from any device, an innovative live editor/compiler that allows for easy programming, and a hardworking community of makers contributing to an online repository of patterns. (An optional Pixelblaze Sensor Expansion can make HeadLamp sensitive to sound and acceleration.)
HeadLamp is a fun offshoot of Headbot, a self-balancing robot that I helped design as a student on the South Eugene Robotics Team (FRC Team 2521 – see our Instructables page here).
I hope you enjoy!
Supplies
- 5.5mmx2.1mm DC Power Jack – $6.99 for a pack of 3
- 5.5mmx2.1mm Inline Switch Jack Connector – $6.99 for a pack of 2
- 8mm Push Button Switch – $7.39
- Pair (male & female) 22AWG JST SM 2 Pin Plug – $5.49 for a set of 10
- ElectroMage Pixelblaze V2+ WiFi LED Controller – $25.00
- OPTIONAL: PixelBlaze Sensor Expansion – $29.00
- Air Conditioner Exhaust Hose (13cm dia x 300cm long) – $28.15 (must be 13cm diameter in order to fit the neck of the styrofoam head, but you could choose a shorter tube if 300cm of HeadLamp is just too much HeadLamp for your puny human brain to handle)
- Waterproof WS2812B 16.4ft 300 LEDs Addressable LED Strip Light – $32.88
- 5V 15A AC to DC Power Supply – $28.99
- FloraCraft SmoothFoM Male Head – $7.99 (must be the male headsold by FloraCraft in order for neck to fit into the A/C exhaust hose body)
- FloraCraft CraftFoM 4.7” White Ball – $4.99 (must be 4.7” diameter in order to fit into the A/C exhaust hose body)
- Pack of white 4” Zip Ties – $2.99 for a 100 pack
- 20 Recycled Deli Containers and/or Lids (16-24 oz, with diameter around 4.5") (Recycle these from your takeout dinners, or ask your neighbors and friends if they have any in their recycling; if you must purchase them, you can get a set of 40 for $15.97. But really, don't buy these, reuse ones you already have in your recycling.)
- M2x20 screws and M2 nuts – $8.97 for a 300 pack of various lengths (only 3 screws and 6 nuts are needed, and you should be able to buy them separately from your local hardware store for a bit less)
Required Tools and Miscellaneous Supplies
- Marker
- Razor knife
- Large serrated knife or saw
- Cooking thermometer, chop stick, or other long implement
- Wire stripper and wire cutter
- Soldering iron and soldering supplies (solder with flux core, multistranded or solid core 22AWG wire of various colors)
- Heat gun and heat shrink tubing
- White glue
- Small screw drivers
- Drill and 1” spade bit (at least 8” long)
- Fishing line and thumb tacks
- Black tape (or other opaque tape)
Cut the LED Strip
You'll want a length of LED strip that is 20 LEDs longer than the stretched length of your air conditioning tube. The LED strip is unidirectional, so you will need to ensure that you measure and cut from the appropriate end. Arrows on the LED strip point in the direction of current flow, with the arrows pointing away from the start of the strip.
After finding the starting end, align it to one end of your stretched A/C tube, then add 20 LEDs beyond the other end of the tube – that will be your cutting point. The strip can easily be cut with a pair of scissors, across a set of the copper soldering pads. (The scrap portion of the strip can be used in another project.)
Preparing Spacers
If you simply ran the LED strip through the A/C tube, you would end up with unsightly bright spots and shadows when the strip lies against the interior wall of the tube – we're aiming for a nice even illumination. For this reason, we'll add some spacers made from recycled plastic food containers (or any other transparent or semi-translucent material). These are relatively transparent and will not obstruct the light, but will hold the LED strip away from the interior wall of the tube to minimize these imperfections.
Both the lid and cup from recycled restaurant takeout containers can be used as spacers. You'll need enough to be spaced evenly every 6" or so down the length of the tube (e.g., 20 for a 10' tube). The diameter of the lids and cups might need to trimmed (using scissors or razor knife) so that they fit in the A/C tube without too much resistance – if they are too snug, it will be difficult to slide them into place. (For us, some of the lids needed trimming, but the cups did not.)
After cutting to size, a small slot will need to be cut in the center of the lids and cups so that they can be slid down the length of the LED strip. Use a ruler to determine the cross-sectional size of your LED strip, then use a marker to draw out an appropriate slot on the lids and cup bottoms. Use a razor knife to cut out the slots.
Securing Spacers
Slide all of the container cups and lids onto the LED strip in an alternating fashion. All cups should face in the same direction, to allow them to slide into the tube more easily in the next step.
Secure the first spacer at the very start of the LED strip, placing zip ties around the LED strip, snugly against both sides of the spacer (trying to locate the zip ties and spacer in the space between successive LEDs). Secure the last spacer 25 LEDs in from the end, then secure the remaining spacers evenly spaced between both ends. For securing each cup, first add the zip tie that will be inside of the cup, then slide the cup over that zip tie, then add the outer zip tie to secure it.
Clip off the ends of the zip ties so that they match the outer edge of the spacer -- the extra length will help keep the spacer perpendicular to the LED strip.
Installing the LEDs
To install the LED strip and spacers into the tube, you can reach through the collapsed tube, grasp the LEDs, and then have a partner stretch the tube down the length of the strip. For us, it was more fun lowering the LED strip into the tube from a great height.
Preparing the Tail Ball
The styrofoam ball will serve as the cap to the tail end of the tube. First, use a large serrated knife or saw to cut off an approximately 2" deep dome from the ball. The remainder, a little bit more than half of the sphere, will be used to plug the tail of the tube.
Place the threaded end of the push button into the pole of the ball oppose the cut and press into the styrofoam. Position the power jack around 2" away from the button and press the threads into the styrofoam. Remove both the button and plug for now.
Press a long implement (cooking thermometer, wooden skewer, chop stick, etc) into the hole made by the button and press through the styrofoam toward the flat surface (using care not to skewer your hand). This will serve as a channel for the wires that will connect the button. Do the same for the power jack.
Cut four 10" lengths of 22AWG wire (red and black for the plug, and two other colors for the button). Twist the red and black wires together, then insert them into the channel at the bottom of the plug hole and slide them through the styrofoam. Do the same for the power jack wires.
Wiring the Electronics
Solder the screw terminal onto the Pixelblaze (see the Pixelblaze user guide for more details). Screw the wires from the short 3 pin connector that came with the LED strip into the screw terminals, with the red wire going to the VIN input, white into the GND input, and Green into the DAT input (the CLK input will remain empty for the WS2812 LED strip, but may be used with other types of LED strips). (If you purchased a Pixelblaze Sensor Expansion board in order to make HeadBot sensitive to sound and acceleration, attach it now, following the instructions that came with it.)
Strip 1/8-3/16" from the ends of the red and black wires protruding from the power jack hole on the round side of the tail ball, and add heat shrink tubing. Solder the black wire to the long leg of the power jack, and the red wire to the short leg. Move the heat shrink over the solder joints, and shrink with the heat gun. Pull the wires from the flat side of the ball so that the jack is close to (but not yet in) its hole.
Strip the ends of the wires protruding from the button hole on the round side of the tail ball, and place heat shrink tubing. Solder one wire to either leg of the button, and the other wire to the other leg (polarity does not matter) – take care not to leave the soldering iron on the button legs too long, since this can melt the button and destroy it very easily. Move the heat shrink over the solder joints, and shrink with the heat gun. Pull the wires from the flat side of the ball so that the button is close to (but not yet in) its hole.
Add a dabs of solder onto the BTN and neighboring GND solder pads on the Pixelblaze. Trim the wires from the button so that they extend about 2 inches from the flat end of the ball, and strip about 3/16-1/4" from the ends. Tin the stripped with solder, then attach to the BTN and GND solder pads on the Pixelblaze (polarity again does not matter).
Trim the red and black wires from the power jack so that they extend about 2" beyond the flat part of the ball. Strip 1/4-5/16" from the ends of the wires. Trim the black and red wires from a female JST SM 2-pin plug to about 2", and strip the wires. Place heat shrink over the wires, solder to the wires coming from the power jack, position the heat shrink over the solder joints, and shrink with the heat gun.
Trim the black and red wires from a male JST SM 2-pin plug to about 2", and strip the wires. Place heat shrink over the wires, solder to the red and black wires coming from the LED strip, position the heat shrink over the solder joints, and shrink with the heat gun.
It's now time to test the circuit. Attach the inline switch jack connector to the power jack on the styrofoam ball, and then plug the power supply into the other end. Push the switch to the on position. The Pixelblaze should automatically go into a WiFi setup mode (see the Pixelblaze user guide for more details). Using any device, look for a new wireless network called pixelblaze_XXXXXX. Connecting to that network should automatically take you to a setup page, but if not you can find it at http://192.168.4.1 . For easiest access to your Pixelblaze, use the setup page to join your local WiFi network and enable the Pixelblaze cloud discovery system. Future access will then be available by visiting http://discover.electromage.com. (Another setup mode will create a WiFi network on the PixelBlaze itself, allowing you to directly access it by going to http://192.168.4.1 )
Once you have connected to the Pixelblaze with your device, go to the settings, and set the LED type (WS2812/NeoPixel if you purchased the set recommended in the supplies), the number of pixels (start with a lowish number and increase until all of the pixels are lit), the Data Speed (several intermediate speeds will probably work), and the Color Order (GRB for the LEDs recommended in the supplies).
If setup is successful, you should be able to change the LED patterns by briefly pressing the button on the styrofoam ball (you can also press and hold the button to go into setup mode again at any time). If the button doesn't work, or the setup is unsuccessful, check your circuit for errors and redo as necessary.
Installing the Tail Ball
Once you've verified that the electronics work, you're ready to complete and install the tail ball. Place small screws into the holes on the Pixelblaze and add standoffs (or 2 nuts each) onto the other side to secure. Position the Pixelblaze onto the flat side of the tail ball, making sure that the wires are not too close to the edge of the ball. Press the screws into the flat side of the ball to secure the electronics (you can add a small amount of glue to the holes if necessary).
LEDs on the Pixelblaze itself will cast a inadvertent horrendous glow in the HeadLamp body that will distract from the intended delightful glow. Use small pieces of gaff tape (or duct or electrical tape) to cover these LEDs.
Place a small amount of glue into the power jack and button holes, and press the power jack and button into place. Let dry before powering the HeadLamp up.
Connect the 2-pin JST SM plug from the power jack to its counterpart on the LED strip. Connect the 3-pin JST SM plug from the LED strip to its counterpart on the Pixelblaze. Bundle all of the wires into a small coil, and secure with a zip tie.
Push the tail ball into the tail of the HeadLamp body, giving a small twist if necessary.
Preparing the Head
In order to increase the LED glow from HeadLamp's head, we want to increase the depth of the hole in the base of its neck – this will allow a greater number of LEDs to fit inside. Use a drill and a 1" spade bit at least 8" long. Add tape to mark a depth 7" from the the tip of the spade. While someone holds the head over a trash can, slide the bit into the neck until it stops, then use the drill to deepen the hole to the tape marker. Shake the loose styrofoam into the trash can.
Installing the Head
Bend the final 10 LEDs of the strip back onto itself, making a loop of 20 LEDs. Push this loop partway into the hole at the base of the neck (moving the head closer to the body as you go). Once the loop is as deep as it will go, note where the base of the neck is on the LED strip, then pull it out a short distance and add two zip ties where the LEDs will meet the neck. Clip off a small amount of excess so that the ties do not extend wider than the neck. Then push the LEDs into the neck again, and use a strong tape to secure the zip ties to the neck. Next, insert the neck into the tube of the body, twisting as necessary. Place a long zip tie around the tube and tighten around the neck.
Headlamp is now ready for posing!
Posing HeadLamp
The HeadLamp body has some stiffness, but unfortunately not quite enough to hold every pose. Nothing's perfect, right? But you can assist with its posture using a little fishing line and some thumbtacks. Just cut a length of fishing line, tie loops on both ends, run it around HeadLamp and put one loop through the other, then attach the loose end to the wall above with a thumb tack. Do this wherever a little extra support is needed.
Certain poses might cause small shadows and bright spots, as the LEDs develop slack between the spacers. If so, you can stretch and reorganize things, or just remember the cost of perfection is infinite.
Try different poses. Curl HeadLamp. Stretch HeadLamp. Bend Headlamp. Twist Headlamp. The possibilities are endless!
Enjoy Your New Friend!
If you have any questions, just let leave them in the comments. Have fun!