My wife and I were at a dinner a saw a candle center piece that had floating candles in glass cylinders. She liked it and wanted to get one. We found out later that it was something that the host of the dinner put together from various items that could be purchased from a local craft store. When we went out to purchase the pieces, I said to my wife "we can make this thing better with lights!"
Specifically, NeoPixels!
I quickly got the concept down in my head an began looking through the store for everything we needed, and of course, I would need to place an order with Adafruit.
The Basic ConstructionThe idea was to have the NeoPixel light reflect from the bottom of the floating candle. I needed to get something to raise the glass cylinders up a little. I also wanted to ensure that water could not easily get on the circuits.
I found a 12" x 12" wooden base (basswood canvas) and some plastic soap molds that would do the trick. Although the centerpiece we saw had three equal height glass cylinders we decided to by three different heights. We purchased nine floating (puck) candles (assuming we would burn through them) and a few bags of clear, glass rock filler for the bottom.
The candles will rest on the soap mold pieces by first cutting them into four individual pieces. The NeoPixel lights will be placed underneath the mold facing upward. The sketch will simply cycle through colors using the Adafruit NeoPixel Library.
All of the components are placed into the base and eventually covered with the filler to hide the wires.
We call this a holiday candle because added decorations can be changed for each holiday.
Construction of the CircuitIt doesn't matter if you start with the base or the circuit first, but it is more fun to have the circuit ready while constructing the base. I had the cylinders filled with water and the tops of the cylinders covered with Glad Press 'n Seal to keep them from spilling every time I moved them around.
Circuit Overview
The circuit consists of a Adafruit Trinket, and Lithium Ion Polymer battery and a USB charger along with three NeoPixels. I added a reset switch, a slide switch for power and four LED's for status.
Overall, it is a very straightforward design and doesn't take long to get running.
Preparing the LED's
The circuit has four status LED's . The blue LED indicates that the Trinket code is up and running. The red LED indicates that a power supply (via a USB cable) has been connected to the charger. The yellow LED indicates the battery is charging and the green LED indicates the battery is fully charged.
I started by preparing the LED's. The red, green and yellow LED's will have an inline resistor connected to them. I use a 220 Ω resistor for each (the blue LED will use a 330 Ω. I recommend that you breadboard the circuit first and get it working before attempting to solder components in place. You may also find, depending on your specific LED's that you need a larger or smaller resistor. The goal should be that all LED's have the about the same brightness. Only the blue LED will actually draw power from the battery in this circuit so you do not need to worry about reducing current draw to save battery life.
Start by cutting wires about 8 inches in length. I like to use a color that matches each LED color to keep wiring easier. Once a lot of wires start getting mixed together it can be easy to make mistakes.
Start by soldering a black wire to the cathode on each LED. Next, solder a green wire to the anode on the green LED, a red wire to the anode on the red LED and a yellow wire to the anode on the yellow LED. Now slide a 3/32" heat shrink tube about 2-3 inches in length over each of the wires. Again I use yellow for the yellow LED, red for the red LED and green for the green LED. Push them against the LED so the lead are completely covered and shrink them into place using the butane torch (see the hardware and tools list at the bottom).
Next solder one end of the resistor to the wire on the anode of each LED. Slide another heat shrink tube over the resistor and shrink it into place. The length of the tube should be long enough to cover the entire resistor and the bare wire.
Test each of the LED's by connecting them to a power source. If you have some jumper wires and a USB cable for your trinket you an power up the trinket and connect the cathode end to the ground pin and the anode end to the 3V pin.
Here are a few images of the LED's I prepared.
As for the blue LED, follow the same procedure with the exception of the resistor. The resistor for the blue LED will be soldered to the circuit board.
Connecting the Charge Status LED's
Connect the yellow, red and green LED's to the USB charger as follows:
1) Connect the anode's of all three LED's together by soldering a single wire to them and then covering the soldered connection with heat shrink tubing
2) Solder the end of the new wire from step 1 to the DC IN + pin on the USB charger
3) Solder the cathode lead of the red LED to the DC IN - pin
4) Solder the cathode lead of the yellow LED to the Status 1 pin
5) Solder the cathode lead of the green LED to the Status 2 pin
Preparing the NeoPixels
The NeoPixels will be connected together in series using three wires. The Data In and Data Out pins of the each NeoPixel are connected together to create a strip.
1) Cut 3 sets of 3 wires; one red, one black and one yellow about 8 to 10 inches each. This will result in a total of 9 wires (3 of each color). Optionally, you can have one yellow and 2 white wires. See the images below for an explanation.
2) Solder the black wire to the Gnd pad on the bottom of the NeoPixel on the side with Din. Solder the red wire to the 5V pad on the same side.
3) Solder the yellow wire to the Din pad.
4) Now solder a second black lead to the other Gnd pad on the same NeoPixel.
5) Solder a second red wire to the other 5V pad on the same NeoPixel.
6) Solder a second yellow wire to the Dout pad on the same NeoPixel.
7) This is the first NeoPixel in the chain. The Din wire will connect to Pin 0 on the Trinket.
8) Take the wire on the Dout side of the first NeoPixel and solder it to the Din pad of the next NeoPixel. Note that Dout of the first NeoPixel is connected to Din of the next NeoPixel.
9) Connect the black wire and red wire of the first NeoPixel to the Gnd and 5V pads on the Din side of the second NeoPixel.
10) Connect the third set of wires to the Dout side of the second NeoPixel in the same manner
10) Now connect the opposite end of the third set of wires coming from the second NeoPixel to the Din side of the third NeoPixel.
12) When completed, all of the 5V pads on the NeoPixels are connected together and all of the Gnd pads are connected together. The Dout of the first NeoPixel is connected to Din of the second NeoPixel. Dout of the second NeoPixel is connected to Din of the third NeoPixel.
Note in my circuit I used a yellow wire going to the the first NeoPixel to indicate the Din that connects to the Trinket. I connected the other NeoPixels using a white wire. This helps later to ensure the circuit is connected correctly.
It is a good idea to test the NeoPixels at this point. You can either use the Trinket or if you have an Arduino Uno connect the Ground and 5V to the Arduino. Connect the yellow wire going into the first NeoPixel to pin 6 on the Arduino. Use the strandtest.ino sketch that's comes as part of the Adafruit NeoPixel Library. Remember to set the NeoPixel count to 3!
If you have not yet installed the Adafruit NeoPixel library go to https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library for details.
Assembly of the Circuit
Follow the breadboard diagram on the bottom of the page to build the circuit. I highly recommend building the circuit on a breadboard before soldering the components to the PCB. I specifically used the Adafruit Perma Proto board so the circuit could easily be transferred from a breadboard to a permanent circuit. I used a 1/4 size Perma board. When bread boarding, you can use a half size or full size board. Keep all of the components in the first 15 columns of the board and you will be ok.
Here are some things to note about the Fritzing diagram that differ from the actual circuit:
- The battery in the diagram is 1300 mAh but I used a 1200mAh battery from Adafruit. There is also a 2200mAh battery available.
- The diagram shows NeoPixel strips. I am using the mini PCB NeoPixels. if your following this guide you have already soldered three of them together. The NeoPixel strip and he mini NeoPixels are connected in the same manner.
- The trim pot I used is different than the one in the diagram. I used a 500 Ω 28 turn trimmer that has the turn screw at the top. This trimmer is used to adjust the intensity of the NeoPixels.
- The momentary push button is optional. It is for a reset button,. The Trinket has a small reset button so I opted for a bigger one. I drilled a small hole in the plastic housing above the switch so it could be pushed in with a paper clip (the reset tool of choice for hard-core IT people).
After constructing the circuit on your breadboard, transfer it to the Perma Proto board and solder the wires and components in place. Test the circuit again when completed.
Construction of the BaseStart by taking an X-Acto knife and separating the soap molds into four pieces. I left all of the edges and only cut away the top portion with the labels. The edges are useful for taping the molds down to the base.
The image above shows how I cut the mold into four pieces and placed each piece. The three in the center are used to hold the candle cylinders and the fourth piece (long rectangle shape) covers the circuit. I also placed the battery under one of the candle bases.
In each of the two back pieces (where the first and second NeoPixel will go) I used a 1/2" drill bit to drill two holes in each side of the molds, opposite of each other so that I could pass the NeoPixels in an out of them. The third piece, closest to the circuit, I drilled the 1/2" holes in one side. In this piece I also notched out a small opening at the bottom with an X-Acto knife where the battery wire will pass through. This allowed me to place the battery underneath without needing to weave the battery wire through a hole.
On the fourth piece, which is the largest piece used to cover the electronics, I notched out three holes with the X-Acto knife. The first on the long side (right) where the LED wires and the NeoPixels wires will pass through. Note when notching this opening I also removed the bottom part of the plastic so the wires can rest against the wood bottom. The second hole is on the short side near the switch. This allows the switch wires to pass through. The last whole lines up with the USB port on the charger (not the Trinket's USB). This will align with the whole that is drilled into the side of the base to allow a USB cable to be inserted for charging the device.
Using the hot glue gun, attach the NeoPixels under the mold with the NeoPixel aligned in the center of each mold. Note, I place the hot glue on the wires on either side of the NeoPixel and not on the NeoPixel itself. I found that although the NeoPixels will work fine with hot glue on them, if I needed to peel the hot glue off for later some reason, it may also peel the printed circuit off of the back rendering the NeoPixel unusable.
Next I aligned the USB charger up so that it is against the left side of the base as flush as possible (getting the USB port as close as possible to the side). I marked and drilled four small holes in the top of the mold to line up with the holes on the charger's PCB and attached the USB charger to the plastic mold using nylon hex screws. This keeps the charger in place when attaching the USB cable during charging.
The PCB with the Tr.inket is not connected, it simply sits underneath the mold.
The images above also show the block painted white. After drilling all of the holes and sanding it can be brushed or spray painted white (or any color you like).
There are five holes that need to be drilled into the side. Four of them for the LEDs and the fifth one for the USB charging cable.
The LEDs are inserted into plastic moldings and then inserted into the drilled hole. The moldings require a 1/4" hole when being inserted into a material they will pass through. Since these a being inserted into a block of wood, they require a slightly large hole. I used a 17/64" drill bit for the holes.
The hole for the USB is 1/2" in diameter. It needs to be large enough for any type of USB cable to be inserted into the charge.
The image below shows the placement of the holes for the LEDs and charger.
After readying the various components, the frame was sanded and painted. Next I inserted the LEDs into their plastic moldings and pushed them into the hole. I did not need to glue them in place because they fit nicely into the holes. I set all of the moldings into place and used scotch tape to keep them in place. I centered the three candle molds as best as I could using a ruler. The slide switch was glued near the top of the frame on the inside using hot glue.
Once everything was in place, I place the glass candle cylinders onto the molds and then filled the box with the glass rock filler. The puck were floated in the water an everything was set to go!
Final ProductThe image below shows the candle decorated for Christmas. The idea is that it can be changed for each holiday and/or season and be out year 'round as a center piece.
This video demonstrates the candle running...
Comments