But it not easy to print, need use support with non-stickable material (PETG+PLA or special support)
New top cup available!
Smart RGB LED Lamp with ESP32 and WLED
This customizable 3D-printed RGB LED lamp is powered by an ESP32 microcontroller and controlled through the WLED library. The lamp features a 16x16 LED matrix, allowing for a wide range of dynamic lighting effects and color patterns. It's perfect for creating ambient lighting in any space, with easy control via a smartphone app or a web interface. The lamp design is sleek and modern, with a clean cylindrical shape that diffuses the light beautifully.
Links to purchase components like the ESP32, LED matrix, and more will be provided via AliExpress for those looking to build yours own version
Parts You Need:
ESP32: This is the brain of your project. It controls the LEDs and connects to the WLED app.
Powering the Lamp (from USB-C to ESP32 and LED Matrix):
USB-C Female Connector: This is where the power comes from. It will provide 5V to your lamp when connected to a USB power source like a phone charger.
Red Wire (Positive): Connect the red wire from the USB-C to both the positive power input of the LED matrix and to the VIN pin on the ESP32. This sends power to both the LED matrix and the ESP32.
Black Wire (Negative): Connect the black wire from the USB-C to both the negative (GND) on the LED matrix and the GND pin on the ESP32. This completes the power circuit for both components.
Connecting the LED Matrix to the ESP32 (for controlling the LEDs):
The LED matrix has three main pins: Power (V+), Ground (GND), and Data Input (DIN).
You already connected Power (V+) and Ground (GND) to the USB-C connector.
Now, connect the DIN (Data Input) pin of the LED matrix to Pin 16 on the ESP32. This wire will send signals from the ESP32 to the LEDs, telling them what colors to display.
Optional: Adding a Touch Button:
If you want to control the lamp with a physical button, you can add a Touch Button.
VCC Pin on the Button: Connect this to the 3.3V pin on the ESP32 to supply power to the button.
GND Pin on the Button: Connect this to the GND on the ESP32 (you can share the ground connection with the matrix).
IO Pin on the Button: Connect this to Pin 4 on the ESP32. This will let the ESP32 detect when the button is pressed and trigger actions like turning the lamp on or off or changing lighting effects.
Glue touch button to CUP with hot glue, (please, not fill sensor with glue, only around)
Optional: Connect All 3 Power Pins of the LED Matrix in Parallel:
Some LED matrices have multiple power input pins (for example, 3 pins labeled V+ and 3 pins labeled GND). To ensure even power distribution and brightness across all LEDs, you can connect all V+ pins together and all GND pins together.
This step is optional but recommended if you notice uneven brightness in your LED matrix.
Important: Pass the wires through the central tube and solder them directly to the inner side of the tube. This will help the LED matrix fit tightly and evenly around the central part.
Assembling Steps:
Mount the LED Matrix
Secure the LED matrix to the central tube by threading the wires through the holes. You can use zip ties or thin strips of electrical tape to attach the matrix to the central part.
Connect All Wires
Follow the wiring diagram to ensure all connections are correct.
Attach the Board
Use an M3x10 screw to fix the board to the central part, ensuring it does not move inside the lamp.
Attach the Button
Glue the touch button in place. Ensure only the surrounding area is glued and not the sensor itself.
Place the Central Part on the Base
Position the central part onto the base.
Route the Button Wires
Pass all the button wires through the central part and connect them to the board.
Secure the Lamp Shade and Cap
Screw the lamp shade in place and then attach the cap to the central part.
Power Connector Modification
If the USB-C connector does not fit, trim the plastic tabs with a knife to make it fit properly.
Final Steps:
You can power the lamp using any USB power adapter, like a phone charger, that provides 5V via USB-C.
Flashing the ESP32 with WLED Firmware
Step 1: Connect the ESP32 to Your Computer
Use a USB-C cable to connect your ESP32 board directly to your computer.
Make sure the USB-C cable supports both data transfer and power (some cables only charge and won't work for flashing the firmware).
Step 2: Go to the WLED Flashing Website
Open your web browser and visit the official WLED installation website: https://install.wled.me
Step 3: Install the WLED Firmware
On the website, click "Select Latest Release" to download and install the most recent version of WLED firmware.
Under the COM Ports section, select the correct COM port for your ESP32. This port allows your computer to communicate with the board.
If you are unsure of the port, you can find its name in your computer's device manager.
Once the correct port is selected, click "Flash" to upload the WLED firmware to the ESP32.
Wait for the flashing process to complete. This may take a few minutes, and you'll be notified when it's done.
Step 4: Set Up Wi-Fi on the ESP32
After flashing, the website will prompt you to configure the Wi-Fi settings for your ESP32. Follow these steps:
A Wi-Fi configuration screen will appear on the same page.
Choose the Wi-Fi network you want your ESP32 to connect to from the dropdown list.
Enter your Wi-Fi network password and click "Save & Connect".
The ESP32 will now attempt to connect to your home Wi-Fi network.
Step 5: Access Your Device
Once the ESP32 is connected to your Wi-Fi network, the website will display a button labeled "Go to Your Device":
Click this button, and it will take you directly to the WLED control interface, where you can begin customizing your lamp.
If this button doesn't appear, you can manually enter the ESP32’s IP address in your browser (you can find the IP address in your router's connected devices list).
Configuring WLED After Flashing
Step 1: LED Settings
In the WLED interface, go to the Settings menu and select LED Preferences.
Set the Total LED count to 256 (for your 16x16 matrix).
Scroll down and configure the Button settings:
For Button 1, select Pin 4.
Set the Button Type to Inverted Push Button.
Step 2: Power Settings
Adjust the Maximum Power settings based on your power supply:
For example, if your power supply is rated for 2A, set the limit to 1800mA (subtract 10% to ensure safe operation).
Important: Make sure you are connected to a dedicated power supply (not just USB) when adjusting power settings to avoid damaging the ESP32.
Step 3: Matrix Configuration
In the WLED interface, go to LED Layout or Matrix Settings.
Choose Matrix for the LED layout.
Select Serpentine tick (this is how the LED strips are arranged).
Set the 1st LED Position to Bottom Left.
Optional: Install the WLED+ App
To control your lamp from your smartphone, install the WLED+ app.
This app allows you to change colors, patterns, brightness, and more right from your phone.
Conclusion:
After following these steps, your ESP32 will be ready to control your LED matrix with WLED, and you can customize it to create stunning lighting effects. Enjoy using your new lamp!