From Energy Drink Can to Capacitive Touch Lamp
An ESP8266, a strip of WS2812B LEDs, and a single wire inside an empty Monster can — no touch sensor required.
From Energy Drink Can to Capacitive Touch Lamp
I had an empty Monster Energy can on my desk and thought it was too good to throw away. The aluminum shell is conductive, the shape is distinctive, and it has just enough space inside to fit an ESP8266 and a short LED strip. So I turned it into a touch lamp.
The trick is that you don't need a dedicated touch sensor. A long wire connected to the ESP's analog input (A0) and left sitting inside the can acts as a capacitive antenna. When you touch the outside of the can, your body changes the electric field enough to shift the analog reading. You just have to detect that delta reliably.
The wiring is minimal: D1 → WS2812B data, VIN → 5V, GND → GND, and one bare wire from A0 that hangs loosely inside the can. Cut the top off the can, drop the electronics in, and you're done. I filled the bottom with a bit of sand to give it some weight and keep it from tipping.
The threshold value (40 here) needs tuning depending on your wire length and environment. A bit of trial and error, but it stabilises quickly.
Total cost: ESP8266 NodeMCU ~€3, WS2812B strip I already had, Monster can: free (the best kind of part). Code on GitHub.