Do you want to travel to the mysteriously glowing woods filled with fireflies buzzing thought the night? Make your very own Jar of Fireflies! This object could function as a nightlight or centerpiece for an indoor or outdoor table-setting. It turns on and off with the twist of the lid. It is for anyone who likes mysterious and magical objects.
Step 1: What You Will Need
The Firefly Jar is made with Arduino code programmed onto a Gemma.
Step 2: Get the Gemma Up and Running
First you need to download the program for the Gemma from Adafruit and install it on your computer. Their website has pretty detailed instructions on how to do this.
Next you need to check out my Github page and copy the code from there to a new file in Arduino. Save the file as firefly_lamp or whatever you want to name it.
Plug in the Gemma to your computer, make sure you see the green LED lit (power good) and the red LED pulsing. Press the button if the red LED is not pulsing, to get into bootloader mode.
Once you are in bootloader mode, click Upload.
Your Gemma should be ready to go!
Step 3: Getting the Lights Ready
Now its time to get physical! Get your light string and wire clippers. You will cut the string of lights into three segments.
Notice that the end of the string of lights has two pieces of metal, one with a resistor and one without. The side with the resistor is the positive side. The plain metal wire is the negative side.
Start with the first segment of the lights, that has the resistor attached. We are now going to attach this to the Gemma to test the code.
Step 4: Testing the Code
Take your piece for light strings with the resistor attached and connect that (+ side) to the Gemma on the D0 and the negative side to ground (GND).
The best way to connect this is to place the wires through the hole and then soldier the hole until it fills up with solder.
Now connect the Gemma to the computer to give it power and you should see the light string start to pulse and light up.
Step 5: Test and Solder the Light Strings
We will test the light strings to find the positive and negative side.
1. Now gather resistors you have and the remaining light string segments. Take one of the strings and find the end. Attach alligator clips to attach one end of the light strings on each of the wires. You may want to use a nail file or sandpaper to sand each end of the wire to expose the copper inside. This will help increase conductivity.
2. Once you have done that connect the clip to the resistor. then on the other end of the resistor connect another clip.
3. Take the resistor clip and connect that to d1 on the Gemma. Take the other clip and connect it to ground (GND) on the Gemma. The lights should light up, if not then swap the wires that the clips are connected to. If it lights up, then you know that the side with the resistor is positive and the other side is negative.
4. Solder the resistor to the positive side.
5. Repeat this process for the remaining light string.
Step 6: Solder All the Light Stings to the Gemma and Affix to Lid
1. Solder one of the positive side of the light strings (via resistor) to the Gemma at D1 and negative to ground.
2. Solder the other light string to D2 and the negative to ground.
3. Make sure that all the lights are working and pulse with light.
3. Now hot glue the Gemma to the inside of the lid.
It should look like the picture above.
Step 7: Get the Lights and Paper Into the Jar
1. Wrap the lights around your hand and then place them inside the paper.
2. Wrap the paper around the lights and hot glue it to itself.
3. Place that into the jar so that only the paper shows on the outside.
4. Disconnect the Gemma from the computer and plug it into the battery. Make sure it works.
Step 8: Prepping and Setting Up the Battery and Switch
1. Clip the black wire of the battery extender cable about 2 inches from base.
2. Strip it down about 1/2 inch to expose the wire on each piece of the black wire.
3. Plug it into the Gemma as shown.
4. put copper tape around the inside rim of the lid and then solder the exposed black wire to the copper tape as shown.
5. hot glue the top of the lid to the rim of the lid to it stays together.
Step 9: Finalizing the on Off Switch
1. Take the other side of the black wire from the battery extender and solder it to a piece of copper tape.
2. put copper tape around the rim of the glass jar.
3. Place that copper tape on the edge of the glass jar as shown and then hot glue it to the copper tape around the rim of the jar.
4. Plug in the battery to the battery extender and place them in the jar.
Step 10: Close the Lid and Turn on the Light!
You can unscrew the lid to turn it off. The secret is that the two black cables carrying the negative signal to the battery will connect via the copper tape!