Introduction: Neopixel Giant Thermometer Scarf
Motor feather, it's cold outside.
Make this wearable high tech, low tech scarf with a built-in thermometer.
No longer will you be wondering how really cold it is when you step outside.
This is suitable as a nice beginner project to delve into Arduino with sensors and neopixel LEDs.
Step 1: Crafty Electronics...
Most of the stuff I used I had on hand except a DHT11 humidity and temperature sensor module that I got as the first purchase of the new year.
I reused an Adafruit Flora arduino board, a short length of neopixel strip and a neopixel ring.
I had some leftover white microfleece fabric which I used for the scarf. Anything soft in a light solid color will do.
The finished width of the scarf is about 6 inches wide and the length around 6 feet long.
You will need a small bit of fiberfill batting to diffuse the neopixels or just use a layer of the microfleece.
For the diffuser and neopixel pockets, use something like a muslin or thin light fabric.
You can make the scarf all with a regular sewing machine. I also use a serger as I find that it is useful for straight seams that can be sewn and trimmed at the same time.
Step 2: May the Flora Be With You...
The generic humidity and temperature sensor module I bought did not come much with instructions on how to use it or anything. I went to the vendor site and all they had was a translated datasheet and the necessary library/sample code. It turns out you need to use this with a 5K pullup resistor. Luckily I had the mega-*bay assortment pack of resistors from which I was able to find something close to use.
Since this was the "cheapest" sensor board I really didn't go in expecting much. It was only spec'ed out to give readings in the 0-50 *C range within a couple of degrees accuracy and likewise with the humidity readings. When it ran I viewed a lot of errors and timeouts. It is a slow updating sensor so even changes to the interval of when the sensor is read did not clear up the number of errors. I then found that it was not returning the temperature in Fahrenheit even though the parameters were set for it to do so.
I did a manual conversion from Celsius in the code to compensate but was still thinking I got a wonky piece of kit. I then go back and look up an Adafruit part which I originally intended to get and browsed through the Adafruit tutorial which led to an optimized library code for the DHT11. I downloaded that, installed, and everything worked fine.
Okay, now I got humidity,temperature and heat index readings coming through on the serial monitor. How about I use that to make a visual thermometer?
I had some neopixel strip segments and neopixel rings to make a thermometer looking setup.
The neopixel strip and the neopixel ring were on their own data pins and needed to be coded as two instances of neopixels..
The visual effects animations for the neopixels were pulled in from the strandtest sample code. I figured out how to get the lights to blank out and go in reverse without the i-- looping since decrement looping did not seem to work.
I had the rainbow wipe run only upon initialization to show that the all the neopixels are in working order.
I used the arduino map function to scale the actual temperature reading into how many neopixels to light up.
I usually don't post up any code since it was still a mishmash work in progress but someone asked for it. The other color animations are in the code so you can play around with it. You can go on the Adafruit Learning System to find the links to their library code used in the sketch. Good luck. (note that you might have to check for wordwrap and wonky code block here)
- update - editor seems to mangle the code - will attach file
Step 3: A Little Bit of Padding Never Hurts...
I like to diffuse the neopixels so they don't look like a bunch of discrete LEDs. It adds to the effect of looking like a regular liquid filled thermometer.
I had already cut out my fabric used as the shell of the scarf.
I created something like a pillow with fabric encasing a layer of fiberfill batting. An additional layer of outside fabric forms a channel and pocket for the neopixel strip and neopixel ring.
Once the pillow is formed, sketch out the shape of the thermometer.
The pillow is sewn onto the scarf shell by following the outline of the thermometer. This also traps in the light so that it will look like a light filled tube.
I finished off the top and bottom edges of the scarf with the serger.
The entire scarf was then serged on the long edge to create a long tube. It is then turned inside out so that it will look nice on the outside when completed.
Step 4: Bask in the Glow...
Since the scarf has been turned inside out to the finished side, you may need to peel back the bottom to access the mounting pocket.
Mount the electronics inside the scarf.
You can slide in the long length of the neopixel strip into its tunnel pocket and stuff the neopixel ring into the bottom pocket. You might want to tape the back of the neopixel ring in position with the end of the neopixel strip to keep it in place so it looks like the thermometer bulb and tube.
Flatten out the rest of the wires. The battery pack I used has an on/off switch so that dangled toward the bottom of the scarf. I didn't have a pocket built for that so I just serged half of the bottom of the scarf to keep the battery pack inside the scarf. A small opening was left so I could reach in and move the switch.
Turn the thermometer scarf on.
You will need to see where the range of lights actually end up. From there, you can calibrate and draw on your scale for Fahrenheit and Celsius. Use a permanent marker or fabric paint. Depending on the accuracy, tolerance and range of your sensor, you will need to adjust your scale.
Now go out and sense your environment.
Add datalogging and GPS capabilities to map out readings.
Add haptic feedback as alarms for staying out in the heat or cold too long to prevent possible hypothermia or heat stress.
Change the light animations or color schemes as you desire.
Grand Prize in the
Sew Warm Challenge
Runner Up in the
Make It Glow! Contest
Participated in the
Arduino All The Things! Contest