RGB USB Smart Lamp
Hello. This is a smart night lamp made using WLED and an ESP8266. The light source(s) are 9 SK612 5050 RGB LEDs, but you can also use WS2812B 5050 LEDs. The LEDs consume around 2.5W. The lamp is powered by a 5W 5V 1A USB power adapter(mine is from my Fire TV stick). WLED is an excellent open-source firmware for lighting and can be easily integrated into platforms like Home Assistant and Homebridge. It has Alexa support built-in, but sometimes it automatically gets removed from the app, so I just use the WLED app to control it and the Apple Home app to create routines.
The soldering can be difficult, so only attempt this project if you are comfortable with soldering. I messed up the soldering thrice and had to throw away everything which can make you sad and angry. I did order 5 PCBs and extra LEDs and capacitors so I was saved.
This project is open source. The KiCAD files, Gerber files, and a cover for them can be found on my Github. There is also a 3d printable cover. The step files are in a folder called USB Light Cover SMD. I had a friend print them using an FDM 3D printer.
Supplies
2 x 10 uF 1206 package SMD capacitors
9 x SK6812 or WS2812B 5050 RGB SMD LEDs
1 x 74HC125 14 PIN package THT
1 x USB1061-USB2:GCT_USB1061-XX-X-X_REVA-Digikey
1 x ESP-12E or ESP 12F -You need to flash it WLED before soldering it. You can get a cheap ESP12 flasher board like this. For India.
1 x AMS1117 3.3
1 x PCB - Get the Geber.zip file in my Repo
The above are the required materials for one PCB. I suggest you get spares.
Assembly
Flash your ESP8266 with WLED before soldering
The first 2 photos are KiCAD renders of what it should look like after soldering.
The next two photos are what mine look like. Notice the orientation of my 74HC125.
The WLED site suggests connecting the LEDs to GPIO2, so connect a wire between J4 and J6 like in the 4th photo.
Test and Additional Settings
If you soldered everything correctly, your esp12 onboard led will light up when you connect it to a USB adapter. Then follow the WLED setup guide found here.
To select the type of LEDs you are using:
Click the gear icon to go to settings
Go to LED preferences
Select type from dropdown 1 under LED outputs.
I also suggest you set a current limit of 650mA if you are using a 5W power brick.
Optional Cover
3D print the step files, SMD Top Cover, and SMD bottom cover. I printed the top cover in transparent and the bottom in black. To assemble you need at least 2 M2*20 screws. I used 2, you can use 4 for better fitting.
Find the USB side using the first photo.
Points Where We Can Improve
There are a lot of points where you and I can improve.
Use only SMD components
Use an ESP32
Make the ESP8266 flashable directly on the PCB
Add buttons
Remove unrequired IO pins
Points where I can improve:
Write this instructable better so please let me know where I can improve this instructable.
Since this is open source please remix the project as you wish and share!
Video Demo
Enjoy a video demo before deciding you want to make one. Bye.