✦ How It Started?
For many children, nighttime can feel unfamiliar, vulnerable and sometimes even frightening. When the lights go out, ordinary objects can seem different, shadows become larger and the comfort of daytime disappears. This idea emerged from a personal experience with my younger sister, who often felt uneasy when the lights were turned off.
Watching those moments made me wonder whether a lamp could become more than a source of illumination. Could it create a sense of presence? Could light itself become a companion during those quiet moments before sleep?
✦ Project Proposal
Somnia is an interactive ambient lamp designed to provide companionship during nighttime moments through light, holographic visualization and intuitive interaction. By combining digital fabrication, embedded electronics and programming, the project creates a calming environment where light becomes both functional and experiential.
✦ Inspiration & References
The project was inspired by kinetic product design, atmospheric lighting installations, calm technology concepts and Pepper's Ghost holographic systems. Existing references often separate movement from emotional interaction, so this project aims to integrate both into a single cohesive object.
✦ Initial Sketches & Form Development
Multiple sketches and iterations were developed to explore the relationship between the holographic system and the overall emotional language of the lamp. The final direction evolved toward a soft mushroom-like silhouette with illuminated floating rings and a holographic central structure.
✦ What will you design?
All physical and electronic components are designed from scratch. The following elements were developed during the project:
Enclosure
- Lamp outer structure
- Mushroom-inspired form
- 3D printed parts
Holographic Chamber
- Acrylic reflector 45°
- Display housing
- Laser cut base
Electronics
- Custom PCB
- Touch interface
- WiFi web interface
Lighting
- NeoPixel system
- Color modes
- Diffuser dome
✦ Interaction Logic
The interaction system was designed to provide a simple and intuitive experience. Through touch and WiFi connectivity, users can control the lamp's lighting and holographic effects, allowing the different visual subsystems to work together as a unified ambient experience.
Interaction Logic
The lamp operates through two states: OFF and ON. A touch on the TTP223 sensor activates the NeoPixel lighting, holographic display, and WiFi interface. Additional touches cycle through three lighting modes, while the GC9A01 display continuously generates animations for the Pepper's Ghost holographic effect.
✦ Modeling the Enclosure
The enclosure was designed in OnShape / Shapr3D. The mushroom-inspired form references soft organic shapes while maintaining structural rigidity. The lamp is composed of three stacked sections: the upper translucent dome (diffuser), the central holographic chamber, and the lower base (electronics compartment).
Dome · NeoPixel ring · Structural rings · 45° Reflector · GC9A01 display · Base + PCB
Translucent Dome
PLA in vase mode. Wall thickness 0.8mm for optimal light diffusion without hot-spots.
Holographic Chamber
Cylindrical cavity with matte-black interior to eliminate light bleed. GC9A01 sits below facing upward.
Electronics Base
Laser-cut MDF with PCB mounting points and cable routing channels.
✦ 3D Print Settings
Printer: Bambu Lab — PLA / PETG filament
Layer height: 0.2mm standard · 0.12mm detail (dome)
Infill: 15% gyroid (rings) · Vase mode (dome)
Supports: None — all parts designed support-free
✦ Design Reflection
"The first dome print came out opaque — too thick. Iterating down from 1.2mm to 0.8mm wall thickness gave the right diffusion without losing structural integrity. The mushroom silhouette wasn't planned — it emerged from stacking the ring cross-sections."
✦ Cutting the Reflector
Two components were produced on the laser cutter: the acrylic 45° reflector that creates the Pepper's Ghost effect, and the MDF structural base ring. Both were designed in KiCad as 2D profiles and exported as DXF for the Epilog / Trotec workflow at Fab Lab Puebla.
Acrylic reflector outline + MDF base ring with mounting holes
Acrylic Reflector
0.5mm transparent acrylic. Low power / high speed to avoid edge melting. Bent to 45° with heat strip.
MDF Base
3mm MDF. Cutouts for PCB standoffs, cable routing, and USB-C power inlet. Sealed with matte black spray.
✦ Process Reflection
"Getting the acrylic reflector angle right took three test cuts. The 45° angle needs to be exact — even 2° off visibly shifts the projected image out of alignment with the chamber center."
✦ Designing the Custom Board
The custom PCB was designed in KiCad and milled on the Roland SRM-20 at Fab Lab Puebla. The board routes all connections from the XIAO ESP32-C6 to the four subsystems: GC9A01 display (SPI), NeoPixel ring (single wire), TTP223 touch sensor, and 5V power rail.
ESP32-C6 + GC9A01 + WS2812B + TTP223
✦ Pin Mapping — XIAO ESP32-C6
| Component | Signal | XIAO Pin | GPIO | Notes |
|---|---|---|---|---|
| GC9A01 Display | SCL / CLK | D8 | - | SPI clock |
| GC9A01 Display | SDA / MOSI | D10 | - | SPI data |
| GC9A01 Display | CS | D7 | - | Chip select |
| GC9A01 Display | DC | D5 | - | Data / command |
| GC9A01 Display | RST | D6 | - | Reset |
| NeoPixel Ring | DIN | D3 | - | WS2812B data in |
| TTP223 Touch | SIG | D2 | - | Digital input |
| NeoPixel Ring | VCC | 5V rail | - | External 5V 2A |
| GC9A01 / TTP223 | VCC | 3.3V | - | From ESP32-C6 reg |
✦ PCB Reflection
"The GC9A01 trace routing was tight — SPI lines needed to run together to minimize noise. First mill had a broken trace on the MOSI line; caught it with a multimeter before soldering. Second mill came out clean."
✦ Writing the Firmware
All firmware was written in C++ using the Arduino IDE with ESP32 board support (Espressif 3.x). Three libraries drive the main subsystems: TFT_eSPI for the GC9A01 display, Adafruit_NeoPixel for the WS2812B ring, and WebServer for the WiFi interface.
Subsystem 01
GC9A01 Hologram Animation
The display renders a looping animation — a rotating floating orb drawn with polar coordinate math directly on the TFT canvas. All shapes are generated procedurally at runtime to save memory and allow easy parameter tweaks.
Subsystem 02
NeoPixel Color Modes
Three color modes cycle on each touch event: warm white (default), warm yellow→orange (evening), and cool blue→purple (deep night). A gentle breathing animation pulses at 0.5Hz so the lamp always feels alive.
Subsystem 03
WiFi Web Interface
The ESP32-C6 serves a minimal web page on its local network exposing light mode selector and hologram animation switcher. No app required — works from any phone browser. Designed for one-handed use in the dark.
✦ Programming Reflection
"The hardest part was coordinating the display animation with the NeoPixel update without blocking delays. Moving to a non-blocking state machine — tracking elapsed time instead of using delay() — made everything run smoothly and allowed the WebServer to respond correctly even while the animation was running."
✦ Putting It All Together
Integration started on a protoboard — all four subsystems connected simultaneously and tested as a unified system before committing to the final PCB. Only after all functions worked together was the PCB milled and the enclosure assembled.
Step 01
Base Assembly
PCB mounted to laser-cut MDF base. USB-C cable routed through the base cutout. Touch sensor affixed to the front face.
Step 02
Display + Reflector Mounting
GC9A01 seated in its printed holder centered below the chamber. Acrylic reflector bent to 45° and clipped into the internal supports inside the cylindrical chamber.
Step 03
NeoPixel Ring + Structural Rings
NeoPixel ring press-fitted into the top structural ring. Wooden dowels aligned and inserted through all three stacked rings to lock the structure.
Step 04
Dome + Final Closure
Translucent dome placed on top. Final functional test: touch to power on, cycle through modes, verify WiFi connectivity, confirm hologram projection alignment.
- Animation renders at stable framerate
- SPI communication reliable at 40MHz
- No dropped frames observed
- All 3 color modes working
- Breathing animation smooth
- 5V supply adequate for 16 LEDs
- Debounce logic in place
- Single touch reliably detected
- No ghost triggers after 30 min test
- Web server functional
- Occasional latency on mobile Safari
- Core controls respond correctly
- Pepper's Ghost projection visible
- Centered in chamber correctly
- Best in low ambient light
- Board functional
- Minor trace rework on one pad
- Second revision planned
✦ What materials and components will be used?
✦ Estimated Components Cost
✦ What questions still need to be resolved?
- How visible is the holographic effect under normal room lighting conditions?
- What is the optimal brightness ratio between the OLED display and the NeoPixel ring to avoid washing out the hologram?
- Can all subsystems run simultaneously on the ESP32-C6 without timing conflicts or memory issues?
- How reliable is the WiFi connection when the lamp is used away from the router?
- What is the minimum enclosure volume that allows clean cable routing and proper heat dissipation?
✦ Final Goal
The final prototype aims to create a calm interactive object that transforms illumination into an emotional sensory experience through light and holographic atmosphere. Somnia is not just a lamp — it's a presence.
✦ What worked well
The non-blocking firmware architecture. The mushroom form emerging organically from the ring stack. The TFT_eSPI library's performance on the ESP32-C6 at 40MHz SPI — no dropped frames.
✦ What I'd do differently
Design the PCB before the enclosure, not after. The second revision would move the USB-C connector 3mm to align better with the base cutout. And add a real-time clock for a sunrise alarm mode.
✦ Future Directions
"The next version of Somnia would add a real-time clock module for a gentle sunrise simulation — gradually brightening from cool blue to warm white over 30 minutes before an alarm. That would complete the nocturnal companion concept: not just a presence in the night, but a bridge into the morning."