LIGHT BLOCK- Smart Lamp
This is the Light Block—a DIY RGB LED lamp I made by repurposing a glass brick. I designed and 3D printed a custom base for it, turning the brick into a functional lamp for my living room.
By placing an RGB LED PCB beneath the glass, the light shines upward and diffuses evenly through the entire block, transforming a solid glass brick into a soft, ambient light source that adds a subtle glow to the space.
The lamp is controlled wirelessly through a web app hosted on an ESP32, allowing colors and lighting modes to be adjusted directly from a phone or browser.
This Instructable covers the complete build process of the lamp, so let’s get started with the build.
Supplies
These were the components used in this project:
- Glass Brick size: 190 mm x 190mm x 81mm
- Custom PCBs (provided by PCBWAY)
- Medic Mini Mainboard
- Dodecagon Portal Project LED PCB
- 3D-printed parts
- Lithium cell 3.7V 2600mAh
- M2 screws
GLASS BRICK
This was the star of our project, a glass brick, which is a hollow or solid block made of two pieces of glass that are fused together.
Because the inside is sealed, it diffuses light beautifully while still remaining strong and durable. Glass bricks are known for their ability to let light pass through while still maintaining privacy, thanks to their frosted or patterned surfaces. Because of this, they are commonly used in partitions, windows, shower areas, and many other architectural applications.
This glass brick was actually a leftover from a renovation project in my home. Since it was an extra piece, I kept it aside—and after seeing glass brick lamps on Pinterest several times, I thought, why not make my own version? That simple idea is what started the entire project.
DESIGN
For the design process of this project, we began by creating a 3D model of the glass brick.
Once that was in place, we imported the remaining components into the design that included the lithium cell, the Medic Mini mainboard, and the RGB LED PCB. We arranged and rearranged these components in different configurations until we found a layout that balanced both functionality and space efficiency.
After finalizing the internal arrangement, we designed an enclosure around the components.
Our enclosure is essentially a box-like housing that securely holds the glass brick at the top. Directly beneath the brick sits the RGB LED PCB, which illuminates the glass from below and makes the entire block glow. Below the LED PCB, we positioned the lithium cell and the Medic Mini board. Since the Medic Mini’s charging port needs to remain accessible, we incorporated a side slot into the enclosure for easy access.
On the front, we added two extra parts purely for aesthetics—these “accent parts” create a clean two-tone effect and are pressure-fitted into place. Finally, we designed a separate base piece that attaches from the bottom and locks onto the main enclosure, which we refer to as the main body.
Downloads
3D FILES
After finalizing the design, we exported three primary parts: the main body that houses the glass block, the base that supports the entire structure, and two accent pieces designed to enhance the overall aesthetic. These accent parts are mounted on the front side of the main body to add visual detail.
All components were exported as mesh files and then 3D printed on our Anycubic K10 printer. The main body was printed using orange PLA, while black PLA was used for the base and accent pieces to create a subtle contrast. We used Hyper PLA with a 0.4 mm nozzle, set the infill to 30%, and printed all parts without requiring any supports.
ELECTRONICS
For the electronics, we reused PCBs from two of our previously built projects: the Medic Mini mainboard and the Dodecagon RGB LED PCB.
We’ll start with the Medic Mini mainboard. This board was reused because it already includes a reliable onboard power-management system that serves as the primary power source for the lamp. It features the IP5306 power-management IC, which operates from a single 3.7 V Li-ion cell and provides a stable 5 V output capable of delivering up to 2 A.
The board also integrates an ESP32-C6 development board, which acts as the main microcontroller for the project. Using the ESP32-C6 allows us to host a web application directly on the device, enabling the lamp to be controlled over a local network through a simple IP address.
The second reused board is the Dodecagon RGB LED PCB. This PCB contains seven WS2812B RGB LEDs connected in series. It originally came from a project I built back in 2021, and we decided to repurpose it here as the primary lighting element. In this build, a glass brick is placed directly above the LED PCB, allowing the diffused light from the LEDs to illuminate the glass block evenly and create the lamp’s signature glow.
DODECAGON PORTAL PROJECT- https://www.instructables.com/Dodecagon-Portal-Project/
MEDIC MINI- https://www.instructables.com/MEDIC-MINI/
PCBWAY
For the project’s PCBs—the Dodecagon LED board and the Medic Mini mainboard—we got both manufactured by PCBWay, the sponsor of this video.
Over the past ten years, PCBWay has really set themselves apart by offering high-quality PCB fabrication and assembly services, becoming a trusted partner for thousands of engineers, makers, and designers around the world.
Also, PCBWay is organizing the PCBWay 8th Project Design Contest, a global event that invites makers, engineers, and innovators to showcase their most creative builds. With categories in electronics, mechanical, and AIoT, it’s a great opportunity to share your work, connect with the community, and compete for exciting prizes.
You guys can check out PCBWAY if you want great PCB service at an affordable rate.
LED PCB ASSEMBLY
- We begin by applying solder paste to all the SMD LED pads using a solder-paste dispensing syringe.
- Next, each RGB LED is carefully picked and placed onto its footprint, making sure the orientation is correct.
- The PCB is then placed on a hot plate, which heats the board from below until the solder paste reaches its reflow temperature (around 200°C). This process causes the solder to melt and securely bond all components in place.
The MEDIC MINI main board assembly is covered in detail in a separate Instructables guide, which you can follow for the complete build process.
WIRING
We began the wiring process by soldering wires to the LED board’s VCC, GND, and DIN pads. Once the wires were attached, we connected the LED board to the Medic Mini’s ESP32 module:
- VCC from the LED board goes to the 5V pin
- GND connects to GND
- DIN is connected to GPIO 5
To power the entire setup, we added a 3.7V 2600 mAh Li-ion battery pack. The battery’s positive terminal is connected to the battery positive pad on the Medic Mini board, and the negative terminal goes to battery negative.
The Medic Mini’s onboard power-management circuitry then boosts the 3.7V from the Li-ion cell to a stable 5V output, which is used to run both the ESP32 microcontroller and the RGB LED board.
BODY ASSEMBLY
- We now begin the body assembly process. We placed the circular accent part in its place, applied a little bit of pressure, and it fit into its place. We did the same for the other accent part.
- From the bottom side, we placed the base part by aligning the base part with the main body mounting holes.
- Using four M2 screws, both are secured together.
ELECTRONICS & BODY ASSEMBLY
- First, we place the lithium cell in its place inside the main body, followed by positioning the Medic Mini PCB by aligning it over the two mounting holes provided inside the main body.
- Using two M2 screws, the Medic Mini PCB is secured in place.
- At last, we position the LED PCB in its place, and it is secured using some hot glue. After letting it cool, the whole assembly process has been completed.
MAIN CODE
This was the main code, and let's have a quick breakdown.
In this code, we use three main libraries. The WiFi.h library connects our ESP32 to Wi-Fi and allows us to use functions like WiFi.begin, WiFi.status, and WiFi.localIP.
Next is WebServer.h, which lets us create a simple HTTP web server on the ESP32 for hosting our LED-controller webpage.
And finally, we use the FastLED library, which handles all the control for the WS2812B RGB LEDs.
Let’s begin with the LED configuration, which defines the GPIO pin we used (GPIO5), the number of LEDs (7), and the LED array.
Wi-Fi Credentials
This allows the ESP32 to connect with our home Wi-Fi.
WebServer Setup
We use the section below to create a web server on port 80, which is the default HTTP port.
The above section defines which lighting mode is active; there are a total of four modes: static, ocean animation, fire animation, and off mode.
Webpage HTML (WebApp UI)
This stores the entire webpage UI:
- Color wheel (circular picker)
- Three round buttons (Ocean / Fire / Off)
- All CSS styling
- All JavaScript logic
Then we have three request handlers, which serve the webpage, handle the color picker, and handle the mode buttons.
We have added two types of animations in the code. The first is the ocean animation that changes color from blue to green and all the colors in between, not using the color red entirely.
Second is the fire animation that displays a fire-like glow with flickering to imitate glowing fire.
After uploading the sketch and letting the ESP32 connect to our Wi-Fi, we open the Serial Monitor and set the baud rate to 115200. Once the ESP32 connects, it prints an IP address in the Serial Monitor. We simply copy this IP address and paste it into any browser connected to the same local Wi-Fi network, and this opens our web app.
RESULT
And here it is—the final result of this simple yet surprisingly bright build! A repurposed glass brick transformed into a glowing, modern RGB lamp that you can control from your phone, tablet, or practically any device on your Wi-Fi network. It looks absolutely stunning in person and instantly upgrades the aesthetic of a living room, bedroom, or wherever you decide to place it.
Through a bit of creativity, some custom 3D design , and a handful of electronics, we took an ordinary leftover glass brick and turned it into a stylish, app-controlled décor piece.
Overall, the project was a success, and all design files, code, and resources related to this build are attached on the project page.
Thanks for reaching this far, and I will be back with a new project pretty soon.
Peace.