Clapper LED Candle

by sbkirby in Circuits > Arduino

27799 Views, 149 Favorites, 0 Comments

Clapper LED Candle

candle_vc2.gif
image_sketchup_main_view.jpg
Clapper LED Candle

Three years ago I saw "My New Flame" by MORITZ WALDEMEYER, INGO MAURER UND TEAM 2012 at the museum gift shop, and feel in love with the idea. I hoped to recreate something mesmerizing, enjoyable, functional and interesting to watch, but with a slight twist. I certainly couldn't make anything comparable to the their beautiful work of art. Therefore, I created a Clapper version of an LED Candle. Clap twice to turn the candle ON or OFF. The Clapper feature is optional, and can be turned ON or OFF if included in the build. Or, this feature may be omitted from the build entirely.

There are seven of these around my house which I use as ornamental candles and night lights. I keep them plugged into a 5 VDC Cell Phone Charger to power the unit, and to recharge the Li-Ion battery. One charge can last around 18 hours, which makes them great for emergency lighting.

Note: The Candle in the video on the right side with a cover isn't a Clapper Candle.

Parts and Tools

parts.png

Parts Needed for Project:

With Clapper (Optional):

Tools:

Acrylic Base Assembly

Screenshot 2019-01-18 13.20.53.png
Screenshot 2019-01-20 12.48.39.png
Screenshot 2019-01-20 12.45.24.png
Screenshot 2019-01-20 12.39.21.png
Screenshot 2019-01-20 13.39.58.png
Screenshot 2019-01-18 13.19.59.png
Screenshot 2019-01-18 13.19.45.png

Using the PDF Vector drawings supplied, the tool paths for cutting out the acrylic can be created. Each PDF file contains Top, Bottom, two Sides and a small rectangle that is used as a spacer underneath the Sound Module. This part is not needed if you're building the non-Clapper (without Sound) version of this LED Candle.

I used a 1/8" end mill to cut the majority of the parts, and I ran a finishing pass with a 1/16" end mill. The 1/16" end mill is required for the narrow slots on the sides and top.

The mounting holes were manually located and drilled by hand. Some of the holes should be drilled prior to assembly. For example, the holes to mount the PowerBoost board.

Sand and test fit the all the pieces. I recommend using Plast-I-Weld to bond the pieces together.

Note: The diameter of the top and bottom must be sized to the inside diameter (ID) of the resin candle bodies you purchase.

Circuitry With and Without Clapper

Candle_Flame_without_clapper_schem.png
Candle_Flame_with_clapper_schem.png

The basic LED Candle circuitry consist of a battery, switch, power supply and Candle Printed Circuit Board (PCB) with a LED Charlieplexed Matrix, Charlieplexed Matrix Driver and Arduino Pro Mini 5 VDC. An assembled version of the Candle Circuit Board can be seen above. The only connection to this PCB is 5 VDC provided by the power supply. The battery is connected to the PowerBoost power supply, which can charge the Li-Ion battery, and provide protection for a low voltage battery. The power supply also provides a means of switching the Candle ON or OFF by grounding the EN connection via the switch.

The Clapper PCB includes a solid state relay (LCB710) and microcontroller (ATTiny85) to process the signals from the Sound Module and control the power to the Candle PCB. The ATTiny85 is programmed to listen for two loud simultaneous sounds, and toggle the relay ON or OFF. Unfortunately, this configuration cannot distinguish a clap from any other loud sounds, therefore, the circuit will activate if any two loud sounds are heard simultaneously.

I installed a DIP-8 socket on the Clapper PCB to make it easy to install or remove the ATTiny85. All other components can be soldered to the board.

Connect pins 1&2 of J1 for normal operation. Secondly, connect the + & - pins of the Clapper PCB to the + & - of the Candle PCB. Connect the 5V & GND of the PowerBoost power supply to the + & - of "PWR IN" connections of the Clapper PCB. Connect the Mini Toggle Switch SPDT to the "CLAPPER" connection. Connect the pole of the switch to C and the other two connections as desired. Finally, connect the VCC and GND of the Sound Module to the + & - of "SND MOD", and the OUT to the Out connection of the Clapper PCB.

Printed Circuit Boards

candle flame pcb front and back.png
candle_flame_pcb_2_0002.jpg
candle_flame_pcb_2_0001.jpg
Screenshot 2019-01-19 11.00.59.png
Screenshot 2019-01-19 10.37.50.png

Attached are the Gerber files I created with KiCad to order the two Printed Circuit Boards. I recently ordered 10 of the Candle Flame PCBs for $5. It so happens, I ordered twice as many boards at half the price of my original 2016 order.

Printed Circuit Board Assembly

PCB A-3.jpg
PCB A-8.jpg
PCB A-10.jpg
PCB A-12.jpg
PCB A-14.jpg
PCB A-16.jpg
PCB A-20.jpg
PCB A-23.jpg
PCB A-26.jpg
  1. Install the male headers from the back of the PCB with longest portion protruding out the front. Do not install male header where indicated.
  2. Secure the headers to the back, and flip the board. Solder all header pins on the front side of PCB.
  3. Trim all pins, as indicated in photo, flush to the board.
  4. Orient the Top of the LED Charlieplexed Matrix as seen in photo.
  5. Flip LED Matrix over and install LEDs UP, and solder module to pins.
  6. Solder header to Arduino Pro Mini Board ATMEGA328P 16MHz 5V and solder from bottom of PCB with the longest portion protruding from top of PCB. This will be used later to program the Arduino. After soldering the header, I recommend prying the plastic portion of the header off of the pins. This is because the length of the pins will be trimmed prior to mounting the PCB in the Acrylic Base.
  7. Flip the PCB over to the back and fit the Ardiuno onto the header pins and solder.
  8. Orient and mount the Matrix Driver on the pins at the top of the back and solder.
  9. Attach the USB to UART TTL Module to the header pins of the Arduino. 5 VDC -> VCC, GND -> GND, TX -> RX, RX -> TX.
  10. Connect USB of module to PC and open Arduino IDE to load program.

Programs for Arduino Pro Mini and ATTiny85

Adafruit provides a tutorial on the use of the LED CharliePlexed Matrix and Driver at Animated Flame Pendant. I used the same sketch for my Arduino Pro Mini, but change the data.h to a flame of my making. This tutorial provides everything you need to get started with the LED CharliePlexes.

The ATTiny85 uses a sketch I found at Henry's Bench - Arduino Sound Detection Sensor: Tutorial and User Manual. This page will guide you through the configuration and tuning of the Sound Sensor Module and Arduino. My sketch (ClapperCandle_V2.ino) for the ATTiny is almost identical to his example.

Final Assembly

candle_d-8.jpg
candle_d-6.jpg
candle_d-2.jpg
image_cnc_1.jpg
image_cnc_2.jpg

Once the PCBs have been assembled, they can now be installed on the acrylic base. As mentioned before, the drilling of holes is recommended prior to gluing. If you are building the Clapper version, the rectangular spacer piece cut out earlier is located on the side of the Sound Module mounting location. This can be seen in the photo above. The Clapper PCB is mounted below the Sound Module and on the same side.

Wire the PowerBoost 500 power supply to the battery and main power switch, and if the Clapper PCB isn't used wire the 5 VDC and GND directly to the "PWR IN" connection of the Candle PCB. Otherwise, wire the output voltage of the power supply to the + & - of the Clapper PCB. Wire the SPDT toggle switch to the "CLAPPER" connections as instructed previously, and connect the Sound Module to the "SND MOD" as instructed earlier. The respective connections (+ - TRG) of the Clapper PCB are connected to the Candle PCB. The TRG connection is not connected to anything.

Check your wiring against the schematics, and when you're ready install the battery and turn it ON.

The resin Candle requires a hole for the micro USB cable to connect to the power supply. Therefore, I mounted these on my CNC and cut a hole the correct distance from the bottom.

ENJOY!