Connect with us

Fireflies blinking lights

Discussion in 'LEDs and Optoelectronics' started by Johnny Funch, Dec 8, 2014.

  1. Johnny Funch

    Johnny Funch

    3
    0
    Dec 8, 2014
    Hello,

    This past week we spent in Disney and they have these blinking lights in the trees that light up kind of like fire flies and I've searched high and low but can't find anything like it, and was told they're custom made for Disney.

    I was wondering how much work it could be to create an led bulb that blinks at a seemingly random time. I don't really care if it's really random, it's going in a huge tree so no-one will know but if it doesn't add much more why not.

    My envisioned creation would have 20 or so lights with wires to a 'control-box' but then I thought maybe it's easier to just create individual self-contained devices that blink.

    By the way, these will live outside and we do get rain in Florida, so they'd have to be able to survive that.

    So... I am probably a complete newbie compared to most of you and for all intents and purposes I'd probably need some 'handholding'...

    Any help or advice is greatly appreciated, be gentle...

    ~j
     
  2. hevans1944

    hevans1944 Hop - AC8NS

    4,230
    1,995
    Jun 21, 2012
    A quick web search reveals that there are "blinking LEDs" available, as well as numerous circuits to make ordinary LEDs blink. IIRC, a firefly blink is a rapidly increasing pulse of light followed by a slower decay. Haven't actually studied any real fireflies lately to verify my recollection.

    One thing you could try is to breadboard a simple circuit that charges an electrolytic capacitor from, say, a 9V transistor radio battery. Then manually disconnect the capacitor from the battery and, while the capacitor is still charged, connect it to a white-light LED with a 220 Ω, 1/4 watt, current-limiting series resistor. Observe proper polarity of course: LED anode with series resistor to positive terminal of capacitor, LED cathode to negative terminal. A SPDT push-button switch can be used to alternately connect the capacitor to the battery when the switch is not pressed and then to the resistor and LED when the switch is pressed. I would start with a 20 μF electrolytic capacitor rated for at least 10 V DC to see if that produces a suitable flash duration. Increase the capacitance to obtain a longer flash but don't change the resistor value.

    Once you get the desired effect, we can discuss how to replace the SPDT switch with something electronic. I think each LED in the tree will need a blinkiing circuit, but all twenty or so of them can be powered from the same source using a daisy-chained pair of wires. Since each LED and its blinking circuit are independent, the result should be moderately random.
     
  3. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    I could.. and I will mention a microcontroller here.
    Something like:
    http://www.digikey.ca/product-detail/en/PIC10F200T-I/OT/PIC10F200T-I/OTCT-ND/665887
    It's a cheap microcontroller, about $0.50 and can be programmed to control the fade-in and fade-out rate of an LED using PWM and a little coding magic.
    The only reason I mention this is due in part the the small amount of parts required, and that this chip touts that it has a high current sink/source pin for direct LED control. 25mA are available to sink/source which will not drive a high powered LED, but should be more than enough for a gentle firefly glow. The trickiest part of the program will be to achieve a truly random delay before the 'firefly' flickers again.
    Once a program is made, you could make as many as desired, each LED would consist of the microcontroller, resistor, and LED. Using surface mount components will keep the size way down, but using through hole components will make construction easier.
    You would need a regulated supply voltage, but you could wire them the same as Hevans1944 suggested with a single twisted pair to deliver power to each little module.

    Temperature tolerance is quite high, and you could cover the entire thing in a glob of hot glue or epoxy to help keep out moisture.

    Of course there is always numerous ways to do something. This is my desired approach simply due to size and that I'm more of a software guy. (Working on Surface Mount components can be a pain if your not used to it, or don't have the right hardware)
     
    hevans1944 likes this.
  4. hevans1944

    hevans1944 Hop - AC8NS

    4,230
    1,995
    Jun 21, 2012
    "Random" delays can be accommodated by altering a timer variable in the main loop of each microcontroller. Most simply, a different timer variable would be selected for each microcontroller. After a few dozen cycles they should all be sufficiently "out of sync" to appear random to the casual observer. To add a little complexity, a random number algorithm could be applied before each cycle to vary the timer variable slightly, producing possibly an even more random effect. I would not bother with this added complexity until after all microcontrolled LEDs were functional and the user determines whether the fireflies are flashing "randomly" enough.

    Surface mounted components are definitely in order for this project. A panel of "snap off" boards would be the most inexpensive route. Provision for daisy-chain connectors, allowing individual fireflies to be added or replaced, is a good design plan. I think I would prefer a pair of two-pin connectors so arbitrary lengths of twisted-pair power cables could be constructed. Depending on the source supply current capability, and whether or not point-of-use regulators are used (each firefly should have its own regulator so as to be intolerant to power cable length), there is no practical limit to how many fireflies could be strung through a large tree.

    This project obviously has seasonal commercial possibilities and may also be suitable as an attention getter for advertising displays. I would be surprised if someone hasn't already built something along the lines we are discussing here and made it available for purchase. I think a target price of US$5.00 per firefly (plus wire, connectors and power module) would sell briskly, especially since the string could be expanded each season. Initial production quantities would probably be in the neighborhood of a thousand units to approach a five dollar selling price, but this is just a rectal extraction on my part. YMMV. A good design will be promptly stolen and assembled in the Far East, but that doesn't mean we can't make a few for ourselves.
     
    KrisBlueNZ likes this.
  5. Allen Bong

    Allen Bong

    3
    1
    Dec 5, 2014
    In the old days I would use a LM3909 to get the firefly effect. But since this chip is now obsolete....I'd use transistors to mimic this chip to get the same effect.

    http://www.redcircuits.com/Page87.htm

    Allen
     
  6. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Good call. One of the other reasons I was thinking of a microcontroller is the fact that you could make the pattern a little more complex. You could have complete control over over how long it takes to turn on, how long it stays on, if it fades or shows variation while on, and the rate it fades out... It's not necessary, but sometimes the tiniest details can bump a project up from great to stunning.

    Is it bad the first thought for this project was 'dead-bug' style soldering? With so few components, I figure you could make a pretty tiny device. Attach a pair of wires to it, and add a dollop of glue or exopy to seal it up nice and tight. This would make re-programming an existing 'bug' impossible, but I would be willing to leave it in the rain for less than $1 a pop.

    I'm thinking something like this could be built in a similar manner to the flashing/flicker/candle/colorchange LEDs that are already manufactured and available. I've seen green/red bi-color LEDs slowly fade between colors, and candle flicker LEDs... all of the circuitry is contained within the little plastic LED casing... You simply put 5V across the terminals and your good to go. So something like this could very well be a design that already exists, or a piece of silicon that can easily be made.

    (If these things do exist... a little green 'firefly' LED and a coin battery or two would make a very funky 'throwie')
     
  7. Johnny Funch

    Johnny Funch

    3
    0
    Dec 8, 2014
    Hey guys,

    So first off, thank you for your quite in-depth answers, as I feared I got answers I don't quite know how to decipher, however, given the software developer background I have, something code-able would be preferred.

    I think I like the self-contained device, even non-reprogrammable would be fine, these are just for Christmas decorations, so used once a year. I'm also ok with not having on/off switch and just make them go when battery is inserted, although it might be a nice touch if it only ran at night but that might add too much overhead. And it could be a phase II project once I get my feet wet.

    Currently I own nothing of what I would need so if you could throw me a bone here and list the things I need apart from the obvious: soldering iron, solder, 'helping hand' and a desk :)

    What parts would I purchase and how about schematics?

    Please be gentle, I'm moving into a field I've never been in before :)

    Oh and merry Christmas (or whichever denomination you prefer)

    ~j
     
  8. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    I'm torn to recommend the ideal path for you given your lack of experience with electronics.
    You will find that soldering small surface mount devices can be quite irritating, but these parts will give you a much more compact final product.
    Also, I would like to push you towards Hevans' first post regarding a capacitor and resistor. It is a very basic build that should provide you with a touch of how capacitors work and how you size a resistor for an LED.
    Of course, your desired path is up to you.
    Perhaps you can provide some other requirements for your project?
    Quantity, Cost, Size, Etc?
    Also... using the simpler method with a capacitor and resistor will give you a predetermined 'curve'. You can adjust how long the light fades for, but the curve will remain the same.
    What I mean by this... is if you made a graph or brightness vs. time. The shape of the line will be pre-determined with a simple capacitor circuit. This 'curve' could be programmed however you see fit though with a microcontroller. (This is a very minor detail.. but it depends on your preference.)

    If we get some requirements from you, we can help nudge in one direction or another.
     
  9. Johnny Funch

    Johnny Funch

    3
    0
    Dec 8, 2014
    Hi Cryd3,

    Again thank you for replying...

    Requirements... Ideally I would like to have 20 or so lights. They are going on a large oak tree in our front yard.

    I won't say money is no object, but for this project, it was mentioned that they could be done for $1 a piece, but even at $5 or $10 a piece it would be fine.

    Ideally a seemingly random fade-in fade-out would be the desired effect, but again I'm willing to start simple and upgrade as I am learning and figuring out what is possible etc.

    Not sure if this makes sense, but a random pause, then fade in, then a lit pause (shorter) then fade out and back to beginning. OFF more than ON.

    Programmatically like this:

    Loop
    SLEEP(5s + Random(20s)) ' Sleep 5 seconds + random of 20 seconds
    FADE IN
    SLEEP(3s+Random(5s)) ' Stay lit 3 seconds + random of 5 seconds
    FADE OUT
    Until 1=2 ' forever loop

    Extras and future upgrades:
    Only on from dusk till dawn
    On power instead of batteries... (essentially creating a string of them)

    tnx
    ~J
     
  10. hevans1944

    hevans1944 Hop - AC8NS

    4,230
    1,995
    Jun 21, 2012
    Fade up to full brightness, hold, fade out, wait a random interval, repeat. This definitely looks like a job for a PIC or small microcontroller.

    Power on wires is the way I would go. You can hook the power supply up to a light sensor so it only operates from dusk 'til dawn. No vampires necessary.

    I haven't messed around with microcontrollers since about five or ten years ago when I attended a show-and-tell for the Texas Instruments MSP 430-series low-power microprocessors and received some free evaluation modules. The chips are available with a variety of peripheral devices, "built in" on the chip, and are characterized by extremely low power requirements while in the "sleep" mode.

    The usual practice is to interrupt the sleep mode when an external event or an internal countdown timer event occurs. The CPU "wakes up" and performs whatever instructions are needed to service the event (typically data storage in non-volatile RAM) and then goes back to sleep. So, several seconds between events followed by brief activity and then back to low power sleep mode. I am sure the competition has evolved alternatives to the MSP 430 series, so someone knowledgeable of current embedded processor technology would be better positioned to suggest practical hardware. TI seems to have migrated toward ARM processors lately, but that is way overkill, IMHO, for this application. A CMOS PIC chip might be an even better choice, but I have no experience in that area yet.

    @Johnny Funch: don't worry about the design and assembly just yet. Someone here in the forums will come up with something practical and someone else might take on the job of building it. Working with SMD versus thru-hole components just requires a steady hand, perhaps a magnifying headset, patience, and a fortress of solitude with no moving air or heavy vibrations. Organization is important because you don't want to get the parts mixed up. Some people use a toaster oven to re-flow solder paste on SMD circuit boards, but I haven't tried that yet either.
     
    Arouse1973 and KrisBlueNZ like this.
  11. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
  12. BobK

    BobK

    7,631
    1,657
    Jan 5, 2010
    With a PIC, adding a simple photoresistor and some additional programming could make it work only at night and sleep during the day to conserve energy. You could even make it operate for only several hours after dark quite easily.


    The possibilities are unlimited.

    Bob
     
    hevans1944 and Arouse1973 like this.
  13. hevans1944

    hevans1944 Hop - AC8NS

    4,230
    1,995
    Jun 21, 2012
    Yes, IF you wanted a self-contained device powered perhaps by a 3V Li-ion coin cell, a cheap CdS or photoresistor would extend the battery lifetime to several months (probably) with a proper design. Do you have a favorite PIC in mind? I would like to get involved with those, now that I have more time on my hands...
     
  14. Scotophor

    Scotophor

    48
    6
    Oct 8, 2014
    Which Disney? I've only been to the original Disneyland in Anaheim (Los Angeles area), and I haven't been there since before the Pirates of the Caribbean movies came out, so what I remember may be gone now because I know that the PotC ride got a huge makeover in conjunction with the first film.

    Here's what I remember: While standing in the queue to take the ride, guests walked near a "bayou" area (on a peninsula inside a hairpin loop of the flume, so inaccessible). There was also seating from one of the "New Orleans Square" restaurants on the other side of the hairpin, and I believe some windows of "Club 33" might have overlooked the scene too. The "fireflies" were tiny white incandescent bulbs hanging by near-invisible thin wires from an overhead contraption which moved them around and up and down in a small area. Like real fireflies, they only lit for 1-2 seconds or so while moving upward. The color was wrong of course, since the real fireflies I've seen all gave off a pale green light, but it's possible that the bulbs were originally lacquered and it all peeled off in the damp environment over the years. I believe hevans1944's observation of the time-characteristic being a fast bright pulse followed by a slow decay is correct for real fireflies too, but I don't recall the Disney ones acting that way.
     
  15. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    OK, how about this for a crazy idea.

    They don't need to be very bright, do they? And they need to be weatherproof and simple to deploy?

    How about making them as fully enapsulated, cylindrical devices with a cylindrical coil near the surface, and coupling energy in by winding another wire around them at installation time. Then string them all together like Christmas lights and apply AC to the wire at a few dozen kHz at night time.

    The internal coil could power a small PIC - a PIC10F200 would be plenty for that job, running off its internal oscillator. That device doesn't have a PWM generator, but you can do PWM in firmware by counting interrupts off timer 0.

    The code could include a random delay before the LED activity begins, so they don't all come on at once. The pseudo-random generator could be seeded by counting the number of MCU clocks (from the MCU's internal uncalibrated oscillator) in one or more cycles of the power source signal.

    You would need low overall power consumption because inductive coupling like that isn't very efficient, but high-efficiency LEDs are available at reasonable prices - HLMP-K150 (5 mm red) at http://www.digikey.com/product-detail/en/HLMP-K150/516-1311-ND/637575 is USD 0.33 for 25-up. You can get high-efficiency green LEDs as well, and other colours at lower efficiencies to tint the colour to your preference.

    I'll post again with a sketch of the idea for the physical construction - if I can draw it!
     
    hevans1944 likes this.
  16. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    OK, prepare yourselves for...

    Kris's crazy firefly design.jpg

    Kris's crazy firefly suggestion, in glorious Krisometric projection :)

    So the whole thing would be enapsulated in potting resin or similar. The light would come out from the front of the head section.

    The coil area would contain a coil internally, located close to the surface (just far enough inside to ensure weatherproofness) and the external wire would be wound around this area - maybe just one layer of turns; maybe several. I don't know whether the coil should have a ferrite or iron slug inside it. Probably should.

    The tail and head are larger so there's something to hold the external wire in place. You could have a small hole in each for the wire to go through, to keep the turns tight. There would be one piece of wire arranged in a loop through all the fireflies, like the old style Christmas lights where all the bulbs were in series.

    The AC from the coil would feed up to the head, which would probably contain a round circuit board. The AC would be rectified by a Schottky diode bridge and smoothed by a small capacitor, and would power a PIC10F200 or similar, which would drive one or more LEDs directly.

    The head as drawn is probably longer than it would need to be.

    I don't know, but I would guess the cost per item might be less than USD 5.00 in a quantity of 20 or more. I would be surprised if it was more than USD 10.00 each.

    Of course you would need a power source as well - probably a class C or class D amplifier producing a sinewave at a few dozen kHz.

    It's just a suggestion anyway.
     
    hevans1944 likes this.
  17. hevans1944

    hevans1944 Hop - AC8NS

    4,230
    1,995
    Jun 21, 2012
    I like the idea of "transformer" coupling the power from a single wire wound about and through each "firefly" and then back to the source. Might want to consider using a small toroid core instead of a ferrite rod for more efficient magnetic coupling. Might get by with a single wire through the core, which would make deployment much easier. This could be made really small if "dead bug" assembly techniques were used. @Johnny Funch: visit this link for an example of "dead bug" construction. No circuit board required!
     
    KrisBlueNZ likes this.
  18. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    That's an interesting idea. It might make the encapsulation process a bit more difficult. Or perhaps half of the toroid could protrude out the end of the firefly, with the secondary (to power the circuitry) wound around the part of the toroid that's inside the potting resin. Does ferrite rust? I guess it would, considering that it contains iron... Maybe it could be sprayed with conformal coating or similar?

    Using a single turn primary sounds dodgy to me. Wouldn't that require quite a lot of current? And therefore thicker wire? I guess that might even be an advantage if the wire was used as a mechanical support as well...?
    A lot more time-consuming though. Can be good for one-off protoyping.
     
  19. hevans1944

    hevans1944 Hop - AC8NS

    4,230
    1,995
    Jun 21, 2012
    I am still learning about magnetic toroids... for amateur radio work. They come is all sorts of compositions and most do have an insulating, waterproof, conformal coating. The two main compositions are powdered iron and ferrite ceramics. I haven't bought any powdered iron toroids, which apparently are used only for low frequency power applications, but I think they would have to be protected from rusting. The ferrite ceramics are quite brittle and therefore fragile... a bought several at the last Dayton Hamvention® but two didn't survive an accidental drop to the floor. I think I can repair them with superglue but haven't tried that yet..
    I am thinking not much current would be necessary because the power transfered is small. Don't have any calculations to back that statement up though... just a "gut" feeling. Some experimentation is necessary. Maybe even a resonant secondary.
     
    KrisBlueNZ likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-