Intelligent Interaction
Follow Mode
The lamp continuously adjusts brightness based on hand distance. It feels organic and responsive.
- Median-of-three filtering
- Exponential Moving Average (EMA)
- Uniform LED driving
Smart Locking
Hold your hand steady for 800ms to lock the brightness. The system intelligently filters natural hand tremors.
- Adaptive stability band
- Noise analysis (8-sample window)
- Visual & Audio feedback
Palm-Off Gesture
A simple, intuitive gesture to shut it down. Bring your hand very close (≤ 2.8cm) and hold.
- 1.2s hold duration
- Anti-accidental wake window
- Zero-touch shutdown
Proximity Wake
The lamp sleeps with one eye open. Wave your hand to wake it up without touching anything.
- Low-power polling
- Distance-based arming
- False-positive rejection
Hardware Architecture
Components
- Microcontroller Arduino Uno / Nano
- Sensor HC-SR04 Ultrasonic
- Output 3x PWM LEDs
- Feedback Passive Buzzer
Pinout
- TRIG Pin 8
- ECHO Pin 7
- LEDs Pins 5, 6, 9
- BUZZ Pin 11
Under the Hood
1. Signal Processing
Raw sonar data is noisy. We clean it up using a 3-stage pipeline: Median Filter → Range Clamping → Exponential Moving Average. This ensures the light doesn't flicker even if your hand shakes.
2. State Machine
The system moves fluidly between states: FOLLOW (Tracking), LOCKED (Fixed Brightness), and OFF (Deep Sleep). Transitions are governed by strict timing windows to prevent accidental triggers.
3. Non-Blocking Audio
A custom event-driven buzzer engine queues beeps without using delay(), ensuring the
sensor loop never pauses while a sound is playing.
Future Roadmap
Sensing & Intelligence
Enhancing accuracy and adaptability.
- Machine-learned gesture classification
- Auto-calibrated distance bands
- Multi-sensor fusion for better accuracy
Expanded Capabilities
New ways to interact and connect.
- RGB fading with gesture
- BLE/IoT control integration
- Capacitive fallback sensing