Arduino-based Blinking Santa Hat

by bneedhamia in Circuits > Wearables

2226 Views, 8 Favorites, 0 Comments

Arduino-based Blinking Santa Hat

20161201_210000B.jpg

This is a Santa hat with programmed lights on the pom pom. The lights are controlled by a battery-powered Arduino. My wife and I put this hat together in one day to add a little nerd-ism to Portland's Holiday Ale Fest. The Arduino program fades the lights in various patterns. To see the blinking hat in all its glory, see my YouTube video. Happy Holidays!

Materials Needed

20161129_192236B.jpg
  1. Santa Hat
  2. Arduino Mini Pro (3V)
  3. SparkFun FTDI Basic Breakout - 3.3V, for programming the Arduino
  4. 2 AA Batteries
  5. Holder for 2 AA batteries
  6. Hook and Loop fastener (e.g, Velcro brand) the length of the battery holder
  7. wire connectors (e.g., Molex crimp and press connectors)
  8. 4 red LEDs
  9. 4 100ohm resistors
  10. about 40 inches (about 400 mm) heat shrink tubing
  11. White stranded hookup wire
  12. Black stranded hookup wire
  13. Red stranded hookup wire
  14. Hot glue stick and hot glue gun
  15. Heat gun or wooden matches (to shrink the heat shrink tubing)
  16. Needle and white thread
  17. Soldering kit (soldering iron, solder, wire cutter, wire stripper)
  18. Scissors

Open the Santa Hat Pom Pom

Cut the pom pom (the white fuzzy ball) off the end of the hat.

Cut enough of the glue or thread off of the pom pom to open it – but don't cut too much because you'll need to rebuild the pom pom when finished. The pom pom is likely is a piece of fuzzy fabric stretched over a foam ball.

Solder the 4 LEDs Into the Pom Pom

20161129_205322B.jpg
20161129_204433B.jpg
20161129_204726B.jpg
20161129_214548B.jpg

Push the leads of one LED through the fuzzy side of the pom pom into the inside.

Inside the pom pom, solder one end of a 100 ohm resistor onto the Positive (plus, anode) end of the LED (usually the longer lead, usually the one opposite the flat side of the LED lens.

Solder one end of a white wire to the other end of the resistor.

Cut the white wire to a length that will reach about 2/3rd of the way into the hat. This wire will eventually attach to an I/O pin on the Arduino, which will be inside the hat.

Slide a length of heat shrink tubing over the LED lead + resistor combination. Use a heat gun or (be careful) a match to heat the tubing so that it shrinks. Be careful to keep the heat away from the fuzz of the pom pom. If you don't the heat may melt the fuzz, ruining the look of the pom pom.

Solder a black wire to the Negative lead (minus, Cathode) of the LED. Cut the wire length to about the length of the white wire. This first black wire will eventually connect to a ground (GND) pin on the Arduino.

Repeat the process for the other 3 LEDs, except that instead of soldering a long black wire to the Negative lead of the LED, you will solder a short black wire between the Negative lead of this LED and the Negative lead of the previous one. That is, all the black (minus, cathode) leads of the LEDs are electrically connected to the one long black wire.

Reassemble the Pom Pom

20161129_221024B.jpg

Insert the pom pom foam back into the pom pom and gather the fuzzy fabric around it, with the long wires (4 long white and 1 long black coming out of the part of the pom pom that will fasten to the top of the hat. Using the needle and thread and the hot glue gun, fasten the reassembled pom pom together.

Thread the 1 long black and 4 long white wires through the hole at the top of the hat. You may need to expand the hole to do this.

Use the needle and thread and the hot glue gun to securely fasten the pom pom to the top of the hat. The hat should now look a lot like it did when you bought it, except that it has 4 LEDs embedded in the pom pom.

Assemble the Power Supply

20161129_220309B.jpg
20161129_221013B.jpg

Solder a long red wire to the positive side of the battery holder. Solder a long black wire to the negative side of the battery holder. Crimp a two-position Molex connector onto the ends of the black and red wires. Alternatively, you can solder a switch into the red wire, then solder (or press the connectors of) the red and black wires to the RAW and GND pins of the Arduino.

Use hot glue to fasten the hooks part of the fastener to the inside of the hat, high enough so that when you're wearing the hat the fastener is above your head. Glue the corresponding loops part of the fastener to the back of the battery holder.

Connect the LEDs to the Arduino

20161201_110118B.jpg

Connect the four white wires to four I/O pins of the Arduino. One way to do this is to crimp Molex connectors to the wires, and solder a header to the pins of the Arduino. Another, less reusable way is to solder the white wires directly onto 4 pins of the Arduino. I used pins 3, 4, 5, and 6 because pins 1 and 2 are often used for Arduino programming.

Connect the black wire from the LEDs to the second GND pin of the Arduino. Again, either use Molex connectors or solder the wire directly to the Arduino.

Program the Arduino

20161130_210700B.jpg

The source code appears at Github. Download the code into the Arduino. In the code, change the pin numbers in the P[] array to match the Arduino pin numbers you connected the LEDs to. Also change the order of pins in the P[] array so that the pattern of lights goes counterclockwise, then clockwise.

If you want to change the pattern, change the code in the loop(), calling throb(), anticlockwise(), clockwise(), and delay() in any order you want. If you like, you can also call fade() to make up any lighting pattern you want. Go for it!

Plug in the Batteries and Wear the Hat

20161201_110118B.jpg
20161201_210000B.jpg

Place the 2 AA batteries into the battery holder. If you soldered in a power switch, turn the power switch on. Enjoy the light show! I calculate that the batteries should have no trouble lasting through a 1/2 day party. In fact, I estimate that the batteries should last about 18 hours.