Ring in the new year or any cause for celebration with your own NeoPixel glasses!
For this project you will need:
- Trinket 3v microcontroller with USB cable
- JST-PH battery connector or switched breakout
- 500mAh lipoly battery and charger
- sturdy gaffer tape
- hair clip
- costume frames with lenses removed
- silicone coated stranded wire in a matching color
- hot glue gun
- E6000 or epoxy adhesive
- soldering iron and tools
- helping third hand tool
If you can glue the NeoPixel rings to the frames without covering the connections on the PCB, go for it. This will make it easier to make tidy wire connections. Hot glue is ok for now, but if you can permanently affix them with E6000 or epoxy, go for it. Invest in a sturdy platform that won’t fall apart during the subsequent steps.
ou can create a design by chaining NeoPixel rings, sticks, strips, and jewels to your heart’s content. These party glasses use two 24x NeoPixel rings and two NeoPixel sticks. For a more basic design, follow the NeoPixel Goggle diagram.
Wire connections are as follows (click to enlarge diagram):
- Trinket BAT+ to NeoPixel stick 4-7VDC or NeoPixel ring PWR
- Trinket Gnd to NeoPixel stick GND
- Trinket #1 to NeoPixel stick DIN
- NeoPixel stick DOUT to NeoPixel ring IN
- NeoPixel ring OUT to second NeoPixel ring IN
- NeoPixel ring G to second NeoPixel ring G
- NeoPixel ring PWR to second NeoPixel ring PWR
- second NeoPixel ring OUT to second NeoPixel stick DIN
- second NeoPixel ring G to second NeoPixel stick GND
- second NeoPixel ring PWR to second NeoPixel stick 4-7VDC
- second NeoPixel stick 4-7VDC to battery connector +
- second NeoPixel stick GND to battery connector –
You may optionally connect a switch that interrupts power either on the Trinket side or battery side of the glasses.
Carefully prep NeoPixel sticks by soldering small lengths of wires to the circuit board pads, which will be covered when you glue the stick to the sides of your glasses frames. Use hot glue to do that now, too.
Do not use permanent adhesive on your NeoPixel sticks yet, just in case you need to pop one off to troubleshoot your circuit in the next step.
Trim wires to length and carefully solder wires to NeoPixel ring connections as illustrated in the circuit diagram.
The trick to this project is tidy wiring, so really take your time to route the wires carefully, then strip, twist, and tin the ends before soldering.
Solder wire connections to a battery connector at the end of the NeoPixel chain (from above, the battery connector ground is on the left).
On the other end of the circuit, hot glue Trinket in place and make wire connections as per the circuit diagram.
Trim excess wire leads and check over the circuit for completeness and quality. Clean up your work surface so there aren’t bits of wire all over.
Test and Glue
Plug in your Trinket over USB and load the code below. Check out the Introducing Trinket guide for more info.
The pixels are only wired to Trinket’s battery power, to they won’t light up yet.
Unplug the USB cable, then connect your battery (and switch it on if applicable). If they don’t, disconnect the battery and double-check your wiring. It’s easy to flip a NeoPixel stick around backward or make other mistakes.
Also double check your code is sending data to the same pin connecting your NeoPixels’ data!
The battery we recommend goes with the code above, which animates the NeoPixels– only some are on at any given time and we’ve limited the brightness. Modifying these parameters may significantly alter battery life.
Once all your NeoPixels are working it’s time to add more permanent adhesive. I like E6000 for this because it dries clear and flexible, not brittle like super glue or epoxy. Glue up the rings, sticks, wires, Trinket, and battery connector and let cure for 24 hours before wearing.
Use gaffer tape to reinforce where the wires meet the lipoly cell. Continue to wrap the battery in tape, affixing a hair clip while you’re at it.
This alternate design uses the same circuit as the NeoPixel ring goggles!
Clip the battery in your hair and wear your fab new specs! They’re not waterproof so stay away from the pool and power down if it starts raining.
Now it’s your turn to make these glasses your own! Would you add a temperature sensor, realtime clock for counting down to midnight, or accelerometer to control the animations? Try it out and share your project on our weekly G+ Hangout Show and Tell. Happy new year!