How to Make a Jar of Fireflies

by nikistyxx in Circuits > Arduino

7936 Views, 132 Favorites, 0 Comments

How to Make a Jar of Fireflies

Jar of Fireflies
548eeb54c6ba5dbb3800000d.jpeg

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.

What You Will Need

Screen-Shot-2014-10-15-at-3.08.19-PM.png

The Firefly Jar is made with Arduino code programmed onto a Gemma.

Get the Gemma Up and Running

1222iso_LRG.jpg

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!

Getting the Lights Ready

14918133943_b92aa649ae_o.jpg

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.

Testing the Code

15514608526_88613d1b7d_o.jpg

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.

Test and Solder the Light Strings

21FlM5MjXRL.jpg
81ELXZgvBbL._SL1500_.jpg
41TJiZ3ex6L.jpg

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.

Solder All the Light Stings to the Gemma and Affix to Lid

14918137513_c08183571d_o.jpg
15535622591_b8c0cb9b7e_o.jpg

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.

Get the Lights and Paper Into the Jar

15538311665_205ff958f5_o.jpg

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.

Prepping and Setting Up the Battery and Switch

15351686359_331b91cf19_o.jpg
15538313605_5c4900be5e_o.jpg
15514614386_20e72b5b51_o.jpg

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.

Finalizing the on Off Switch

IMG_2858 copy.jpg
15352297987_74fcd0ee2f_o.jpg
15514614746_d34f1150d8_o.jpg
IMG_2859.jpg

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.

Close the Lid and Turn on the Light!

15405055122_77e89b2eae_o.jpg

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!