The heart of it is an Arduino Nano, and for those who are thinking of getting into electronics and/or coding, it’s a wonderful way to dive in. Just six connections needed on a quarter-size protoboard/breadboard: A 1K ohm resistor (or larger) between pins D2 and D4. A wire from pin D2 to a piece of tinfoil (the larger the foil, the more sensitive it will be). A strip of addressable LED lights (I used 3-pin, 5-volt WS2812 LEDs), power and ground wired to the Arduino’s 5v and ground pins, and the data wire to pin D6. I used a USB cable for power, so you can hook it up to a computer or an AC adapter (and so you can update the software without opening it up).
The outer shell is cherry-stained Proofgrade medium draftboard. It’s all friction-fit, no glue needed. Two patterns below:
The interior shell is white acrylic, with loose finger joints just to help keep its shape as you slide it into the outer shell. (One panel has a notch for the power cord; align it with the notched outer panel.)
Inside, slot the two vertical struts together to form an open frame. Mount the electronics on the square platform and fit that into the struts. The horseshoe-shaped piece is there to keep the power cable from popping out of the Arduino if someone trips on the cord.
Wind the LED strip through the holes in the struts, in a spiral. (Note: my lantern was meant for mood lighting, not bright illumination, so it uses 40 broadly spaced LEDs. If you want more LEDs, you may need to wire up the power separately from the Arduino to avoid overloading its built-in regulator.)
Slot the LED frame into the X-shaped holes in the base. Fit the outer shell together, slide it over the LEDs frame. Thread the power cable through the notch in the outer shell, and then slot the shell into the holes in the base.
Fit the inner shell together, and slide that between the LED frame and the outer shell. Again, make sure the notch fits over the power cable.
Hot-glue a square of tinfoil onto the square lid, then attach the wire from the Arduino to it. Power up the Arduino to verify that everything’s working, and when you’re satisfied that the magic smoke will remain safely inside the electronics, finish the assembly by fitting the lid onto the slots of the outer shell.
Sloppy Arduino code:
LEDLantern_CapTouch2.zip (1.8 KB)
Capacitance sensors can be twitchy, and depending on the tinfoil you use, the size of the tinfoil square, and the phase of the moon, you may need to adjust the THRESHOLD constant in the code. Uncomment the Serial lines to see what values the Arduino is reading off the foil.
And that’s it! Enjoy.