<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tinkerlog &#187; simulation</title>
	<atom:link href="http://tinkerlog.com/category/simulation/feed/" rel="self" type="application/rss+xml" />
	<link>http://tinkerlog.com</link>
	<description>Alex' blog</description>
	<lastBuildDate>Fri, 21 Oct 2011 06:16:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fireflies at the Fira de la Ciència</title>
		<link>http://tinkerlog.com/2010/05/17/fireflies-at-the-fira-de-la-ciencia/</link>
		<comments>http://tinkerlog.com/2010/05/17/fireflies-at-the-fira-de-la-ciencia/#comments</comments>
		<pubDate>Mon, 17 May 2010 14:29:48 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[avr]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[simulation]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1105</guid>
		<description><![CDATA[
A couple of months ago, some nice guys of the IFISC (Institute for Cross-Disciplinary Physics and Complex Systems) contacted me. They saw the Synchronizing Fireflies and wanted them to demonstrate how simple rules can make patterns emerge from chaos. The main research of the institute is in Nonlinear Physics and Complex Systems. 

But why would [...]]]></description>
			<content:encoded><![CDATA[<p><object width="490" height="276"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=11804408&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=11804408&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="490" height="276"></embed></object></p>
<p>A couple of months ago, some nice guys of the <a target="_blank" href="http://ifisc.uib.es/">IFISC</a> (Institute for Cross-Disciplinary Physics and Complex Systems) contacted me. They saw the <a href="http://tinkerlog.com/2009/06/25/64-synchronizing-fireflies/">Synchronizing Fireflies</a> and wanted them to demonstrate how simple rules can make patterns emerge from chaos. The main research of the institute is in Nonlinear Physics and Complex Systems. </p>
<p><span id="more-1105"></span></p>
<p>But why would they want electronic gimicks? Every year, there is a science fair, the &#8220;<a target="_blank" href="http://fira2010.balearsfaciencia.org/">Fira de la ciència</a>&#8221; in Palma de Mallorca. The fair is aimed at young students, to introduce them to science with many hands-on projects and experiments. The IFISC is part of this fair and decided to use my fireflies as a demonstration of self organizing systems for one of their projects. </p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/05/310320100741.jpg" alt="" title="Fireflies in the palm tree" width="450" height="600" class="alignnone size-full wp-image-1116" /></p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/05/310320100721.jpg" alt="" title="Fireflies in the palm tree" width="450" height="600" class="alignnone size-full wp-image-1115" /></p>
<p>It took a while to figure out how to present the fireflies best. Here are two pictures of the palm tree to which the fireflies are tied. Great idea and it came out really beautiful.</p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/05/DSC_0042-11.jpg" alt="" title="Synchronizing Fireflies" width="417" height="700" class="alignnone size-full wp-image-1118" /></p>
<p>For the fair they built a small cubicle with the palm tree inside. The cubicle was neccessary because the fireflies need an almost pitch back environment to see each other flashes.</p>
<p>As the fair was at Palma de Mallorca, I couldn&#8217;t resist to see it in person. Last week my girlfriend and I took some days off and travelled to Mallorca. We visited the fair and met some really nice staff members of IFISC. And there it was, a tiny black cube with a palm tree and fireflies within. Wohoo!</p>
<p>After all I have to say thank you all so much for the warm welcome and showing and explaining all your projects. Thanks for the cool t-shirt, I feel almost as a IFISC member now <img src='http://tinkerlog.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
And especially thanks to Pep for pushing this project further and further and making it possible. It has been a fantastic experience. You guys rock.</p>
<h3>Links</h3>
<ul>
<li><a href="http://tinkerlog.com/2009/06/25/64-synchronizing-fireflies/">64 Synchronizing Fireflies</a></li>
<li><a target="_blank" href="http://store.tinkerlog.com/store/index.php?main_page=product_info&#038;cPath=2&#038;products_id=2">Synchronizing Firefly Kit</a></li>
<li><a target="_blank" href="http://www.youtube.com/user/pepdecanvalent">Some more videos</a> of the test setup, done by Pep</li>
<li><a target="_blank" href="http://ifisc.uib.es/">IFICS</a> (Instituto de Física Interdisciplinar y Sistemas Complejos)</li>
<li><a target="_blank" href="http://fira2010.balearsfaciencia.org/">Fira de la ciència</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2010/05/17/fireflies-at-the-fira-de-la-ciencia/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>64 Synchronizing Fireflies</title>
		<link>http://tinkerlog.com/2009/06/25/64-synchronizing-fireflies/</link>
		<comments>http://tinkerlog.com/2009/06/25/64-synchronizing-fireflies/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 09:27:09 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[avr]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[firefly]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=760</guid>
		<description><![CDATA[
Last week I invested some time to solder 64 Firefly boards. Only 2.432 solder joints later I was ready for some videos. 
Every firefly acts completely autonomously, it has its own tiny controller, eye and luminary. They are all connected for power supply only. 

Here are some different configurations. 



Links

See how it&#8217;s done in the [...]]]></description>
			<content:encoded><![CDATA[<p><object width="490" height="282"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5317886&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5317886&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="490" height="282"></embed></object></p>
<p>Last week I invested some time to solder 64 <a target="_blank" href="http://tinkerlog.com/howto/synchronizing-firefly-how-to/">Firefly</a> boards. Only 2.432 solder joints later I was ready for some videos. </p>
<p>Every firefly acts completely autonomously, it has its own tiny controller, eye and luminary. They are all connected for power supply only. </p>
<p><object width="490" height="282"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5318234&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5318234&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="490" height="282"></embed></object></p>
<p>Here are some different configurations. </p>
<p><span id="more-760"></span></p>
<p><object width="490" height="282"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5318396&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5318396&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="490" height="282"></embed></object></p>
<p><object width="490" height="282"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5318548&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5318548&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="490" height="282"></embed></object></p>
<h3>Links</h3>
<ul>
<li>See how it&#8217;s done in the <a href="http://tinkerlog.com/howto/synchronizing-firefly-how-to/">Synchronizing Firefly Howto</a></li>
<li>Grab a <a href="http://store.tinkerlog.com/store/index.php?main_page=product_info&#038;cPath=2&#038;products_id=2">Firefly kit</a> at the Tinker Store</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2009/06/25/64-synchronizing-fireflies/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Synchronizing Fireflies NG</title>
		<link>http://tinkerlog.com/2008/07/27/synchronizing-fireflies-ng/</link>
		<comments>http://tinkerlog.com/2008/07/27/synchronizing-fireflies-ng/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 17:26:07 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[avr]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[simulation]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/2008/07/27/synchronizing-fireflies-ng/</guid>
		<description><![CDATA[

Update 04. Dec. 2008: This article is replaced by the new howto.
This is a remake of the fireflies which I did a year ago. 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 [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Firefly" href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0080.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0080.JPG" alt="s-dsc_0080.JPG" /></a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="440" height="268" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blip.tv/play/AcTSXgA" /><embed type="application/x-shockwave-flash" width="440" height="268" src="http://blip.tv/play/AcTSXgA"></embed></object></p>
<p><strong>Update 04. Dec. 2008</strong>: This article is replaced by the new <a title="Synchronizing Firefly HowTo" href="http://tinkerlog.com/howto/synchronizing-firefly-how-to/" target="_self">howto</a>.</p>
<p>This is a remake of the <a title="Tinkerlog: Synchronizing fireflies" href="http://tinkerlog.com/2007/05/11/synchronizing-fireflies/" target="_blank">fireflies</a> which I did a year ago. 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.</p>
<p>This circuit simulates fireflies with small microcontrollers. Note that every firefly acts completely autonomously, it is not a preprogrammed pattern. It is a <a title="Wikipedia: Self organizing system" href="http://en.wikipedia.org/wiki/Self-organization" target="_blank">self organizing system</a>.</p>
<p>The NG version uses a small PCB (Printed Circuit Board) and a RGB-LED.</p>
<p><span id="more-117"></span></p>
<h3>Software</h3>
<p>Each firefly has a value that stands for the power to flash. This value rises over time. If the power reaches a certain limit, the firefly flashes and the power is reset to zero. If the firefly detects another flash nearby, it increases the power by a small boost value. That way it will flash slightly earlier than last time. Doing so over and over again may lead to all fireflies flashing in sync.</p>
<p>The RGB-firefly uses color to express its mood. If all is in sync, it will flash in relaxed and cool blue. If it detects flashes that are not in sync, it will get a bit uncomfortable and the color will slightly change to green, yellow and red.</p>
<h3>The circuit</h3>
<p><a title="Firefly schematic" href="http://tinkerlog.com/wp-content/uploads/2008/07/l-rgb_firefly.png"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/rgb_firefly.png" alt="Firefly schematic" /></a></p>
<p>The circuit is rather simple. Main parts are the microcontroller, the light sensor and the RGB-LED. The sensor and R4 are forming a voltage divider. An ADC (Analog Digital Conversion) channel at pin 3 is used to read the values of the sensor. The circuit is designed for 5V power supply. It has no integrated power regulator.</p>
<h3>Parts</h3>
<p><a title="Parts for a firefly" href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0008.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/dsc_0008-s.JPG" alt="dsc_0008-s.JPG" /></a></p>
<p>Here are the parts, that are needed for a single firefly.</p>
<ul>
<li>Firefly PCB</li>
<li>ATtiny13v, <a href="http://www.digikey.com/scripts/DkSearch/dksus.dll?PName?Name=ATTINY13V-10PU-ND" target="_blank">digi-key</a></li>
<li>RGB-LED, 4000 mcd, generic</li>
<li>8-pin socket, generic</li>
<li>3 * 100R resistor, R1, R2, R3, generic</li>
<li>1 * 4.7kR resistor, R4, generic</li>
<li>Photoresistor (<a title="Wikipedia: LDR" href="http://en.wikipedia.org/wiki/Light_Dependent_Resistor" target="_blank">LDR</a>), 4k to 11kR</li>
<li>pin header and socket (used for power supply)</li>
<li>ping pong ball</li>
</ul>
<p>Various types of photoresistors exist. I tried two different versions and both work well. Only resistor R4 has to be adjusted, as R4 and the photoresistor are building a voltage divider. Choose R4 in a way, that gives you a good range of voltage and still limits the current through the photoresistor.</p>
<p>My latest experiments showed that a <a title="Wikipedia: Phototransistor" href="http://en.wikipedia.org/wiki/Phototransistor" target="_blank">phototransistor</a> seems even better suited. Compared to the LDR, it does not have a memory effect and reacts faster (~5ms compared to ~50ms). I chose the <a title="SHF 3310 Datasheet" href="http://catalog.osram-os.com/catalogue/catalogue.do;jsessionid=FFAB8C81BA9688B547D698650FD47E37?act=downloadFile&amp;favOid=02000002000062a5000200b6" target="_blank">SFH 3310</a> and 100k for R4.</p>
<p>One thing to remember while choosing a light sensor, is that the spectral sensitivity of the sensor has to match the humans eye sensitivity (~400 nm &#8211; ~700 nm).</p>
<h3>Solder it</h3>
<p><a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0011.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0011.JPG" alt="s-dsc_0011.JPG" /></a></p>
<p>First solder the power connectors. Having a female and male connectors on the boards makes it easy to power a couple in a row.</p>
<p><a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0012.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0012.JPG" alt="s-dsc_0012.JPG" /></a></p>
<p><a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0013.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0013.JPG" alt="s-dsc_0013.JPG" /></a></p>
<p>Next insert the resistors. R1-3 are 100R, R4 is 4.7kR (depends on the sensor).</p>
<p><a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0015.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0015.JPG" alt="s-dsc_0015.JPG" /></a></p>
<p>Solder them.</p>
<p><a title="s-dsc_0016.JPG" href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0016.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0016.JPG" alt="s-dsc_0016.JPG" /></a></p>
<p>Cut off the legs.</p>
<p><a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0018.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0018.JPG" alt="s-dsc_0018.JPG" /></a></p>
<p>Next insert the 8-pin header for the controller. Note that the notch of the header points up.</p>
<p><a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0017.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0017.JPG" alt="s-dsc_0017.JPG" /></a></p>
<p>Solder the header.</p>
<p><a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0020.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0020.JPG" alt="s-dsc_0020.JPG" /></a></p>
<p>Next insert the LDR. For the LDR the orientation does not matter. For the phototransistor it does! The phototransistor has a long (emitter) and a short leg (collector). Insert it with the long leg at the bottom. And solder it.</p>
<p><a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0021.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/t-dsc_0021.JPG" alt="t-dsc_0021.JPG" /></a> <a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0022.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/t-dsc_0022.JPG" alt="t-dsc_0022.JPG" /></a></p>
<p>Now prepare the LED. Mine are clear and have a lens on top. Use sandpaper to roughen the surface. That way the light of the LED will be emitted in all directions.</p>
<p><a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0023.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0023.JPG" alt="s-dsc_0023.JPG" /></a></p>
<p>The RGB-LED has four pins. Mine is a common cathode.</p>
<ol>
<li>green (short)</li>
<li>blue (longer)</li>
<li>GND (longest)</li>
<li>red (shortest)</li>
</ol>
<p>Bend the two inner legs a bit off.<br />
<a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0024.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0024.JPG" alt="s-dsc_0024.JPG" /></a></p>
<p>Insert the LED. Be sure to have pin 1 in the hole with the square solder pad. The longest leg is in the diagonal opposite corner. Now solder it.</p>
<p><a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0025.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0025.JPG" alt="s-dsc_0025.JPG" /></a></p>
<p>Now it should look like this and we are almost done.</p>
<p><a href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0026.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0026.JPG" alt="s-dsc_0026.JPG" /></a></p>
<p>Drill a 4mm hole in the ping pong ball. Use a file to widen the hole a bit. Try to put it on the LED.</p>
<p>Program the controller and insert it into the socket. Take care of the notch.</p>
<p><a title="s-dsc_0027.JPG" href="http://tinkerlog.com/wp-content/uploads/2008/07/l-dsc_0027.JPG"><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0027.JPG" alt="s-dsc_0027.JPG" /></a></p>
<p>Here is the final result, the first firefly. Ready for some action.</p>
<h3>Issues</h3>
<p>There are minor issues that I want to have fixed for the next batch of PCBs.</p>
<ul>
<li>I will make the PCB a bit larger to make it more stable.</li>
<li>The circuit is missing bypass capacitors (100nF and 100uF). It works great without but it&#8217;s best practice to have them.</li>
<li>The sockets for the power supply are not protected against polarity reversal. Not quite sure how to fix this.</li>
</ul>
<h3>Conclusion</h3>
<p><img src="http://tinkerlog.com/wp-content/uploads/2008/07/s-dsc_0087.jpg" alt="Firefly" /></p>
<p>Playing with these fireflies is really mesmerizing. It&#8217;s not like most computer controlled things because it is non deterministic. Every time you start it, it will produce new patterns and behave differently.</p>
<p>I am quite happy how well the PCB worked out. It was my second design that I have had produced. Now I am feeling confident enough to go for a bigger batch of PCBs.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="440" height="268" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blip.tv/play/AcTTaAA" /><embed type="application/x-shockwave-flash" width="440" height="268" src="http://blip.tv/play/AcTTaAA"></embed></object></p>
<h3>Downloads and Links</h3>
<ul>
<li>Buy a kit at the <a title="Firefly Kit" href="http://store.tinkerlog.com/store/index.php?main_page=product_info&amp;cPath=2&amp;products_id=2" target="_blank">Tinker Store</a></li>
<li>Source and schematics (Eagle) <a title="rgb_firefly.zip" href="http://tinkerlog.com/wp-content/uploads/2008/07/rgb_firefly.zip">rgb_firefly.zip</a></li>
<li>Phototransistor <a title="Datasheet" href="http://catalog.osram-os.com/catalogue/catalogue.do;jsessionid=FFAB8C81BA9688B547D698650FD47E37?act=downloadFile&amp;favOid=02000002000062a5000200b6" target="_blank">SFH 3310 Datasheet</a></li>
<li><a href="http://tinkerlog.com/2007/05/11/synchronizing-fireflies/">Synchronizing Fireflies</a> (first version)</li>
<li><a title="Instructables: Synchronizing Fireflies" href="http://www.instructables.com/id/STP50NJF05JJP4N/">Synchronizing Fireflies</a> (at Instructables)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2008/07/27/synchronizing-fireflies-ng/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>Synchronizing Fireflies</title>
		<link>http://tinkerlog.com/2007/05/11/synchronizing-fireflies/</link>
		<comments>http://tinkerlog.com/2007/05/11/synchronizing-fireflies/#comments</comments>
		<pubDate>Fri, 11 May 2007 08:54:33 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[avr]]></category>
		<category><![CDATA[instructable]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[simulation]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/2007/05/11/synchronizing-fireflies/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>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.</p>
<p>This circuit simulates fireflies with small microcontrollers.</p>
<p><strong>A single Firefly</strong></p>
<p>The board consists of 25 fireflies. Every single firefly is self contained, there is no over-all controller. A single firefly consists of:</p>
<ul>
<li>ATtiny13 microcontroller, 1k SRAM, 64 bytes RAM</li>
<li>Light Dependant Resistor (LDR)</li>
<li>LED</li>
<li>2 resistors</li>
</ul>
<p><a href="http://www.flickr.com/photos/8123185@N02/487115001/" title="Photo Sharing"><img src="http://farm1.static.flickr.com/195/487115001_a09b802789_m.jpg" alt="IMGP1171" height="180" width="240" /></a></p>
<p>The circuit is the same as for the <a href="http://tinkerlog.com/2007/05/09/programmable-led/" title="Programmable LED">Programmable LED</a>.</p>
<p><strong>The complete Board</strong></p>
<p>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.</p>
<p>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 <a href="http://todbot.com/blog/2007/03/25/smart-led-prototypes/" title="Smart LED Prototypes">Smart LED Prototypes</a>.</p>
<p><a href="http://www.flickr.com/photos/8123185@N02/487115021/" title="Photo Sharing"><img src="http://farm1.static.flickr.com/205/487115021_ecfdfe31d3_m.jpg" alt="IMGP1200" height="180" width="240" /></a></p>
<p>Here is a video. It is a bit dark as my camera is not very suitable for this.<br />
<center><br />
<script src="http://blip.tv/scripts/pokkariPlayer.js" type="text/javascript"></script> <script src="http://blip.tv/syndication/write_player?skin=js&amp;posts_id=194990&amp;source=3&amp;autoplay=false&amp;file_type=flv&amp;player_width=320&amp;player_height=240" type="text/javascript"></script></p>
<p id="blip_movie_content_194990"><a href="http://blip.tv/file/get/9600baud-fireflies387.flv" onclick="play_blip_movie_194990(); return false;"><img src="http://blip.tv/file/get/9600baud-fireflies387.flv.jpg" title="Click To Play" border="0" /></a><br />
<a href="http://blip.tv/file/get/9600baud-fireflies387.flv" onclick="play_blip_movie_194990(); return false;">Click To Play</a></p>
<p><script type="text/javascript">	play_blip_movie_194990();</script> </center><strong>Links</strong></p>
<ul>
<li>Synchronizing Fireflies on <a href="http://www.instructables.com/id/STP50NJF05JJP4N/">Instructables</a>. That is a more detailed step-by-step instruction with more pictures, sourcecode, etc.</li>
<li>More on the algorithm can be found here: <a href="http://www.docomoeurolabs.de/pdf/publications/2006/2006_WSL_Firefly_Synchronization_Ad_Hoc_Networks.pdf"><br />
Firefly Synchronization Ad Hoc Networks</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2007/05/11/synchronizing-fireflies/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
<enclosure url="http://blip.tv/file/get/9600baud-fireflies387.flv" length="2410951" type="video/x-flv" />
		</item>
	</channel>
</rss>

