DEV Community

張旭豐
張旭豐

Posted on

Dev Log #0: The Lamp That Wakes Up When You Approach

Dev Log #0: The Lamp That Wakes Up When You Approach


What I'm Trying to Build

A small desk lamp that notices when someone walks by.

Not a motion sensor light — those are everywhere. I'm talking about something that feels like it's aware. When you're far away, it's dim, maybe sleeping. As you get closer, it brightens. When you're right in front of it, it's fully awake, warm, present.

The moment you step away, it slowly fades back. Not a sudden off — a reluctant return to sleep.

I want to make something that makes you feel like it was waiting for you.

Humanphobia LED Mask — an example of proximity-reactive wearable art
Humanphobia by youjin-c. This is the kind of "it knows you're there" feeling I want to create.


Why This Project

I've been writing about interactive art for a while. Reading about other makers' projects, analyzing what makes them work, thinking about the philosophy behind "it knows you're there."

But I haven't actually built one myself.

That's a problem. When I recommend parts or explain how sensors work, I'm drawing from documentation and secondhand knowledge. I can tell you what HC-SR04's datasheet says. I can describe the physics of ultrasonic ranging. But I can't tell you what it's like to hold a sensor in your hand, watch it fail because your housing blocks the signal, adjust, try again.

That gap matters. The difference between "I read about this" and "I built this" is the difference between a tutorial and a dev log.

So this is Dev Log #0. Not a tutorial — a record of what happens when I try to make something that feels alive.


The Concept

The Lamp That Wakes Up When You Approach

Physical form: A small box (maybe 10cm × 10cm × 10cm) with an acrylic panel on the front that diffuses light. Inside: an LED strip and a proximity sensor visible through the acrylic.

Ambient desk lamp — the atmosphere I'm aiming for

Behavior:

  • Far (> 80cm): Off or very dim, deep blue
  • Medium (30-80cm): Partially lit, transitioning to white
  • Close (< 30cm): Fully bright, warm white
  • Walking away: Slow fade back over 2 seconds, as if reluctant to sleep

The key word is slow. Most proximity-reactive things are instant — on/off, 0/1. I want gradation. I want it to feel like the lamp is breathing.


The Parts I'll Use

This is my parts list based on what I've researched. I'll update after I've actually bought and tested them.

WS2812B LED strip — individually addressable pixels
WS2812B LED strip: each pixel can be controlled independently, which is how we get smooth color gradation.

HC-SR04 ultrasonic sensor — measures distance by sound
HC-SR04: emits ultrasonic sound, measures how long it takes to bounce back. Gives distance in centimeters.

Arduino Nano — small, cheap, good enough
Arduino Nano: the brain. Small form factor, 16MHz, 14 digital pins — more than enough for this project.

Part Why Est. Cost
HC-SR04 ultrasonic sensor Gives distance in cm, works in dark, cheap $3-5
WS2812B LED strip (12 pixels) Individually addressable, lots of color options $5-8
Arduino Nano Small, cheap, good enough for this project $6-10
Acrylic panel (10cm × 10cm) Diffuses light, makes it look intentional $2-3
Jumper wires Connections $2-3
USB power bank or 5V adapter Power already have

Total estimate: $20-30

This is a parts list based on research, not firsthand experience. When I actually buy and test these, I'll know which ones I actually recommend.


What I Don't Know Yet

  1. Housing material — Should it be 3D printed? Laser cut? Cardboard prototype first?
  2. Sensor placement — Front, side, or top? Will the acrylic block the ultrasonic signal?
  3. LED diffusion — Will 12 pixels be enough? Is acrylic the right diffusion material?
  4. Power — Will the Nano run the LED strip and sensor reliably, or do I need a separate 5V supply?
  5. Code logic — How do I smooth the distance readings so the LEDs don't flicker?

These are the questions I'll answer by building.


Timeline

  • Day 1-2: Order parts, wait
  • Day 3: Wire up on breadboard, get sensor + LEDs working
  • Day 4: Write the behavior code (the gradation logic)
  • Day 5: Test the housing idea
  • Day 6: If it works, document. If not, debug.

I'll post updates as I go. Each dev log will cover one specific thing I tried — what worked, what didn't, what I learned.


Why I'm Sharing This

If you're trying to build something interactive, you might be in the same place I am now: reading about sensors, watching project videos, thinking about what you want to make.

This series is my attempt to actually do it. Not to create a polished tutorial — to show what it's like to go from "I want to make something that knows I'm there" to "I built something that knows I'm there."

I'll share the failures as honestly as the successes. The parts that don't work. The decisions I regret. The moments where something that should have taken an hour takes three.

That's the part tutorials leave out.


Dev Log #0 — the beginning. Parts on order.

Top comments (0)