Introduction: Glasses With Headlights and a Dual Party Mode
Here is an end to end instructable to build your own DIY Glasses which will replace you pesky old head lamp, with extra features which will make you the star at the next Halloween party using the dual party mode. And it may go so far as, replacing your bed-time reading Lamp..
In addition also download and print the 3D Lipo charger key chain/necklace pendant which makes it easy to carry the Lipo USB charger when your on the go, which you can use with a power bank or your car power outlet in an emergency situation, like when your stuck at the side of road and have to fix your flat tire.
Use cases for the Glasses
- Reading glasses
- Doing chores in and around home in the Dark
- Spice up you Halloween costume
- Fixing a flat tire
- Activate party mode and steal the show when you in the club
- Great aid for Camping
Comment below, if you think of any other use cases after watching the video.
As part of the build you'll use Adafruit's Trinket which is a small tiny microcontroller board, built around the Atmel ATtiny85, a little chip with a lot of power.And NeoPixels stick which you can read all about at the following link .
Step 1: Things You’ll Need for the Build
Here are the components required to complete the build
Sunglasses or 3D print your own glass parts
LED NeoPixel stick (has 8 Pixels)
MiniB USB cable
Silicone Cover Stranded-Core Wire - 2m 30AWG Black(this is slightly thinner and more flexible than normal hookup/bread-boarding wire)
Download the STL files attached in the next step and 3D print the parts, i am using
- Printrbot simple metal
- 1.75 mm PLA filament Hatchbox green and White filament
But for a finer print and a professional finish, you can use Form 1+ printer, which is based on Stereolithography..
Tools you'll needed
- Soldering Iron
Note : The cable that you need to upload the code and power the Trinket is a MiniB USB cable, which is NOT the same as the one used on Android Phone/tables.
Step 2: 3D Print the Parts
Download and 3D print the following files
- Lipo and Switch holder
- Trinket and dual mode Switch holder
- NeoPixel holder
If you don't have a set of glasses, in addition to the above files print
- Right eye frame
- Left eye frame Temple (2)
And if you want to carry a Lipo charger and a power bank to charge your glasses when your out an about, print the STL files attached as part of step 10.
Step 3: Using Super Glue to Stick 3D Printed Parts to the Frame
Using an existing set of glasses super glue the 3D printed parts, that is
- Lipo battery holder to the right temple
- Trinket holder to the left temple
- NeoPixel holder above the eye frame
Step 4: Adding Electronic Components to the 3D Printed Parts
Before you start cutting any wires or start soldering, it is important to decide what goes where.
The best way to start is to use a pencil and paper to sketch out the connections as shown in the picture.In addition get a feel where and how the buttons fit in the Lipo and the trinket boxes.
On the NeoPixel strip locate the Din(Data in), this should be closer to the trinket box.
Now place the parts in their respective boxes to get a feel of how much wire you will need to make the connections while soldering.
Also refer to the circuit diagram above.
Note :As part of the circuit, the NeoPixels don’t care what end they receive power from. Though data moves in only one direction, electricity can go either way. You can connect power at the head, the tail, in the middle, or ideally distribute it to several points
Step 5: Soldering Lipo to Switch
Take the Lipo battery and cut the red wire in the center.
Cut two small pieces of heat shrink and insert it on both side of the red wire.
Then solder one wire to the middle pin and the other one to the end of the switch.
Once done pull both the heat shrink to cover the soldered area
Then fit the battery with the switch in the Lipo box. Don't super glue the box yet as we need to solder the other part of the circuit.
Step 6: Trinket Box - Soldering
Now cut 3 pieces of wire that will go from the Trinket to the switch, as shown in the first picture.Also have 3 pieces of heat shrink ready to prevent shorts at the switch..
- Solder one end of the wire from the 5V pin of the trinket to middle pin of the button
- Solder second wire from pin #0 of the trinket to one end of the button, which equates to Down of the switch, which corresponds to moving Red
- Solder third wire from pin #2 of the trinket to other end of the button, which equates to Up of the switch, which
- Cut another 3 pieces of wire for the connection between the Trinket and Neopixel, before you do this get an approximate measurement of the wire between the NeoPixel holder and the Trinket box.Solder the 3 wires to
- pin #1 of the Trinket
- GND pin
- 5V pin
Step 7: Soldering Wires to NeoPixels
Solder the 3 wires from the Trinket box to the NeoPixel Stick
- Connect the 5V pin on Trinket to VDC on the NeoPixel Stick
- Connect the GND pin to GND
- Connect pin #1 to Din on the stick
A good idea is to quickly test you connections by connecting a MiniB USB to you Laptop/USB power adapter, here you should observe that the first pixels glows.
In addition at this point you can upload the code attached in the next step to test the soldered connections to the slide button in the Trinket box as shown in the video .
Now,cut the JST battery extension and solder the red wire to the NeoPixel Stick VDC and
connect the black wire to GND
To test the Lipo connection flip the switch to ON, after connecting the male and female JST cables.
Step 8: Uploading Code to the Trinket
To upload code attached to the Trinket you will have to download Adafruit's version of the Arduino IDE and install it on you computer. For complete details on how to, follow this link
In addition as part of the setup you will have to download the NeoPixel library from the following link
Place the downloaded library in the /Arduino/Libraries folder and restart your IDE.Once you IDE is back up ensure that you see File > Examples >Adafruit_NeoPixel > strandtest, which means you have completed the setup successfully.
- Now Download the code file attached Using the Arduino IDE Open the file (from the menu select File > Open)
- Next select the type of programer as show in the screenshot (Tools > Programmer > USBtinyISP)
- Also select the board you are using (Tools > Board > Adafruit Trinket 8MHz )
- Now press the button located just below the chip on the Trinket, wait for Red light to blink bright red and then upload the code to the Trinket (File > Upload)
- Once done in about a second you should see your Neopixel strip glowing..
- Run a quick test as shown in the video..
Step 9: Super Glue the Lids and Wires
Now once you tested the whole circuit, super glue the Lipo box lid and trinket lid in place.
In addition glue the hanging wires to the side of the frame and temple.
Tip : Super glue the buttons to the lids and then glue the lids to the boxes.
Step 10: Using the Lipo Charger
In case you are out an about, you make come across a situation where your battery is running low , at this time its handy to have a power bank/mobile juice pack to charge you Lipo battery using a Lipo charger..
Download the Lipo charger case STL files attached.And for more stylish Lipo case lids refer to this thingiverse link.
A good idea is to wear the Lipo charger around your neck or just add it to your key chain.
Now to charge you Lipo battery
- Flip the switch on the lipo box to off and detach the JST connector.
- Connect the USB cable to the power bank and to the female connector on the Lipo charger.
- And then connect the JST connector from the Glass to the JST end of the Lipo Charger case as show in the picture
- Flip the switch back to on to start charging.
- After about 20 min you should have enough to run you glass for at-least 2-3 hours..
Step 11: 3D Printed Frame Instead of Existing Glass Frame
Use the STL files attached as part of step 2, to print the glass frames
Print the frame rims in one color(I used green for both the frame rims ), or if your ambitious use one color for the left eye rim and another color for the right eye rim.
Print the temple and tips in another color (i am using white), if you are using a printer with smaller print area, use the STL file which has the temple and tip split into two part . You can then use super glue to join the parts.
Print the Trinket and Lipo box in the same color as frame, at-least that is what I did , but feel free to experiment and post a picture of your print in the comment section below.
Then follow steps 3 to 9 to complete the build with the 3D printed glass
Step 12: Saftey Tips
- If for some reason your glasses get wet, disconnect the Lipo from the circuit by removing the JST connector. And dry it with a hair dryer, maintain safe distance between the glass and the dryer.
- Use a Waterproof Electrical/Electronic Spray, there are many of them in the market ,just search for one on Amazon.
- If you don't want to get, too experimental with the sprays, another idea to make your glasses more durable, is to plug all the holes that you see where dust and water can seep through with Sugru, which is a soft-touch silicone rubber that molds and sets permanently.
- All my prints that you see in the picture where made using a Printrbot Simple metal and PLA filament , but for even more flexibility at the tips over the ear and the frame pieces , try and use NinjaFlex, if your printer supports it.
- Use super glue at spots of the print, that you think are fragile and could potentially break, for added strength.
We have a be nice policy.
Please be positive and constructive.