Wi-Fi Touch Lamps

Low-cost capacitive touch lights for staying connected with loved ones

2019IoTEmbedded SystemsHardwareGitHub

Overview

Stay connected across any distance with these WiFi-enabled LED touch lights. Touch your lamp, and your partner's lights up too — a meaningful way to show you're thinking of them no matter where you are.

This project was inspired by Filimin lamps, but built from scratch at a fraction of the cost. Original Filimin lamps are built in nearly the same way as these lamps, using a custom PCB with an ESP and the same conductive paint for the touch surface. A pair of these DIY lamps costs around ~$50 to build, compared to $150+ for Filimin lamps.

How It Works

The lamps communicate over WiFi using MQTT, a lightweight messaging protocol designed for IoT devices. The outside of the lamp is covered in a black geometric pattern that is actually conductive paint, forming a large capacitive touch sensor. When you bring your hand close to the lamp:

  1. The ESP detects an increase in capacitance
  2. Your lamp changes to a random color and broadcasts its new color over MQTT
  3. All paired lamps receive the message and light up in the same color

Unlike the original Filimin lamps which polled a server and took up to 10 seconds to update, MQTT provides instant synchronization via its publish-subscribe model, making the lamps as close to real-time as possible. Wherever the lamps are in the world, they'll update simultaneously.

When the firmware is initially flashed to the ESP, it creates an access point, which when connected to, prompts the user to select a WiFi network and enter in a password. From this point on, the ESP will subscribe to updates from the MQTT broker server, which is hosted on Adafruit IO.

Parts List

The parts for the project are fairly straightforward:

ComponentPurpose
WeMos D1 MiniSmall ESP8266 microcontroller
16 LED Neopixel RingRGB LEDs
Bare Conductive Paint JarCapacitive touch surface
3.5" Square Wooden PlaqueBase
12" x 12" x 1/8" Acrylic SheetDiffuser (enough for 1 lamp)
Acrylic Cement #16Assembly
470kΩ ResistorTouch sensing circuit
USB Power SupplyPower
Black Spray PaintFinish

Technical Details

The firmware leverages several key libraries:

  • PubSubClient: MQTT client for real-time message passing
  • WifiManager: Creates an access point for easy WiFi configuration
  • Neopixel: Addressable LED control
  • CapacitiveSensing: Touch detection logic

If the lamp ever disconnects from its WiFi network, the WifiManager library automatically creates an access point. Users can connect to this AP from their phone and select a new network from a list, making the lamps easy to set up without any code changes.

A 470kΩ resistor is used for the capacitive sensing circuit, which is the maximum value I found that works reliably with the 3.3V logic of the WeMos D1 Mini.

Assembly

Here are some photos of the assembly process:

Here are the rough steps for assembly:

  1. Paint the touch surface: Apply Bare Conductive Paint to the inside of the acrylic. A ziploc bag with a cut corner works better than the pens Bare Conductive sells. Attach a small jumper to each panel and let the paint dry.
  2. Create the base: Cut a hole through the center of the base and drill out a channel underneath the base for the WeMos to sit in.
  3. Solder the panels together: Solder the panel jumpers together to create a single large sensor.
  4. Mount the electronics: Glue the WeMos to the channel underneath the base, with the micro USB port flush with the back.
  5. Mount the Neopixel ring: Glue the Neopixel ring to the top of the base and route all wires through the hole in the base.
  6. Connect the touch sensor: Solder the combined panel jumper to a wire connected to a 470kΩ resistor and then to the WeMos.
  7. Assemble the enclosure: Use acrylic cement to bond the pieces together and attach the base to the acrylic diffuser.