Showing posts with label hat. Show all posts
Showing posts with label hat. Show all posts

Wednesday, May 24, 2017

Internet Connected CheerLights Hat (Featuring the Particle Photon)

Internet Connected CheerLights Hat (Featuring a Photon)

For more details, CHECK OUT MY INSTRUCTABLE!

This weekend, I whipped up a fun e-Textile hat that 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!  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, you are missing out on something fun- something that has the potential to captivate students who might be wondering how smart objects communicate with the World Wide Web.

The result of my tinkering was an internet-enabled hat 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.

If you end up doing something like this with students, you might be also interested in knowing that there's even a free CheerLights Chrome extension in the Google Chrome store, which will allow you to see the most recent color set on the CheerLights Application Programming Interface (API) in an icon on the top right corner of your browser!  This might be useful if you are engaged in prototyping with CheerLights, (or if you're just curious).


I'm sharing the details of my build, in case you'd like to try to make your own CheerLights wearable. 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 don't yet know how to do this, I suggest you visit this Particle Guide.

Useful Tools and Supplies:

1.  a soft fabric hat
2.  a rotary leather punch or Japanese screw punch (to make holes in the hat)
3.  an eyelet setter
4.  eyelets
5.  hammer or mallet
6.  glue gun
7.  soldering iron with helping hands
8.  Photon microcontroller with headers
9.  Spark Fun Photon Wearable Shield
10.  Lily Pad Simple Power
11.  500 mAh Lipo cell battery
12.  10X SMD RGB LED's (or sewable Adafruit NeoPixels)
Note:  NeoPixels are much easier to solder, but the SMD RGB LED's are more compact.
13.  stranded silicon wire (I used red, black, and yellow)
14.  5 male to female jumper wires (2 black, 2 red, 1 yellow)
15.  Velcro squares

Directions:
The firmware/ code I'm using 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.  Modify 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

2.  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.



3.  Solder the female half of a red jumper wire to the 3Vpin 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.

4.  Find an old hat that could use a makeover.
(Black felt is flexible enough to roll and bend, making it easy to poke holes with the leather punch).








5.  Select an eyelet setter.  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.


6.  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.

I've got a piece of granite under my hat to protect my work surface.

7.  Use a glue gun to protect the solder joints.  You can Velcro the shield, Lily Pad Simple Power, and the battery to the hat now or later.



8.  Solder the SMD RGB LED's (or Adafruit NeoPixels) together with stranded wire, ensuring that the wire is long enough to reach each of the holes that you made.  I used black wire for ground, red for power, and yellow for the data lines.

I cut and tinned the data wires before soldering the strand together.  I used a set of third hands to secure the notched corner (ground) as I worked.

 If you're using SMD RGB LED's, take note that one corner has a notch in it which denotes ground.  Use the ground notch to ensure that all of your LED's are oriented properly as you work.





9.  When you're finished soldering the lights, solder the female halves of the red, black, and yellow jumper wires to the matching wires attached to your light strand.

Verify that the data in is positioned at the top of the strand.


Switch on the power to the Lily Pad Simple Power.


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



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


11.  Switch on the power to the Lily Pad Simple Power.  Once your Photon connects with the Internet, you should be able test your test your RBG LED/ NeoPixel strand.


12.  After ensuring that all of your LED's  are working properly, protect the solder joints with hot glue.





13.  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 ShieldLily Pad Simple Power, and the battery first. I began by gluing the last light in the strand, working my way towards the microcontroller.



14.  Enjoy your awesome new internet-connected creation!


Matt Holmes, you are a true hero for sharing your code (and your reindeer project) with the world! THANK YOU.

Friday, April 22, 2016

E-textile Fun: Sound Reactive Hat

Flora Sound Reactive Hat

I just put the finishing touches on a sound reactive hat that uses a Flora, a tiny microphone, and surface mountable RGB LEDs. This project is an adaptation of Lina Wassong's Sound Reactive Equalizer Skirt, shared on Instructables under a Creative Commons (CC BY NC SA) license. This is a perfect party hat.




Lessons Learned:

1.  I love Adafruit silicone stranded-core wire!
2.  Soldering RBG LEDs is tedious.
3.  A glue gun is a great tool for strengthening solder joints and diffusing light.
4.  Hand held rivet pliers may be harder to work with than standard spot setters.

I used a leather punch and a hand rivet fastener.

The Flora and a microphone are hidden inside the hat.

I went a little crazy with the glue gun!

Thursday, January 8, 2015

My Rudolph hat was featured on Wearable Wednesday!

My reindeer hat was featured on the 1/7/2015 episode of Wearable Wednesday!


This was my first wearable tech project, a hat made with a LilyPad Arduino, a temperature sensor, buzzer, and several LEDs.  To learn more about it, please visit my earlier blog posts.

Monday, December 29, 2014

The temperature sensor on my hat works!

In my last post, I shared my first completed eTextile, a hat that plays Rudolph the Red-Nosed Reindeer in sync with his flashing nose! After quite a bit of trial and error, I added a temperature sensor and got my hat working the way I want it to! Figuring out the code for this sensor wasn't entirely intuitive.

For example, I wanted the buzzer music to come on when the temperature dipped well below room temperature.  When trying to figure out the code for the temperature sensor, I spent a lot of time writing things like:



if(sensorValue <=155)
and if(sensorValue <=100) 
and if(sensorValue <=50)


By using the Arduino Serial Monitor, I'd determined that the ambient temperature of my room equated to approximately 157 (I don't yet know how that translates to degrees in Fahrenheit).  I thought that using the <= sign would tell the LilyPad that I wanted it to trigger the music when the temperature went down.   This was NOT the case.

The correct way to achieve the result I was after actually looks like this:

 if(sensorValue >=155)

The >= sign doesn't seem to mean GREATER than in this case, because when the temperature goes DOWN, my music comes on.  I would like to understand this better.

In any case, when I wear my hat indoors the lights flash, but the music doesn't come on unless the ambient temperature is pretty chilly. The beauty of this is that the music should only come on when I'm outside, away from the delicate nerves of my loved ones (or to signal our need to heave another log onto the family hearth).






Sunday, December 14, 2014

Reindeer Hat Debut

Earlier today, I posted about my progress on my first e-textile project.  I am happy to report that it has now been sewn together and is working properly!

While the audio in this video sounds pretty distorted, the hat clearly plays "Rudolph the Red Nosed Reindeer."

I used a Lily Pad Simple Snap so that I could re-use and reprogram the board for other projects, without having to remove the LilyPad, itself.
Here is what my sketch looked like before I started sewing.  I'll be the first to admit that I didn't spend that much time on this.  I really wanted to jump right in, rather than spending a great deal of time sketching...plus, I always change my mind when I'm on the midst of creative work. The addition of a temperature sensor is featured in a later blog post. I'm not sure that I love the pom-poms.