Frosted Dome Mood Lamp
Turn a knob to pick any colour, press a button for steady, breathing or rainbow light.
Try it
Behavior simulation: shows what it should do. It does not run the code.
Try this: Turn the knob to pick a colour, press the mode button to try breathing and rainbow, then unplug and replug: it comes back the same.
Controls
- Colour knob
- Mode button
What it does
- Light ring colour
- Dome glow
- Brightness
- LED current draw (capped near 1 A)
- Rainbow flow around ring
- Knob position
- Status
What it does
A table lamp with a frosted dome sitting on a round base. Inside the base, a ring of 24 colour LEDs shines up into the dome, which spreads the light into a soft, even glow. Turning the knob on the front moves through the colours. Pressing the button switches between three modes: steady colour, slow breathing, and a rainbow that cycles on its own. It plugs into a normal USB phone charger.
Try it above: Turn the knob to pick a colour, press the mode button to try breathing and rainbow, then unplug and replug: it comes back the same.
Safety
- The LEDs are very bright up close, so don't stare into the ring with the dome off
- The base gets slightly warm at full white. Don't cover it with cloth
- Small parts and the cable can be a choking or tangle risk for very young children
- Use a proper 5 V USB charger rated at least 2 A. Weak or cheap chargers can overheat
What’s inside
21 parts. We buy, make and put these together for you.
Brain
Runs the program and makes the decisions.
- Arduino Nano1×
$25.70
The small brain that reads the knob and button and tells the lights what colour to show.
- 18 × 45 × 8 mm
- Firmware: arduino-cpp
- Memory use: Saves last mode and colour in built-in EEPROM
- Runs on: 5 to 12 V
- Draws: about 20 mA
list price, checked Oct 5, 2026 at a generic supplierView
Controls
What you press, turn or flip.
- Potentiometer 10 kΩ, linear, panel mount1×
$1.25
The colour knob: turning it picks the colour, or sets rainbow speed.
- 13 × 18 × 25 mm
- Value: 10 kohm linear
- Runs on: 0 to 20 V
- Draws: about 0.5 mA
list price, checked Oct 6, 2026 at SparkFunView - Panel-mount push button, 16 mm1×
$0.95
The mode button: each press moves to the next light mode.
- 18 × 18 × 29 mm
- Pullup: uses the board's built-in pull-up
- Runs on: 0 to 12 V
- Weight: 4.6 g
list price, checked Oct 5, 2026 at AdafruitView
Lights, sound and screen
How it tells you what it is doing.
- WS2812B addressable RGB LED ring, 24 LEDs1×
$9.00
The ring of 24 colour lights that shines up into the dome.
- 86 × 86 × 7 mm
- Supply: 5 V
- Led count: 24
- Outer diameter: 86 mm
- Max current full white: about 1.4 A (capped to 1 A in firmware)
estimate
Motion
Everything that moves.
- Knurled knob cap for 6 mm shaft, 25 mm1×
$1.00
A comfortable grip that fits on the colour knob's shaft.
- 25 × 16 × 25 mm
- Shaft: 6 mm
- Diameter: 25 mm
estimate - Silicone rubber feet, 12 mm, self-adhesive4×
$0.60
Stop the lamp sliding and scratching the table.
- 10 × 10 × 0.3 cm
- Diameter: 12 mm
estimate
Power
Where its energy comes from.
- USB-C power-only panel socket breakout (5 V)1×
$2.50
The socket on the back where the USB cable plugs in to power the lamp.
- 12 × 4 × 5 mm
- Type: USB-C, with 5.1 kohm CC resistors for 5 V
- Rating: 3 A
estimate - USB wall charger 5 V 2.4 A (UL listed)1×
$7.00
A proper, strong-enough charger so the lamp gets steady, safe power.
- 34 × 41 × 34 mm
- Output: 5 V 2.4 A
estimate
Small electronics and wiring
Resistors, connectors and cables that join it all up.
- Resistor, 1/4 W (any common value)1×
$9.95
Sits in the light ring's data wire to keep the signal clean and protect the first LED.
- 6 × 3 × 3 mm
- Value: 330 ohm
- Runs on: 0 to 250 V
Pack of 500, you use 1, the 499 spares are yours.
list price, checked Oct 5, 2026 at SparkFunView - Electrolytic capacitor 1000 µF 10 V1×
$0.40
A small power reservoir beside the LED ring that smooths sudden jumps in current.
- Value: 1000 uF
- Voltage: 10 V or higher
estimate - Resettable fuse (polyfuse) 1.5 A1×
$0.30
Cuts the power safely if something ever draws too much current, then resets itself.
- Hold current: 1.5 A
estimate - USB-A to USB-C cable, 1.5 m, braided1×
$3.00
Connects the lamp to a USB phone charger.
- 14 × 56 × 7 mm
- Length: 1500 mm
estimate - Perma-Proto half-size solderable breadboard PCB1×
$4.50
The circuit board inside the base that holds the brain, fuse and capacitor together.
- 81 × 51 × 2 mm
- Weight: 12 g
list price, checked Oct 5, 2026 at AdafruitView - Hook-up wire 22 AWG solid core, 6 x 25 ft1 sets
$15.95
Short wires linking the knob, button, socket and light ring.
- 25 × 5.1 × 5.1 cm
- Weight: 340.7 g
list price, checked Oct 5, 2026 at AdafruitView - Heat-shrink tubing assortment1 packs
$4.95
Covers wire joints so nothing can short out.
- 15 × 0.5 × 0.5 cm
list price, checked Oct 5, 2026 at AdafruitView
Body and structure
The case, frame and panels.
- Round lamp base, 3D printed1×
$6.00
The round body that holds the electronics, the knob and button, and the dome on top.
- 15 × 15 × 4.4 cm
- Features: knob and button holes front, USB-C slot back, vent slots
- Material: PLA, matte
- Height: 45 mm
- Diameter: 150 mm
Made by usestimate - LED ring mounting plate with reflector, 3D printed1×
$1.50
Holds the light ring flat and centred so it shines straight up into the dome.
- 12 × 12 × 1.4 cm
- Material: white PLA
- Diameter: 120 mm
Made by usestimate - Base bottom cover, 3D printed1×
$1.50
Closes the underside of the base and is screwed on so little fingers can't reach inside.
- 15 × 15 × 0.3 cm
- Material: PLA
- Diameter: 146 mm
- Thickness: 3 mm
Made by usestimate - Frosted opal acrylic dome, 140 mm, with lip1×
$12.00
The milky dome that spreads the light into a soft, even glow.
- 15 × 15 × 14 cm
- Material: opal acrylic, shatter resistant
- Height: 115 mm
- Diameter: 140 mm
estimate
Fixings
Screws, bolts and ties that hold it together.
- Brass heat-set insert, M3 x 4 mm8×
$5.95
Strong metal threads inside the printed base so screws hold firmly.
- 4 × 4 × 4 mm
Pack of 50, you use 8, the 42 spares are yours.
list price, checked Oct 5, 2026 at AdafruitView - M3 socket head screw (6-30 mm)8×
$9.99
Fix the circuit board, ring holder and bottom cover in place.
- 6 × 6 × 13 mm
- Length: 8 mm
Pack of 1120, you use 8, the 1112 spares are yours.
list price, checked Oct 5, 2026 at AmazonView
Parts total (21 lines)
$123.99
$79.19 from supplier list prices, $44.80 estimated. Preparation and shipping are added when you order.
How it goes together
The step-by-step instructions that come with your order, 4 steps. Try them here first.
Before you start
Frosted Dome Mood Lamp goes together in 4 steps, about 16 min in all. No soldering and no coding.
Already done in our workshop
- Print the base, LED plate and bottom cover
- Build the control board
- Fit the LED ring and controls into the base
- Load the program and test
- Close up, burn-in and pack
4 steps
Code
The code it runs1 file, 276 lines. We load it onto the board for you.
Uses: Adafruit NeoPixel
/* ============================================================ TINKERLY GLOW DOME LAMP - firmware for the Arduino Nano ============================================================ What this program does, in plain words: - A ring of 24 colour LEDs inside the base lights up the frosted dome. - The KNOB on the front picks the colour: turning it from one end to the other goes red -> orange -> yellow -> green -> blue -> purple -> red. - The BUTTON steps through three modes, in this order: 1. Steady : one calm colour, chosen by the knob. 2. Breathing : the chosen colour slowly fades up and down, one full breath every 4 seconds. 3. Rainbow : colours flow around the ring by themselves; the knob sets how fast (slow to quick). - The button is "debounced": the tiny electrical chatter inside a switch is ignored, so one press changes the mode exactly once. - Brightness is limited so the LEDs never pull more than about 1 A from the USB charger (safe for the cable, fuse and charger). - The lamp remembers its mode and colour in the Nano's built-in memory (EEPROM), so after unplugging it starts the same way. Wiring used (must match the build): D4 -> 330 ohm resistor -> LED ring DIN (data) A6 -> knob (potentiometer) middle pin D2 -> mode button (other side of button goes to GND) Library needed: Adafruit NeoPixel ============================================================*/ #include <Adafruit_NeoPixel.h>#include <EEPROM.h> // ---------- Pins (exactly as wired) ----------const uint8_t PIN_LED_DATA = 4; // D4 -> resistor -> ring DINconst uint8_t PIN_KNOB = A6; // knob wiper (A6 is analog-only on the Nano)const uint8_t PIN_BUTTON = 2; // button to GND, uses internal pull-up // ---------- LED ring ----------const uint8_t NUM_LEDS = 24;Adafruit_NeoPixel ring(NUM_LEDS, PIN_LED_DATA, NEO_GRB + NEO_KHZ800); // ---------- Modes ----------enum Mode : uint8_t { MODE_STEADY = 0, MODE_BREATHING = 1, MODE_RAINBOW = 2 };uint8_t mode = MODE_STEADY; // ---------- Brightness and power limits ----------const float LEVEL_STEADY = 0.80; // steady / rainbow brightness (80 %)const float BREATH_MIN = 0.10; // dimmest point of a breath (10 %)const float BREATH_RANGE = 0.70; // breath goes 10 % .. 80 %const float BREATH_PERIOD_S = 4.0; // one breath every 4 secondsconst float MA_PER_CHANNEL = 20.0; // one LED colour at full = ~20 mAconst float LED_BUDGET_MA = 900.0; // LEDs may use at most ~0.9 A (board uses the rest) // ---------- Rainbow speed (degrees of colour per second) ----------const float RAINBOW_MIN_SPEED = 10.0;const float RAINBOW_MAX_SPEED = 180.0; // ---------- Button debounce ----------const unsigned long DEBOUNCE_MS = 30; // switch must be stable this longconst unsigned long LOCKOUT_MS = 200; // and at least 0.2 s between mode changesbool buttonStable = HIGH; // HIGH = not pressed (pull-up)bool buttonLastRead = HIGH;unsigned long buttonChangedAt = 0;unsigned long lastPressAt = 0; // ---------- Knob ----------float knobSmooth = 0; // smoothed knob reading 0..1023float hueDeg = 0; // chosen colour, 0..360 degreesfloat knobAtStartup = 0; // knob position when powered onbool knobTakenOver = false; // false = still using the saved colourconst float KNOB_WAKE_COUNTS = 15; // knob must move this much to override saved colour // ---------- Rainbow position ----------float rainbowPhase = 0; // 0..360 degrees // ---------- Timing ----------const unsigned long FRAME_MS = 16; // ~60 updates per secondunsigned long lastFrameAt = 0; // ---------- Saved settings (EEPROM) ----------const int EE_ADDR_MAGIC = 0;const int EE_ADDR_MODE = 1;const int EE_ADDR_HUE = 2; // 2 bytesconst uint8_t EE_MAGIC = 0x5A; // marks "settings have been saved before"const unsigned long SAVE_DELAY_MS = 3000; // save 3 s after the last change (saves memory wear)bool needsSave = false;unsigned long changedAt = 0;uint8_t savedMode = 255;uint16_t savedHue = 65535; // ============================================================// Helpers// ============================================================ // Read the knob several times and average, for a steady value.int readKnobRaw() { long sum = 0; for (uint8_t i = 0; i < 4; i++) sum += analogRead(PIN_KNOB); return sum / 4;} // Remember that something changed; it will be saved a bit later.void markChanged() { needsSave = true; changedAt = millis();} // Load mode and colour from memory (or sensible defaults on first use).void loadSettings() { if (EEPROM.read(EE_ADDR_MAGIC) == EE_MAGIC) { uint8_t m = EEPROM.read(EE_ADDR_MODE); uint16_t h = EEPROM.read(EE_ADDR_HUE) | (EEPROM.read(EE_ADDR_HUE + 1) << 8); mode = (m <= MODE_RAINBOW) ? m : MODE_STEADY; hueDeg = (h <= 360) ? h : 0; } else { mode = MODE_STEADY; hueDeg = knobSmooth * 360.0 / 1023.0; } savedMode = mode; savedHue = (uint16_t)hueDeg;} // Write settings only if they really changed (EEPROM.update skips same values).void saveSettingsIfNeeded(unsigned long now) { if (!needsSave || now - changedAt < SAVE_DELAY_MS) return; uint16_t h = (uint16_t)(hueDeg + 0.5); if (h > 360) h = 360; if (mode != savedMode || h != savedHue) { EEPROM.update(EE_ADDR_MAGIC, EE_MAGIC); EEPROM.update(EE_ADDR_MODE, mode); EEPROM.update(EE_ADDR_HUE, h & 0xFF); EEPROM.update(EE_ADDR_HUE + 1, h >> 8); savedMode = mode; savedHue = h; } needsSave = false;} // Turn a colour angle (0..360) and a brightness (0..1) into an LED colour.uint32_t colourFrom(float hue, float level) { while (hue >= 360.0) hue -= 360.0; while (hue < 0) hue += 360.0; uint16_t h16 = (uint16_t)(hue * 65535.0 / 360.0); uint8_t v = (uint8_t)constrain(level * 255.0, 0, 255); // gamma32 makes fades look smooth to the human eye return ring.gamma32(ring.ColorHSV(h16, 255, v));} // ============================================================// Button: debounced, one press = one mode change// ============================================================void handleButton(unsigned long now) { bool reading = digitalRead(PIN_BUTTON); if (reading != buttonLastRead) { // something moved: restart the timer buttonLastRead = reading; buttonChangedAt = now; } if (now - buttonChangedAt >= DEBOUNCE_MS && reading != buttonStable) { buttonStable = reading; if (buttonStable == LOW && now - lastPressAt > LOCKOUT_MS) { // a real press lastPressAt = now; mode = (mode + 1) % 3; // steady -> breathing -> rainbow -> steady markChanged(); } }} // ============================================================// Knob: colour in steady/breathing, speed in rainbow// ============================================================void handleKnob(float dtSeconds) { // Gentle smoothing so the colour never flickers knobSmooth += (readKnobRaw() - knobSmooth) * 0.2; // After power-up, keep the saved colour until someone turns the knob if (!knobTakenOver && fabs(knobSmooth - knobAtStartup) > KNOB_WAKE_COUNTS) { knobTakenOver = true; } if (mode != MODE_RAINBOW) { if (knobTakenOver) { float newHue = knobSmooth * 360.0 / 1023.0; // full turn = full colour circle if (fabs(newHue - hueDeg) >= 1.0) markChanged(); hueDeg = newHue; } } else { // Rainbow: knob sets the speed, 10..180 degrees per second float speed = RAINBOW_MIN_SPEED + (RAINBOW_MAX_SPEED - RAINBOW_MIN_SPEED) * (knobSmooth / 1023.0); rainbowPhase += speed * dtSeconds; while (rainbowPhase >= 360.0) rainbowPhase -= 360.0; }} // ============================================================// Draw the ring, with the power limit applied// ============================================================void drawRing(unsigned long now) { uint32_t frame[NUM_LEDS]; if (mode == MODE_RAINBOW) { // Each LED is a different colour, spread around the full circle for (uint8_t i = 0; i < NUM_LEDS; i++) { float h = rainbowPhase + i * (360.0 / NUM_LEDS); frame[i] = colourFrom(h, LEVEL_STEADY); } } else { float level = LEVEL_STEADY; if (mode == MODE_BREATHING) { float t = now / 1000.0; level = BREATH_MIN + BREATH_RANGE * (0.5 - 0.5 * cos(t * 6.2832 / BREATH_PERIOD_S)); } uint32_t c = colourFrom(hueDeg, level); for (uint8_t i = 0; i < NUM_LEDS; i++) frame[i] = c; } // Estimate how much current these colours would draw float totalMa = 0; for (uint8_t i = 0; i < NUM_LEDS; i++) { uint32_t c = frame[i]; uint16_t sum = ((c >> 16) & 0xFF) + ((c >> 8) & 0xFF) + (c & 0xFF); totalMa += sum * (MA_PER_CHANNEL / 255.0); } // If over budget, dim everything evenly so it stays under ~1 A float scale = 1.0; if (totalMa > LED_BUDGET_MA) scale = LED_BUDGET_MA / totalMa; for (uint8_t i = 0; i < NUM_LEDS; i++) { uint32_t c = frame[i]; uint8_t r = ((c >> 16) & 0xFF) * scale; uint8_t g = ((c >> 8) & 0xFF) * scale; uint8_t b = (c & 0xFF) * scale; ring.setPixelColor(i, r, g, b); } ring.show();} // ============================================================// Start-up// ============================================================void setup() { pinMode(PIN_BUTTON, INPUT_PULLUP); // button pulls D2 to GND when pressed ring.begin(); ring.setBrightness(255); // we limit brightness ourselves ring.clear(); ring.show(); // start dark, no flash at power-up knobSmooth = readKnobRaw(); knobAtStartup = knobSmooth; loadSettings(); // restore last mode and colour lastFrameAt = millis();} // ============================================================// Main loop: no long delays, everything runs on timers// ============================================================void loop() { unsigned long now = millis(); handleButton(now); // checked every pass for crisp presses if (now - lastFrameAt >= FRAME_MS) { // about 60 times a second float dt = (now - lastFrameAt) / 1000.0; lastFrameAt = now; handleKnob(dt); drawRing(now); } saveSettingsIfNeeded(now); // remember settings once things settle} 


Comments
No comments yet
Sign in to comment. It is free.