Search models, users, collections, and posts

Acryl Picture Lamp Base - ESPHome/Homeassistant

IP Report

Print Profile(1)

All
A1 mini
H2C
P1S
A1
X1
H2D Pro
P1P
X1E
X2D
P2S
X1 Carbon
H2S
H2D
A2L

0.2mm layer, 2 walls, 15% infill
0.2mm layer, 2 walls, 15% infill
Designer
3.5 h
2 plates

Open in Bambu Studio
Boost
3
24
0
0
5
2
Released 

Description

🚀 Smart RGB Acryllamp with Mechanical MX-Switches

Make your boring Acryl picture lamp smart and colorful with this printed ESP base! This project is designed for Home Assistant via ESPHome, giving you full smart home control and automation possibilities.

Standalone & Offline Capable: Even though this is a Smart Home project, the lamp is fully functional offline. Once the initial setup with ESPHome is complete, you can use the physical mechanical switches to toggle power and cycle through colors without needing a Wi-Fi connection or Home Assistant server afterwards.

📐 Technical Specifications

  • Acryl Slot Dimensions: 5mm x 92mm
  • Control: ESP32-C3 SuperMini (Wi-Fi + Physical Switches)
  • Power: 5V via USB-C

🛠 Bill of Materials (BOM)

  • Your Acryl picture (5mm thick - you can get these on Amazon and Etsy)
  • Microcontroller: 1x [ESP32-C3 SuperMini]
  • LEDs: 1x [WS2812B RGB LED Strip] (10 LEDs total - Density 100 LED per meter))
  • Switches: 2x [Mechanical MX Switches] (e.g., Cherry MX, Gateron, etc.)
  • Wire: Thin 28-30 AWG wire (silicone wire recommended)
  • 3D Printed Parts: Main Housing, Baseplate, Keyplate, ESP Retainer.
  • Tools: Soldering iron, side cutters

 

🏗 Assembly Instructions

  1. Switch Prep: Press the round keycaps onto the MX switches.
  2. Keyplate Assembly: Press the MX switches into the Keyplate. Pay attention to the notches for a snap-fit.
  3. Soldering the ESP: Solder thin wires to the ESP32-C3.
    • Attention: Keep your solder joints very far "inside" (towards the center of the board). This is important so the ESP can slide into the guide rail without the solder blobs colliding with the plastic walls.
  4. Retainer: Slide the ESP retainer onto the Baseplate.
  5. LED Strip: Solder wires to the LED strip and stick it into the dedicated groove (nut) on the Baseplate.
  6. Switch Wiring: Solder the remaining wires to the MX switches. Once soldered, seat the Keyplate into the Main Housing.
  7. Board Mounting: Carefully slide the ESP into its guide rail. Be very cautious with the solder joints and thin wires during this step.
  8. Cable Management: Neatly route the cables inside the housing. A small piece of tape helps keep them organized and prevent the risk of pinching during assembly at the end.
  9. Closing the Case: Press the Baseplate onto the Main Housing.
    • Tip: Align and snap the single locking tab on the ESP-side first, then press down to snap the two tabs on the opposite side.

 

🔌 Wiring & Pinout

Follow the diagram and table below to ensure everything is connected correctly.

Attention: Since the SuperMini only has one easily accessible GND pin, pre-twist the ground wires from the LED strip and both switches together before soldering them to the GND pad.

Connection Table

ComponentESP32-C3 PinConnection Type
LED Strip VCC5V / VBUSPower Supply
LED Strip GND GNDCommon Ground
LED Strip Data GPIO 8Data Signal
Switch 1 (Power) - Pin AGPIO 2Digital Input
Switch 1 (Power) - Pin BGNDCommon Ground
Switch 2 (Color) - Pin AGPIO 3Digital Input
Switch 2 (Color) - Pin BGNDCommon Ground

💻 Software & Configuration (ESPHome)

Use the code below in your ESPHome dashboard. Adjust the WIFI and encryption key according to your setup. 

 

esphome:
 name: acryllamp
 friendly_name: AcrylLamp

esp32:
 board: esp32-c3-devkitm-1
 framework:
   type: arduino

# Speicher für den aktuellen Farb-Index (0 bis 9)
globals:
 - id: color_index
   type: int
   restore_value: no
   initial_value: '0'

# Logger für Fehlerdiagnose
logger:

# Home Assistant Anbindung
api:
 encryption:
   key: "yourencryptionkey"

ota:
 - platform: esphome
   password: "yourotapassword"

wifi:
 ssid: !secret wifi_ssid
 password: !secret wifi_password

 ap:
   ssid: "Acryllamp Fallback Hotspot"
   password: "yourpassword"

captive_portal:

# LED Konfiguration
light:
 - platform: neopixelbus
   type: GRB
   variant: WS2812
   pin: GPIO8
   num_leds: 10
   name: "Acryl Lamp LEDs"
   id: led_strip
   effects:
     - addressable_rainbow:
         name: "Regenbogen"
     - flicker:
         name: "Flackern"

# Taster Konfiguration
binary_sensor:
 # Taster 1 an GPIO 2: AN / AUS
 - platform: gpio
   pin:
     number: GPIO2
     mode: INPUT_PULLUP
     inverted: true
   name: "Power Button"
   on_press:
     then:
       - light.toggle: led_strip

 # Taster 2 an GPIO 3: FARBWECHSEL (10 Farben)
 - platform: gpio
   pin:
     number: GPIO3
     mode: INPUT_PULLUP
     inverted: true
   name: "Color Cycle Button"
   on_press:
     then:
       - lambda: |-
           // Zähler erhöhen und bei 10 zurücksetzen
           id(color_index) += 1;
           if (id(color_index) >= 10) {
               id(color_index) = 0;
           }
       - light.control:
           id: led_strip
           state: ON
           # Magenta ist bei Index 3 dabei {1.0, 0.0, 1.0}
           red: !lambda |-
             float c[10][3] = {
               {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 1.0},
               {1.0, 1.0, 0.0}, {0.0, 1.0, 1.0}, {1.0, 0.5, 0.0}, {0.5, 0.0, 1.0},
               {1.0, 0.8, 0.6}, {1.0, 1.0, 1.0}
             };
             return c[id(color_index)][0];
           green: !lambda |-
             float c[10][3] = {
               {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 1.0},
               {1.0, 1.0, 0.0}, {0.0, 1.0, 1.0}, {1.0, 0.5, 0.0}, {0.5, 0.0, 1.0},
               {1.0, 0.8, 0.6}, {1.0, 1.0, 1.0}
             };
             return c[id(color_index)][1];
           blue: !lambda |-
             float c[10][3] = {
               {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 1.0},
               {1.0, 1.0, 0.0}, {0.0, 1.0, 1.0}, {1.0, 0.5, 0.0}, {0.5, 0.0, 1.0},
               {1.0, 0.8, 0.6}, {1.0, 1.0, 1.0}
             };
             return c[id(color_index)][2];

Comment & Rating (0)

(0/1000)

License

This user content is licensed under the MakerWorld Exclusive License.

You may create derivative works based on this object, provided that all such derivative works are published exclusively on the MakerWorld platform and include proper attribution to the original creator. You may not share, upload, host, distribute, or publish this object—or any derivative work of this object—on any other digital platform, marketplace, or distribution channel. Commercial use of this object and any derivative works is strictly prohibited. This includes, but is not limited to, selling, renting, sublicensing, or using the object in any context in which you receive monetary compensation or other financial benefits.