IoT Interactive Button Lamp
A hobby project to construct a pair of internet-connected lamps with a magnet-ring rotary interface and capacitive touch control—designed, engineered, and programmed end-to-end.
Project Overview
Idea
Build two identical desk lamps that double as tactile Internet of Things (IoT) controllers. A rotating outer shell with a hidden magnet ring drives input; a capacitive copper pad provides click/hold gestures. RGB LEDs under a translucent PLA body glow through the surface for feedback and illumination.
What They Can Do
Because they’re networked, the lamps can control brightness and color, set kitchen timers, or even send color “messages” between devices anywhere in the world. As they are connected to the Arduino Cloud, they can be integrated into all Amazon, Alexa, or Google Home systems. The design avoids a traditional rotary encoder (which would be blocked by the axial touch pad) by sensing magnetic field rotation instead.
Technologies & Tools
How It Works
Magnet-Ring Rotation Sensing
A rotating outer housing carries a ring of 48 permanent magnets. Two hall-effect sensors are mounted 41.25° apart, producing out-of-phase magnetic signals. The microcontroller compares the phase relationship to determine direction and counts zero-crossings for steps, emulating an encoder without one. Because of the axial button and housing axis, traditional rotation sensing methods could not be used.
- Quadrature-style decoding from dual hall sensors
- Debounce and hysteresis to reject micro-jitter
- Adaptive step size for slow/fast user rotation
Capacitive Touch & Gestures
The top copper pad senses touch/hold/double-tap. Placing the pad on the rotation axis preserves symmetry and eliminates wiring through a spinning joint which would have required an expensive slip-ring. Gestures control modes (e.g., hold to pair, tap to confirm/send command) while rotation adjusts the selected parameters.
- Touch filtering with moving average + threshold tracking
- Tap/hold/double-tap gesture state machine
IoT Control & Use Cases
An IoT-enabled Arduino (ESP-class) publishes events and subscribes to commands. The pair can mirror each other’s color, act as remote dimmer knobs, or push values to home-automation systems. A single USB-C power port makes them desk-friendly.
- Bi-directional lamp-to-lamp color sync
- Timer & countdown indication via animations
- Home-automation hooks for lighting scenes
Build Details
Mechanical
Body: 3D-printed PLA Diffuser (translucent top section)
Mechanism: Rotating outer shell with embedded magnets
Touch Pad: Copper disc centered on axis
Rotation: Aligned on axis with 3x bearings (Also for added weight)
Electronics
Microcontroller: Arduino Nano 33 IoT (nRF52840 host with an ESP32 Wi-Fi module)
Sensing: Dual hall sensors (quadrature), capacitive touch IC
Lighting: Addressable LED ring under diffuser
Power: Built in USB-C power plug
Firmware
Language: C++
Features: Gesture finite-state machine, rotation decoding, Wi-Fi sync
Updates: Configurable modes & animations
Power & I/O
Power: USB-C 5 V
Control: Local gestures + network commands
Mount: Desk-friendly footprint
Project Gallery
Let's Connect
I'd be happy to discuss my experience in more detail or explore potential career opportunities.