Fireflies are always a highlight of summer nights. Now that we are entering the winter months, the days are getting dark earlier. To remedy this darkness, I've opted to create a project so that fireflies can be enjoyed year round. Your average run-of-the-mill firefly is only around a centimeter in length. However, this isn't nearly large enough for my taste. That's why the firefly in this project is over 35 cm long (that's 35 times larger for those playing along at home). I also used glow in the dark 3D printer filament for the wings and tail. In addition, the tail has a yellow LED in it. The firefly houses an arduino nano microcontroller and has three modes of operation. You can switch between these modes using two switches. When in the first mode the firefly flashes a set pattern. In the second mode, nightlight mode, the firefly LED turns on when the light in the room drops below a threshold value. In the third mode, the firefly reacts to flashing lights in the room. Like a real firefly, the model will remember a pattern given to it. After a time, the firefly will repeat the pattern. I have included a pushbutton to easily adjust the threshold value for the light sensor. To adjust the threshold value (the light level at which the arduino microcontroller changes from sensing "dark" to "light") simply adjust the light off then hit the button. When the light increases above the set level the microcontroller will know the light is turned on.
This project is easy to throw together whether you are a seasoned arduino and 3D printing guru or a novice. I have attached everything you will need in this instructable.
Step 1: Gather Materials
Here is a list of the materials and tools I used for this project:
-Glow in the dark PLA filament
-Black PLA filament
-Red PLA filament
-3D printer (I printed my parts on a ultimaker 2+)
-Yellow 3mm LED
-SPDT switch x3
-10K ohm resistor
-220 ohm resistors x2
-Momentary push button
-Red and black solid core wire 20-22 AWG
-Clear 2 part epoxy
-#4 machine screws
Step 2: Print Your Parts
Printing these parts is the most time consuming part of this project, but shouldn't be too labor intensive. I've attached all the STL files I used when printing my firefly. I would recommend using PLA filament. You will need to attach these parts together using #4 machine screws, and I have found that PLA is better than ABS for holding a tapped thread. If you are willing to spend a little extra, there are brass inserts made for plastics which work great for this kind of application (here is a link for the brass inserts). These inserts work similar to a drywall anchor, and are more substantial than tapping directly into the PLA.
In addition, be aware that glow-in-the-dark filaments are notorious for wearing your 3D printers nozzle. It is recommend to use a hardened nozzle when printing with glow-in-the-dark materials (i.e. steel not brass).
I used an Ultimaker 2+ for printing the parts and I sliced them using Cura. Be sure to be careful when removing the supports on the body piece. This print usually takes around 13+ hours depending on your printer, and I unfortunately cracked my first print when I was too aggressive when removing the support. I would recommend using some needle nose pliers and a small flat head screwdriver to remove all the support.
Step 3: Solder Electronics
Next step is to solder the electronics together. I included a schematic of my electronics. When soldering keep in mind that the electronics will all have to fit inside the body piece. Also, remember that the switches and buttons will all have to be accessed through the hole on the body cover part (see attached photo above). The LED needs a wire so that it can extend all the way to the tail of the model. Lastly, I added lengths of wire to the photoresistor with header pin connections on the end (see photo). This makes the assembly process easier later down the road.
Step 4: Upload the Arduino Code to the Nano
Next, we need to upload the code to the arduino microcontroller. I've attached the needed code on this step. If you haven't used arduino before, you will need to download the arduino IDE from their website: IDE download. To upload the code simply open my code with the IDE, connect your arduino via USB, and hit the upload button (top left corner). I would recommend playing around with the circuit to make sure everything works according to my description in the intro before continuing.
Step 5: Epoxy Parts
Although most of the assembly will use machine screws, there are three places you will need to epoxy parts together. Use two part quick curing epoxy. First, you will need to glow the tail to the body. Next, you will need to epoxy your electronics so that you have access to the switches and pushbutton. Lastly, cut tow lengths of 22 AWG wire to 6"-8". These lengths of wire will be the antennas of your firefly. You will need to glue these lengths of wire into the holes provided on the head (see attached picture).
Step 6: Assemble
Finally, you will need your #4 machine screws to put everything together. I started by creating two sub-assemblies. The first sub-assembly you will want to build is the wings. You will need the following parts for this: Thorax top, wing 1, wing 2, shell 1, shell 2. Run a machine screw through the shell and the wing. Next, tighten these parts into the thorax top. Repeat this step on the other side (see picture).
For the second sub-assembly, you will need the head, thorax bottom, body, body cover, and tail. Use a screw to attach the thorax bottom to the body. Make sure that the holes for the legs are on the bottom when you tighten everything down. Next attach the head to the thorax bottom (see picture). Lastly route all the electronics correctly and use machine screws to attach the body cover.
Attach the two sub-assemblies together using the two holes in the thorax bottom. The first sub-assembly sits on top of the the second sub assembly with two machine screws to hold them together (see picture).
To complete your assembly, use machine screws to attach all six legs.
Step 7: Finished
Your phenomenal firefly friend is finally finished. Now you will be able to enjoy the soft glow of fireflies all year round. Enjoy your giant firefly. If you have any questions leave a comment. Also, if you enjoyed the project I would appreciate your vote in the make it big/small contest.