Synchronizing Fireflies

I was always fascinated by the emergence of patterns. One I like most is the synchronization of hundreds or thousands of fireflies. First they flash randomly but after some time and influencing each other, they flash in sync.

The rule behind this is very simple. All fireflies have nearly the same frequency for their flashing, but their phase is shifted. If a firefly receives a flash of a neighbour firefly, it flashes slightly earlier.

This circuit simulates fireflies with small microcontrollers.

A single Firefly

The board consists of 25 fireflies. Every single firefly is self contained, there is no over-all controller. A single firefly consists of:

  • ATtiny13 microcontroller, 1k SRAM, 64 bytes RAM
  • Light Dependant Resistor (LDR)
  • LED
  • 2 resistors

IMGP1171

The circuit is the same as for the Programmable LED.

The complete Board

Assembling 25 fireflies on a prototype board is easy. Harder is to get the right distance between all fireflies. It has to be close enough to let one firefly influence another, but not the whole group.

The LEDs I used emit the light mostly straight up. So a kind of reflector is needed. I used a piece of paper which is located 5 mm above the LEDs. For the next version I would take LEDs with a wider light emitting angle and use a kind of diffuser, as proposed by Tod for his Smart LED Prototypes.

IMGP1200

Here is a video. It is a bit dark as my camera is not very suitable for this.


Click To Play

Links

Del.icio.us Del.icio.us Digg! Digg

 

13 Responses to “Synchronizing Fireflies”

  1. Randy Says:

    hey,

    I cam across your blog and take it that you’re the person that posted the Firefly Synchronization Instructable. I just want to let you know that its one my all-time favorites (and I’ve seen a lot of Instructables in my time).

    Sincerely,
    Randy
    (on behalf of the Instructables team)

  2. Chad Says:

    The leds are very mesmorizing to watch. Cool project.

  3. SPman Says:

    Looks really nice. And you can add as many fireflies as you want - it’s just time consuming process. I wander how nice it would look in sphere shape as world map :)
    P.S. Nice site - I enjoy reading it.

  4. Alex Says:

    Thanks for stopping by.
    And your site helped me a lot with my beginner problems ;)

  5. Electronics-Lab.com Blog » Blog Archive » Synchronizing Fireflies Says:

    […] Fireflies - [Link] Tags: Led Filed in […]

  6. Terry Says:

    Amazing.
    I work at radioshack.
    Suppose I had to make this completely with Radioshack Parts.
    What would I need and what would the connections be?

  7. Dom Says:

    well, you would need a soldering iron, solder, photo sensitive resistors, prototype boards, leds, and a slew of atTiny13s, which you would have to order somewhere else, such as Digikey or a place that sells microcontrollers

  8. Daily DIY Network - Science Projects Plans Guides » Blog Archive » Synchronizing fireflies Says:

    […] Check out the Synchronizing fireflies […]

  9. C. Coffman Says:

    I wonder if this has any similar emerging properties to cellular automata. Some of the patterns it produces look similar to that.

  10. Alex Says:

    Yes, I think so. Cellular automata use simple rules where every pixel is related to its direct neighbours and that is the same as with my fireflies.
    Even a “Game Of Live” should be possible.

  11. aaron Says:

    Awesome. So neat to see them all start to really synch up 2/3 of the way through.

  12. Robert Louis Carpenter Says:

    Have you tried introducing error into the system once it has synchronized? Maybe something like shooting a laser pointer at the paper briefly….just a flash to introduce error into the system. I also wonder what would happen if you reprogrammed one of them to blink regularly (ie. no sync programming) but started much later. I would assume that they would all re-sync to the phase of the source that doesn’t shift.

    It also makes me wonder what would happen if a corrupt wave was introduced…a light that doesn’t blink at the same speed. If it were the correct speed you might be able to get some cool patterns once it stabilized….I am thinking something like a ripple effect might appear.

  13. Heraclitean Fire — Links Says:

    […] Tinkerlog » Blog Archive » Synchronizing Fireflies via MAKE ‘… the synchronization of hundreds or thousands of fireflies. First they flash randomly but after some time and influencing each other, they flash in sync. This circuit simulates fireflies with small microcontrollers.’ (tags: LEDs fireflies electronics ingenious) daily links | 29 March 2008 at 9:34 am | RSS « ‘Breaking the Rules’ at the British Library […]

Leave a Reply