Introduction: Tile Neopixel Necklace
This tutorial will show you
how to create this necklace! Just as a disclaimer, I am not an expert at working with electronics, so improve upon this as you will! :)
This project is programmed using Arduino IDE. It uses a Gemma microcontroller and neopixel lights. For more information on these, visit Adafruit's Learning website. There are some good tutorials for programming and some cool projects available. Here are some links:
Guide to neopixels: https://learn.adafruit.com/adafruit-neopixel-uber...
Guide to the Gemma: http://www.adafruit.com/products/1222
Step 1: Materials Needed
- large 3.7 V battery
-Canvas or heavy material
-Heat and Bond quilt batting
-1 sheet protector
-resin tiles or other decorative pieces (I got my tiles from Lowe's. I cut them apart from a peel and stick backsplash)
-Clear nail polish
-1 light sensor (if you want your light patterns to change with different light intensities)
Step 2: Plan Your Design
I started this project by placing my tiles in the position that I wanted them. Here is where your sheet protector comes into play. Lay your tiles on top of your sheet protector, leaving gaps between them. When your tiles are placed how you want them, glue them to your sheet protector using hot glue or super glue. Cut the sheet protector around your tile pieces to get the shape of the necklace.
Step 3: Cut Out a Canvas Shape
Take your plastic tile layer and trace the shape onto a piece of canvas or stiff fabric. This is the layer that all the electronics will be sewed onto. Once you have finished tracing, cut it out and place your plastic tile layer to the side for later steps.
Step 4: Plan Your Circuit
Before you start sewing your pixels and Gemma onto the canvas, you want to first plan your circuit. I made a simple diagram to show how the connections will work.
Connect the Ground pin on the Gemma to the negative pin on the neopixel. Connect the Vout pin on the Gemma to the positive on the pixel. Finally, connect the D0 pin to the arrow pin (data pin) on the pixel. Make sure the arrow is pointing away from the board.
Make these connections using conductive thread. Make sure to sew into the pins at least 2 times for a strong connection. Here is a video with tips for working with conductive thread:
When you connect the D0 pin to the data pin on the pixel, I would suggest using insulated wire. This allows the connection to pass safely over the Gemma board. You can connect the wire to the board by soldering. If you don't have a soldering iron, make loops in the wire with pliers and securely sew them touching the pin with conductive thread.
Step 5: Add More Neopixels
To add more pixels to your strand, simply connect the negative pins on each pixel, the positive pins on each pixel, and the data pins on each pixel. These will be sewn as three separate lines. It's a good idea to seal your knots with clear nail polish or hot glue.
You can rotate your pixels as the picture I included shows. Just make sure that if you were to straighten your pixels into a line, the arrows would all point the same direction. When you get to your last pixel, do not connect the data pin back to the Gemma board. This line ends with the last pixel.
It is a good idea, however, to connect your negative pin back to ground and your positive pin to Vout on your Gemma. This strengthens the connection and will give you brighter lights.
Step 6: Test Your Lights
Now it is a good idea to test your lights.
Because Gemma is not fully compatible with Arduino IDE, there are steps you need to take to program the Gemma.
Go to this website for the full tutorial and downloads:
Once your computer is set to go, download the neopixel library here: https://github.com/adafruit/Adafruit_NeoPixel
Click the "Download ZIP" button on the right side of the page.
Open Arduino and go to Files > Sketchbook > libraries > Adafruit_Neopixel > strandtest
Connect your Gemma to the computer using a USB. Press the reset button on the Gemma and upload the code.
Do they all work? You may need to resew some of the lines or strengthen the connection in places.
Step 7: Hold Them Threads in Place!
Once you get all of your lights to work, you will want to ensure that your threads stay in place. You don't want any shorts in your circuit.
Trace your necklace shape onto a sheet of batting folded in half (you want 2 batting shapes).
Take one batting shape and place it on the back of your canvas shape. Carefully place a clothing iron on top of the canvas, binding the batting to the back. This will seal your connections in place. Don't place the iron over any of your lights and be cautious with the heat settings. If the iron is too hot, you may burn through your canvas.
Step 8: If You Want to Incorporate a Sensor....
If not, skip this step!
I tried using a light sensor in my project that changes the neopixel patterns based on the lighting in the environment. This sensor will connect to the Gemma from the back of the necklace. You want to attach the negative pin of the sensor to the ground on the Gemma. You want to connect the positive pin on the sensor to the 3Vo pin on the Gemma. Finally, connect the S pin to the D2 pin on the Gemma.
I suggest using wires for these connections as they will most likely cross.
The picture I included in this step is a little confusing.
I used wires to make my connections and then sewed the wires down onto a piece of elastic. I then pulled conductive thread up through the elastic and connected it to the sensor. The elastic piece extends above the necklace so the sensor can read light.
Step 9: The Second Batting Shape
Once you have made all your connections, take the 2nd batting shape. This piece will go on top of your neopixels. In other words, your canvas will be sandwiched between 2 layers of batting. To secure this piece of batting, use a little hot glue around the edges. Leave an opening near the Gemma so you still have access to it and can connect it to the computer. Also, make sure the battery has a comfortable place to sit. You may want to place the battery at the back of the piece.
In the picture here I simply tucked my battery up behind my piece (you can see the red and black wires connected to the Gemma). Make a little battery holder or strap out of some scrap fabric to keep the battery secure.
Step 10: Putting It Together
Take the plastic tile layer that you set aside. Lay this on top of the piece and secure it using hot glue. Turn on your lights and watch it glow! It will cycle through colors and fade using the strandtest code in the neopixel library.
Step 11: The Code
I was actually unable to get my sensor to work, but here is the code nonetheless. I simply added the sensor criteria to the strandtest code.
The code2 file was created by one of my good friends. He had fun exploring some other cool things you can program with neopixels. Give it a try!
Step 12: Don't Give Up Hope!
This is challenging. At least I thought it was. So many things went wrong while I was working. Broken battery for one :( I even had to write this tutorial twice because it was somehow deleted the first time!
Technology doesn't always do what we want and it gets complicated. Lesson: Keep working with it and if it fails, it fails. There is still a lot to learn from the process. Even if it didn't turn out entirely as I imagined, I have a pretty cool product!
We have a be nice policy.
Please be positive and constructive.