Introduction: Fire Fly Jar, Arduino

You can easily make your own jar full of Fire Flies or Lightning Bugs with just a few solder joints. The lights flash on and off just like a fire fly and you can change how long they stay on and how long they are dark between flashes. All it takes is an Arduino, 3 LEDs, 3 resistors, a battery, and a Jar.

Materials

  • 1 X Arduino (I used a Nano but any model should work)
  • 3 X 5mm yellow LED (you can use any color you like but the yellow look pretty much like the real thing)
  • 3 X 330ohm resistors
  • 1 X quart jar. (I used an old jar I had laying around a mason lid fits so that will make it easier to pretty it up later)
  • 1 X 9 volt battery
  • 1 X 9 volt battery clip
  • 1 X can of Rust-Oleum "Frosted Glass Spray" ( http://www.rustoleum.com/product-catalog/consumer-... )
  • some assorted wire, wire cutters, soldering iron, and solder.

Step 1: Making the Fire Flies

  1. Find the short leg of your LEDs. This is negative, also known as the cathode. Solder a resistor to this leg, you can cut it short first if you like.
  2. Solder a wire to the other end (I used solid wire for the negative connection so I can use it to "pose" the fly in the jar.)
  3. Solder a wire to the positive side, again you can trim the lead if you want (I used stranded wire here to make everything easy)
  4. Heat shrink the connections and then run another piece of heat shrink over both wires to keep them together in the jar. (I used red tubing for demonstration but black on my actual jar)

Repeat to make 3 "fire flies."

Step 2: Program Your Arduino

  1. Download a FireFlyJar .ino file from GitHub . This is the program (or sketch) that lets your Arduino power the Fire Fly Jar.
    1. FireFlyJar-Continuous-0.1.ino will light your LEDs up as long as you have it powered.
    2. FireFlyJar-Timeout-0.2.ino allows you to set a timeout for the LEDs. After a set time they will stop flashing and put the Arduino in shutdown mode. It will continue to draw power but MUCH less.
  2. Download the programming software from Arduino
  3. Start the Arduino program and open the file you downloaded from GitHub.
  4. Plug your Arduino into the USB on the computer. The red light should come on.
  5. Click on the little right arrow in the upper left corner next to the check mark.
  6. You should get a notice that the software is uploading and the red light on the Arduino should blink.
  7. You're done. The Arduino is now programmed.

Step 3: Wire the LEDs to the Arduino

This is the hardest part of the project. You can order Arduinos with no pins but if you already have pins on your Arduino it is best to remove them first. (If you need an Instructable for this let me know, I can probably make one)

  1. Disconnect the USB cable from the Arduino before soldering!
  2. Take the positive leads from the LEDs and solder one each into the holes D9, D10, and D11.
  3. It might be easier to tin the wire first. To do this just twist the wire a little and put a small amount of solder on it.
  4. Wire the 3 negative lines together and solder one to the hole marked GND on the Arduino.
  5. If you want to use a battery to light the fire flies instead of your computer now is the time to solder a 9 volt battery clip on. the red wire goes to hole Vin and the black to GND. (As you can see in the photo above there are 2 GND connections, they are both connected to the same place so you can use either or both.)

Step 4: Putting It All Together

With a battery attached (or the computer) the LEDs should start blinking.

  1. Spray paint the OUTSIDE of the jar with Window Frost spray
  2. Tape over (or remove) the red Power LED on the Arduino. You can safely remove the LED it doesn't do anything but tell you when the Arduino has power
  3. When the paint is dry arrange your LEDs in the jar.
  4. Mount the battery under the lid and the Arduino on top of the battery. I used double sided foam tape to hold it all together (and prevent the Arduino from shorting out on the battery.) I had to mount the Arduino on top otherwise the battery would hold down the reset button.
  5. I wrapped it all in electrical tape just for a little extra security.