3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Jar of Fireflies

Step 18[Appendix] Areas for Improvement

[Appendix] Areas for Improvement
«
  • ideas.gif
  • tenstringsamurai.png
It's somewhat of a personal problem of mine that I have a tendency to start projects but never finish them. I tend to get overfocused on little twiddly details that, while interesting and neat, aren't terribly relevant when zoomed out to the big picture, and this tends to go on until finally my interest in the project as a whole evaporates and I move onto something else. I've determined that this tendency makes me ultimately unhappy and that's why, three months ago when I started work on this project, I resolved to put this behavior to an end and that this project was going to be the first step -- I was going to finish something (dammit).

Sure enough, while working on this project all sorts of neat ideas and whizbang features popped into my head. However, due to time constraints and my resolution to finish the project, some of them had to be abandoned on the drawing board. In this section I record some of my thoughts for improvement on the project, in case someone else wants to take it upon themselves to make it better. A number of these have already been brought up by other users in the comments, and I wanted to comment on those a little.


Light Detection

Probably more than any other feature, this is the one I regret having to have dropped the most, as it would have been quite cool (at least how I was intending on doing it).

The basic idea I was going to use was to take advantage of a little-known property of LED's, namely that if you shine light on them, they will generate a tiny voltage. I.e. they work as little photocells. In fact I've seen someone build an extremely inexpensive solar tracker (used to keep solar panels facing the sun all day) using this effect (brilliant, I thought). Anyways, it was my intention to use this effect as well, along with the analog to digital (ADC) feature of the ATTiny45 to detect the ambient light level in a room and automatically turn off if it got too bright.

I prototyped this out, using ADC1 (PIN_D), and setting up the ADC to compare the voltage on this pin to the internal reference voltage of 1.1, and it *worked*. I was able to get results that went up as high as about 30 in quite bright light (next to a 100watt bulb). So I was reading a range of 0-30 or so, which should at least be enough to make some sort of decision as to how bright the room was. So I indeed believe it's possible to do this entirely in software without making a hardware change. How cool is that?

I did run into some caveats however. For instance, without any extra components, the values I was reading back tended to be extremely noisy, almost to the point of being useless. I'd see huge swings in the values I was reading off and, while indeed I'd see the average bias of those swings change with the amount of light, the signal to noise ratio was just too extreme. I found that by adding a small capacitor between PIN_D and GND tended to clean this up and it was when I was using the capacitor that I got the most reliable values. I think a 4.7uF cap gave me pretty good results. However, I didn't get so far as to investigating whether or not having the capacitor installed would significantly interfere with playback or make it impossible to program the chip on the board. That investigation I leave up to you.

The biggest issue that prevented me from going through with this was that of calibration. I was planning to give these out as christmas gifts to my family and friends and I had no idea how bright the room they were going to place them in would be. So how do I, as the fireflies, determine when to turn on and when to turn off without risking being "always off" or "always on" simply due to the choice of where I was placed? This was the technical obstacle, that of calibration, that ultimately forced me to abandon the idea.


Solar Power

I considered putting a little solar cell on the lid of the jar and using that to charge a rechargable battery instead of using the lithium coin cell. Also, this could be used as a means of detecting the ambient light level in the room and turning off it its too bright.

I think I stopped looking into the idea when I saw how much it would cost to buy solar cells that were small enough and yet could put out greater than 3 volts. Also, I'm not so solid in the raw electronics that working out the battery charging part of the circuit is something I can do easily (i'm still mostly a software guy).

It's certainly doable, I'm sure.

For the reference of anybody looking into this, here are the estimated average current values for the firefly circuit, depending on whether you're using the song1 pattern or song2 (song2 is default)
song1 = 0.159mA
song2 = 0.405mA
This is average.

Also, I considered possibly using a solar cell coupled with a supercap instead of a battery, but calculated you'd need a freakishly large one (2F or greater) to get any reasonable sort of runtime out of it. It still may be possible however and I wouldn't discourage someone from looking into it.


Motor

The idea is to make the fireflies move somehow to increase the realism. I didn't consider this one long since adding any kind of motor is going to have a disasterous impact on the battery life and also I couldn't figure out how I'd get the motor to move the fireflies in any way that looked remotely realistic. Just having a motor agitate the strings would result in fireflies that quickly swung back and forth like tiny little pendulums, and I couldn't imagine firefiles moving like that even after a half-dozen vodka martinis.


More LED strings (10 strings)

My original design was to have 10 LED strings charlieplexed in such a way that I could still play two songs at the same time. I worked out the logical connections, however I don't remember if I fully checked out that they would work 100%. Anyways, I've provided the last drawing I made of that idea before I abandoned it for the 6 strings idea (chiefly because I found that making the strings was a pain in the ass). It's up to you to figure out if it's workable or not.

« Previous StepDownload PDFView All StepsNext Step »
9 comments
Mar 2, 2007. 11:40 AMMycroft2152 says:
Great project. I can see building a few as gifts. For a solar powered version, why not hack one of the cheap ~$5 solar garden lamps? They have the solar cell, battery and circuitry inside. You could use that to power the Fireflies and sense light levels too. The guts should all fit nicely under the mason jar cap. The output of the solar lamp is usually pulsed, there is a circuit on the web to make it into a 5 volt supply.
Jul 23, 2010. 1:17 PMbrennendaly says:
i was thinking the same thing, i know this is an older post, but did you ever end up trying this out?
Jan 14, 2007. 9:01 PMsysadmn says:
I'm looking at building this, but with an added mystery. What if the lid and bottom of the jar are clear, and there is no visible source of power? I'm trying to put everything but the leds in a wooden base, and inductively couple the few milliamps required through the glass. (Think rechargeable toothbrush). You could hide the internal coil as a decoration on the jar, and hide the wires to the leds as "sticks". Put a short section of black shrinkwrap on the end of the wire, with an led sticking out, for the "bug". I'm still breadboarding the coupling, but it looks like you need a high (50kHz+) frequency for efficiency. I'm looking at using one of the microcontroller's outputs to switch a transitor at the required rate - it saves a 555. It that works, I can look at PWM to make the "bug" pulse, rather than blink. Cool, huh?
Sep 24, 2009. 9:41 PMMekasia says:
This is still, without a doubt, my favorite instructable ever. I'm still holding out for a kit for this (I'm a "learn-by-doing" person), or even just programmed chips. Anyway, kudos on this still being one of the greatest ever instructables, all these years later.
Dec 27, 2009. 6:15 PMFather Christmas says:
I wholeheartedly agree with every word you said.  Especially the favorite part, and the kit part, and the learning part, and the chip part. and the GREATEST EVER INSTRUCTABLE
Sep 13, 2009. 9:42 AMshmolky says:
Very awesome project. Do you still have any of your source code from when you were trying to use one of the leds as a light sensor? I'd like to work with it if you do.
May 9, 2008. 7:57 AMSmallerGiant says:
As for movement for the fireflies, try mounting everything on a rotating disk on the lid. With the different length wires, it should produce a pleasing effect and you won't have fireflies experiencing seizures. ;)
Jul 24, 2007. 10:17 AMthrudd says:
On the more strings idea .... Theoretically the design is rock solid. The push-pull concept is even mentioned in the application notes of LED driver chips for commecrial use. On the practicle side - thats a lot of extream micro soldering >.<
Mar 5, 2007. 12:15 PManalogworm says:
I built it using your instructables and my wife dug it. She and I come from areas of the country with fireflies and miss them where we live now. Some comments. For the programming portion that's not listed here, I used the Kanda STK200 and plugged leads into the 8 DIP socket and connected those to an SOIC microcontroller clip. I did screw up a bit the first time around. I used "no clean" solder that I got at a local electronics shop. This is some of the new "Lead-Free" (ROHS) initiative approved flux and it's crap. I couldn't wash it off or scrap it off, so basically I had a layer of goo everywhere that interfered with my test leads when I tried to program the Atmel microcontroller. I made a substition of magnet wire instead of that specific wire listed to hook up to the surface mount LEDs. That worked just fine when I used a knife blade like instructed here. Anyway, it works great and I usually turn it on every evening when we go to bed. It's a nice little project. Thanks!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
21
Followers
1
Author:Keso(Synoptic Labs)