CheerLights Internet-Connected Hat (with Particle Photon)

by Bling the Book in Circuits > Wearables

2494 Views, 27 Favorites, 0 Comments

CheerLights Internet-Connected Hat (with Particle Photon)

cheer lights photon hat.gif
CheerLights Photon Hat

This festive e-Textile hat combines the magic of CheerLights with a Particle Photon, a microcontroller that can connect to the cloud to help you with all of your Internet of Things projects! The result of my tinkering was an internet-enabled wearable that changes colors in sync with lights all over the world, in response to Twitter messages mentioning @CheerLights and the name of a desired color.

According to CheerLights' Twitter bio, "CheerLights is an #internetofthings project by @scharler to synchronize lights to the same color at the same time all around the world." If you haven't tried it, prepare to be dazzled and amused by this charming global phenomenon!

Useful Tools & Supplies

IMG_8418.JPG

1. a soft fabric hat

2. a rotary leather punch or Japanese screw punch (to make holes in the hat)

3. an eyelet setter (prefer a universal setter over the squeezable variety)

4. eyelets

5. hammer or mallet

6. glue gun with a supply of glue sticks

7. soldering iron with third hand

8. Photon microcontroller with headers & a micro USB cable

9. Spark Fun Photon Wearable Shield

10. Lily Pad Simple Power

11. 500 mAh Lipo cell battery (or larger)

12. 10 X SMD RGB LED's (or sewable Adafruit NeoPixels)

Note: NeoPixels are much easier to solder, but the SMD RGB LED's are more affordable and compact.

13. stranded silicon wire (I used red, black, and yellow)

14. Five male to female jumper wires (2 black, 2 red, 1 yellow)

15. Fabric safe Velcro squares

Getting Started With Photon

I am working under the assumption that you already know how to set up a Photon and upload code using the Particle IDE. If you need help, visit this Particle Guide.

Upload Firmware From Github

I used code/ firmware that was shared by Matt Holmes in his NeoPixel reindeer project on GitHub. If you are new to the Photon, you might want to spend a little time reading the tips Matt Holmes shares to help you get started with the proper libraries.

1. Upload the CheerLights code to your Photon using the Particle IDE. (You'll need to set up a free account if you haven't already done so).

I modified the code so that the PIXEL_PIN is D7 instead of D0 and the PIXEL_COUNT is 12 instead of 1.

#define PIXEL_PIN D7

#define PIXEL_COUNT 12

Solder Jumper Wires

IMG_0540.JPG
IMG_8409.JPG

Solder the male half of a black jumper wire to the ground pin of the Lily Pad Simple Power and the male half of a red jumper wire to the positive pin.

Solder the female half of a black jumper wire to one of the ground pins on the Spark Fun Photon Wearable Shield and the female half of a red jumper wire to the VIN pin on the shield.

Solder the female half of a red jumper wire to the 3V pin of the Spark Fun Photon Wearable Shield.

Solder the female half of a yellow jumper wire to the D7 pin.

Solder half of a male black (I used brown) jumper wire to the other ground pin.

Insert the jumper wires attached to the Lily Pad Simple Power into their corresponding male jumper wires on the Spark Fun Photon Wearable Shield.

Prepare Your Hat

IMG_8407.JPG
IMG_8356.JPG

Find an old hat that could use a makeover.

Select an appropriate eyelet setter for your project. A universal eyelet setter may be easier to use than the squeezable type if you plan to place eyelets far from the hat's brim.

Use the leather rotary punch or Japanese screw punch to create holes in your hat that are slightly smaller than the eyelets you're using. Set the eyelets so that the finished sides are visible from the front of the hat and the rough edges are on the inside.

Reinforce Solder Joints

IMG_8358.JPG

Use a glue gun to protect the solder joints on your SparkFun Photon Wearable Shield and Lily Pad Simple Power.

You can Velcro the shield, power, and battery to the hat now or later.

Prepare to Solder the LED's

neopixel pic collage.jpg
IMG_0730.JPG

If you're using SMD RGB LED's, take note that one corner has a notch in it which denotes ground.

If using Adafruit's sewable NeoPixels, take note of the data-in and data-out markings on the PCB as you work.

I cut and tinned the ends of several pieces of yellow stranded wire before soldering my data lines.

Using a set of third hands, I secured each SMD RBG LED by the notched corner (ground), to ensure that all of the lights were oriented properly.

Solder the LED's

IMG_0732.JPG
IMG_0735.JPG
IMG_0736.JPG

Solder the SMD RGB LED's (or Adafruit NeoPixels) together with stranded wire, ensuring that the data wires are long enough to reach each of the holes that you made.

I used black wire for ground, red for power, and yellow for data. If you're using Adafruit stranded silicone wire, the coating is pliable enough to tear with a fingernail. Or, if you prefer, you may use a pair of scissors to make incisions in the silicone to expose the wire for soldering.

Solder Jumper Wires

IMG_0737.JPG

Solder the female halves of a red, black, and yellow jumper wire to matching wires soldered to your light strand.

Protect the joints with electrical tape or heat shrink tubing.

Test & Reinforce Your Light Strand

IMG_0542.JPG
IMG_0739.JPG

Switch on the switch to the Lily Pad Simple Power.

Once your Photon connects with the Internet, you should be able test your light strand. After ensuring that all of your LED's are working properly, protect the solder joints with hot glue.

Glue the LEDs to the Inside of the Hat

IMG_8408.JPG
IMG_0543 - Edited.jpg
IMG_8421.JPG

Insert the female jumper wires attached to the light strand into their corresponding male jumper wires on the Spark Fun Photon Wearable Shield.

Glue your LED's into position, centering them within the eyelets before the glue cools. I found it helpful to detach the Spark Fun Photon Wearable Shield, Lily Pad Simple Power, and the battery while I was gluing. I began by gluing the last light in the strand first and working my way towards the Photon.

It's not pretty on the inside, but it's not uncomfortable to wear. I did, however, have to be careful to position the shield in a place where my head would not accidentally touch the reset or setup buttons on the Photon.

Wear Your New CheerLights Hat With Pride

Magenta.JPG
IMG_8433.JPG
Blue.JPG
yellow hat.JPG
red hat.JPG
IMG_8420.JPG