Introduction: RGB Glasses
Hey guys how you doing!
So here's my ESP12F Based RGB LED Glasses which are made entirely from PCBs
I prepared a PCB with normal glasses size and put WS2812B LEDs on it, and then used an ESP12F to control the LEDs via a WEB Server.
The frame has been modeled just like actual glasses, only difference here is that the material of these glasses is FR4 instead of Plastic.
Materials Required (BOM)
- Frame PCB x1
- Temple PCB x2
- 10K Resistance 0805 x 4
- push button x1
- Header pins
- 10uf 16V Capacitor
- 22uf 1206 Capacitor x 1
- 4.7uf 1206 Capacitor x 1
- 200R (0 Ohms can also be used instead of this)
- AMS1117 x 1
- USB Micro port
- M7 Diode
- DPDT Switch
- WS2812B LEDs x 49
Step 1: Getting Things Ready
My Approach for making these glasses was a bit different as I didn't use any 3D Printed parts in this built.
Instead, I used the FR4 Board or PCB as the main Frame of glasses.
I Designed two different PCBs for this project and gave them to JLCPCB for samples and received them after a few weeks.
You can check JLCPCB out if you need great PCBs for Economic prices.
I also ordered a stencil for Frame PCB to make SMD Soldering easy as adding solder paste one by one on each pad is pretty Hard work so I used a stencil instead.
This Project is made with two different PCBs, one of them is Frame PCB and the other is Temple PCB.
Step 2: FRAME PCB
This PCB Construction was rather simple, I modeled the PCB according to the actual generic frame size and added WS2812B Setup on it.
49 LEDs are connected in WS2812 Config in which the first LED's Dout goes into the second LED's Din, the second LED's Dout then goes into the third LED's Din and this series goes on and on. WS2812B LEDs are controlled by connecting the Temple PCB on given slots and soldering Data, VCC, and GND Pads of Frame with Temple PCB Together.
FRAME PCB ASSEMBLY
I set up the stencil for the PCB by first placing the PCB on a Cardboard and matching the Component PAD of the PCB with the Stencil. when the PADs matched, I placed tape on both sides to hold the stencil steadily on top of the PCB and bring out an OLD Plastic Card for applying solder paste on the stencil.
I applied the Solder paste on the stencil with the plastic card evenly on each pad and placed each LED on PCB one by one in proper pin order.
After that i place the PCB on Hotplate for the reflow process, Hotplates heats up the PCB upto the solderpaste melting temperature.
After the reflow process Frame PCB is ready. now let's look at the second PCB which is the Temple PCB
Step 3: Temple PCB
This PCB is modeled after the shape of the temple of glasses and it houses the ESP12F setup with other components.
This PCB is an ESP12F Breakout Board with the minimal ESP12F Config. There's a battery connector for adding a small 300mA Lithium-ion battery and a USB port for charging that battery or powering the ESP12F straight from a power bank.
USB Port is the input side of this PCB which inputs 5V into the system and then the AMS1117 Circuit steps down the voltage (5V) into 3.3V for ESP12F working. the output from AMS1117 goes into the ESP12F via a DPDT Switch which controls the ON and OFF state of this Board.
TEMPLE PCB ASSEMBLY
I prepared the Temple PCB in the same way but didn't use stencil this time. I added the solder paste on the components pad and then added all the components one by one on the PCB. after that, I just put this PCB on a Hotplate.
Hotplate heats this PCB slowly up to the required Melting Temperature of Solder paste.
After reflow, I add through-hole components which are DPDT Switch and Male Header pins and our PCB is ready to be flashed for the first time. Before flashing this PCB, I soldered a Neopixel RIng on GPIO 12 along with VCC and GND so I can upload a test sketch before the final soldering process.
Step 4: CODE/TEST SKETCH for Temple PCB
For Flashing the ESP12F, I used a NodeMCU.
BUT WAIT!, don't we need an FTDI Board to flash the ESP12F manually by adding those classic reset and flash buttons? well, that Process is pretty dumb and complex so I'm gonna use a NodeMCU instead.
First, start by wiring the NodeMCU with our setup in this Config.
- we need to place a jumper between EN and GND on NodeMCU; by doing this, the esp8266 shuts down on NODEMCU and we can add our external setup instead
- RX to RX
- TX to TX
- 3V to VCC
- GND to GND
- Reset to Reset
- GPIO0 to D3
Before Flashing the sketch, you need to add the Neopixel Library that is being used in this project along with the ESP8266 Boards in Arduino IDE.
After wiring and adding the required library with esp8266 boards, open Arduino IDE
- open the sketch that you want to upload
- Select the port number of the NodeMCU (Tools->Port)
- Select the Board type "NodeMCU 1.0 (ESP12-E Module)"
- Click upload
and that's pretty much it.
Now, the sketch that I'm using is a webserver sketch so we need to add our network credentials to this sketch so fill in the SSID and password before uploading...
after uploading the code, open the serial monitor and you will see the IP address of this webserver.
copy the IP address from your serial monitor and open that in your web browser.
the webserver contains a color chart from where you can pick any color and display that on glasses, click on the black box and pick the color that you want to display, and that is pretty much what you can do with this. we can add an extra button in this webserver for animations but that is just an idea for now.
(also, do not forget to change the number of Neopixels used in the sketch, I used 49 LEDs for driving the frame and 12 LEDs for the Neopixel ring, you can change the number of pixels according to your setup)
After this testing phase, let's assemble both PCBs together and complete the project!
Step 5: Final Assembly
For the Final Assembly, we can directly insert the Temple PCB on slots present on the frame and solder the pads in front of it for connectivity.
Solder Temple PCB with ESP12F setup on Din side of Frame PCB and add an empty Temple PCB on another side just for support. also, these glasses are pretty fragile as they are held together only by copper pads and the copper layer is glued on the FR4 board so it can easily tear apart, I'm gonna add few drops of super glue here to give this joint more adhesion.
Step 6: RESULT
After Flashing the final sketch, I disconnected this setup from NodeMCU and added the USB Cable directly on the USB Port, and turned on the setup.
I already know the IP address of the webserver so I open that up on my iPad and put on the glasses.
RGB can be now controlled via a color chart that is in the WEBSERVER.
Watch the video!
Leave a comment if you need any help or information about this project!
This is an entry in the
Make it Glow Contest