ESP32 UFO Lamp
This post documents my UFO Lamp — a quirky, mood-setting centerpiece now living in my lounge room. The lamp uses RGB LEDs to light up a 3D-printed flying saucer, creating a warm and atmospheric glow when the room lights are off.
The idea for the project actually came about during the development of the second iteration of my all-sky camera. I had planned to use an acrylic dome to protect the wide-angle lens, and during prototyping I noticed the dome bore a strong resemblance to the classic UFO saucer design. Since the all-sky camera was going to be mounted atop a disused chimney — a perfect spot for both running cables and getting an unobstructed view of the sky — I thought: why not make the camera enclosure look like a UFO hovering above the house? A fun nod to passing motorists and late-night skywatchers.
However, that idea hit a snag. I quickly discovered that the acrylic dome would catch reflections from car headlights, ruining long-exposure star timelapses. Rather than scrap the whole thing, I decided to pivot. I repurposed the UFO design into a multicolour LED lamp — now adding a little extraterrestrial flair to my living room!
Design
The lamp is powered by an ESP32-C6 microcontroller, which has built-in WiFi. It hosts a lightweight HTTP webserver on my home network, letting me control the lamp through a web interface. From any device on the WiFi, I can turn the lamp on or off and switch between lighting modes — making it both a fun and functional addition to the room.
Mechanical Design
My original plan was to build the UFO using a laser-cut plywood frame clad in 1.2mm aluminium sheet. The idea was to TIG weld the seams for a clean, spacecraft-like finish. But I quickly discovered just how challenging (if not downright impossible) it is to TIG weld aluminium that thin without warping or burning through it — especially without high-end gear or extensive practice.
I then switched to a 3D-printed frame, which I fastened together before priming. To get a smooth, water-resistant, and metallic finish, I went through several cycles of painting and sanding — painting with metallic spray paint and using an orbital sander between coats to gradually build up a polished surface.
The acrylic dome — along with a gasket — was then attached to the top, in the spot where the camera would have originally been mounted. The whole assembly was mounted onto a clear acrylic tube, which not only gives the illusion that the UFO is levitating, but also doubles as a glowing “abduction beam” — perfect for abducting cattle (or at least suggesting it).
Electronics
For the internal electronics, I designed a custom PCB that serves both this project and my ESP32 Alert Panel, since they both use WS2812B (Neopixel) RGB LEDs. The board accepts an external high-current 5V DC input to power the LEDs, and also includes support circuitry for two input buttons and a stepper motor driver.
Originally, I planned to use the stepper motor to “levitate” a small cow model beneath the UFO using fishing line. Unfortunately, the motor kept losing steps when driven at 5V instead of 12V, and after some trial and error, I decided to abandon the levitating cow feature — at least for now.
The WS2812B LEDs are all wired in series. For this project, I used individual WS2812B LED PCB modules connected together in a single continuous string. The first ten LEDs are mounted to a 3D-printed fixture that aims their light downward into the acrylic tube, creating the glowing “abduction beam” effect.
Another thirty-six LEDs are arranged in a circular ring, with each one positioned to shine through small penetrations in the UFO frame. These were hot-glued into place and then soldered together using hookup wire.
Firmware
The firmware was written as an Arduino sketch. At the time I developed the code, the standard Arduino Neopixel library didn’t yet support the ESP32-C6. Fortunately, the development board includes a single onboard WS2812B LED used as a status light. I was able to adapt the example code for this LED — which uses the ESP32’s hardware Remote Control Transceiver (RMT) peripheral — to support full strings of WS2812B LEDs.
The code is structured using FreeRTOS, with two tasks running in parallel: one handles the HTTP server, WiFi connectivity, and stepper motor control; the other is dedicated to driving the LED animations.
There are currently three lighting modes:
- Pulse Mode – sends individual pulses of light moving around the outer edge of the UFO.
- Smooth Pulse Mode – similar to pulse mode, but with some brightness modulation to create a softer, more fluid effect.
- Wheel Mode – the most visually striking mode, it rotates a full colour wheel around the UFO by continuously adjusting the hue of each LED.
Originally, the web interface included buttons to control the stepper motor, but since that feature was abandoned, I’ve removed the motor controls from the UI.
Open Source
In the spirit of open source, I’ve attached a download link to a ZIP file containing everything you need to build your own UFO Lamp: the PCB project files from Altium Circuit Studio, the CAD models, and the complete Arduino sketch.