Make Your Own RGB Ring Light Glasses
by LeoW45 in Circuits > Arduino
4500 Views, 47 Favorites, 0 Comments
Make Your Own RGB Ring Light Glasses
It's really difficult to read in dark environments, so I made a pair of glasses with Neopixel RGB lights and a photoresistor so you never have to worry about lighting again!
The RGB Glass also has different functions like rainbow mode and morse code mode. You can also add-on different functions yourself!
Gathering Materials and Tools
Printing the Frame
The print is really straight-forward. Attached is the STL file of the right and left leg as well as the glass itself. I encourage you to customize the 3D model by remixing it on Tinkercad. Make it your own!
My print settings on the Ender3 V2:
Bed temp: 60C
Nozzle temp: 200C
Layer & Initial Layer Height: 0.12mm
Understanding the Circuit
Above is the circuit of the RGB Glass. Since Tinkercad doesn't offer the Lilypad Arduino as an option, I am just using an Arduino Uno for this diagram (don't worry, the connections are the same for the Lilypad). The two ring LEDs are powered by the Arduino itself, and connected to digital pins to receive controlling information while the photoresistor connects to an analog pin.
Refer to this diagram if you get confused about the wiring.
The diagram is also interactive! Test out the RGB Glass by running the simulation.
Soldering the Lily Pad
Honestly, it's up to you about how you should assemble all of the pieces, but this is how I did it.
First, I soldered wires with receiving connectors onto the LilyPad by stripping the other end of the wire and soldering the stripped end to the Lilypad.
Once soldered, I hot glued the connections to prevent short circuiting.
Soldering guide:
1 wire to A5
1 wire to 3
1 wire to 2
3 wires to +
3 wires to -
Soldering the Ring LEDs
Now solder a the stripped end (you have to do this yourself) of a sender wire into "Data Input", "PWR/5V" and "GND". Repeat this for both LED rings.
Soldering the Photoresistor
Coil a 10k resistor and a wire to an end of the photoresistor (it doesn't matter which end you coil it on). Then strengthen the connection by soldering the resistor to the wire.
Slide the non soldered end of the photoresistor through the hole near the nose piece of the 3D printed glass. Then, solder a sender wire with the stripped end to the end of the photoresistor that was previously slid through the hole.
Hot glue the photoresistor and its connections to keep them in place. Make sure to not block the light sensing component of the photoresistor with the hot glue.
Stick the LED Rings and Photoresistor Onto the Glass Structure
Start by hot gluing the wires of the photoresistor to the border of the 3D printed frame. Then use the same looping method to glue the two LED rings onto the 3D printed frame by sticking the wires into the little crevices by the border. Refer to the pictures above.
Screw in the Hinges
Use the M4*16 screws. Make sure to be careful and slow with screwing the temples on as the printed piece will break under too much pressure.
Download the NeoPixel Library
Open Arduino, go to Tools > Manage Libraries and search up "neopixel" in the search bar.
Download the library that says "Adafruit Neopixel".
The Code!
To get the code, you can either copy and paste the code from the Tinkercad Circuit diagram to your Arduino IDE, or download the code file below.
There are three functions of the RGB glass coded in and you switch between functions by uncommenting one (removing the "//") and commenting the other two (adding the "//"). Commenting with "//" disables a line of code.
Functions of the RGB Glass:
Morse code mode: Insert a text in the serial monitor (9600 baud) with the cable attached to your computer and the RGB glass will flash the message in Morse!
Lighting mode: The glasses will shine either brighter or dimmer depending on the brightness of the room. Great for reading in dark places!
If you want to adjust the sensitivity of the photoresistor, modify the equation to change the light Input and the "If" statement for the threshold.
Rainbow mode: Displays a fun rainbow animation.
You can easily make your own modes by modifying the source code. If you make one, be sure to share your code in the comments!
Downloads
Upload the Code!
Connect your computer to the Lilypad Arduino through a micro USB cable.
Make sure to select the right board and port before you upload the code.
The second picture above shows the port you need to connect to if you're a Mac user. For Windows, select the right COM port.
Finishing Touches
I managed the wires using zipties, but there are certainly more elegant ways to organize the wires. Add some suggestions below or remix this project with your own improvements!
Before usage, connect the battery to the Lilypad and charge it by switching on the charge mode while the microUSB is plugged-in.
That's it. Once you charged the battery, the glass is ready for use!