<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Flashing LEDs</title>
	<atom:link href="http://flashingleds.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://flashingleds.wordpress.com</link>
	<description></description>
	<lastBuildDate>Wed, 14 Mar 2012 22:29:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='flashingleds.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Flashing LEDs</title>
		<link>http://flashingleds.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://flashingleds.wordpress.com/osd.xml" title="Flashing LEDs" />
	<atom:link rel='hub' href='http://flashingleds.wordpress.com/?pushpress=hub'/>
		<item>
		<title>It&#8217;s drinking the water!</title>
		<link>http://flashingleds.wordpress.com/2011/07/23/its-drinking-the-water/</link>
		<comments>http://flashingleds.wordpress.com/2011/07/23/its-drinking-the-water/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 15:32:53 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flashingleds.wordpress.com/?p=336</guid>
		<description><![CDATA[I have a list of life goals, and somewhere on that list is &#8216;use a drinking bird toy to solve a problem&#8217;.  I leave it to you to judge what insight this offers into my character. I have not yet crossed this item off the list, but naturally in order to get underway I should first [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=336&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have a list of life goals, and somewhere on that list is &#8216;use a drinking bird toy to solve a problem&#8217;.  I leave it to you to judge what insight this offers into my character.<br />
<span id="more-336"></span></p>
<p>I have not yet crossed this item off the list, but naturally in order to get underway I should first at least <em>own</em> a dippy  bird. It turns out they can be had from DealExtreme for a very reasonable $4, so I&#8217;m now marginally closer to achieving a life goal. I don&#8217;t have an application in mind just at the moment; the classic is <a href="http://www.youtube.com/watch?v=sKdic5rBa7g">pushing a button repeatedly</a> or triggering a motion sensor but to my immeasurable displeasure neither of those represent a problem for me right now. Since I haven&#8217;t yet  identified a <strong>clever</strong> use, today we&#8217;re going to talk about  a completely <strong>stupid</strong> one: a drinking bird as a temperature sensor.</p>
<p>The dippy bird is a popular physics toy, because it demonstrates a lot of interesting thermodynamic principles (actually that&#8217;s not entirely true; there&#8217;s no such thing as an <em>interesting</em> thermodynamic principle). There is no shortage of explanations online about how the toy works, but to recap:</p>
<ol>
<li>The bird consists of two chambers (body and head) connected by a tube; the body is filled with a volatile solvent.</li>
<li>The head is covered in felt; when the felt is wet the head is cooled through evaporation.</li>
<li>This <a href="http://en.wikipedia.org/wiki/Ideal_gas_law">lowers the pressure</a> in the head and draws liquid up the neck</li>
<li>The bird becomes top heavy and tips over, which empties the liquid back into the lower chamber. Cycle restarts.</li>
</ol>
<p>The traditional glass of water just serves to keep the felt wet; the bird will continue to dip without it until the head dries.</p>
<p>As mentioned, there is a lot of physics happening in this bird, but as an <em>experimental</em> physicist I have no intention of invoking specific evaporation enthalpies or endoreversible heat engines. What I see when I look at this toy is:</p>
<p style="text-align:left;padding-left:30px;">Dip period =<strong> f(</strong>temperature, humidity, wind<strong>)</strong></p>
<p>where <strong>f</strong> is some function containing thermodynamics voodoo. I don&#8217;t particularly care about predicting <strong>f</strong>, I just want to know whether there is a predictable relationship between dipping period and the ambient temperature. This would form the basis of our temperature sensor. I figure I should be able to just take some measurements and work something out empirically.</p>
<h3>Taking data</h3>
<p>I set up the bird next to my desk for a few days with some data logging electronics. I&#8217;m measuring three quantities: ambient temperature with a DS18B20 temperature probe, relative humidity with an HH10D capacitive sensor and dipping period with a photo-interrupter ripped out of an old CD-ROM drive. (I tacked a piece of business card onto the body to trip the photointerrupter). Since this is indoors, we can eliminate wind as a variable.</p>
<p><a href="http://flashingleds.files.wordpress.com/2011/07/setup.png"><img class="aligncenter" title="Setup" src="http://flashingleds.files.wordpress.com/2011/07/setup.png?w=630&#038;h=467" alt="" width="630" height="467" /></a></p>
<p style="text-align:center;"><em>Science in action. Humidity sensor not shown</em></p>
<p>With a glass of water to keep the felt wet, the bird is happy to keep drinking for a very long time. I left this apparatus running for about 2 days, after which I got sick of it distracting me and dismantled it. This length of time constituted something like 5000 drinking cycles. The data is available <a href="http://flashingleds.files.wordpress.com/2011/07/data_actually_a_zip_file.doc">here</a> if you want to play with it, but allow me to plot it out:</p>
<p>&nbsp;<br />
<a href="http://flashingleds.files.wordpress.com/2011/07/path4600-8.png"><img class="aligncenter size-full wp-image-343" title="path4600-8" src="http://flashingleds.files.wordpress.com/2011/07/path4600-8.png?w=630&#038;h=341" alt="" width="630" height="341" /></a></p>
<p>&nbsp;<br />
Let me first note that the relative humidity (blue trace) is not calibrated (the I2C on that unit appeared to be broken, so I had to just use typical values), though I would still expect it to capture <em>trends</em> in the humidity.</p>
<p>The temperature (green trace) varies periodically over 24 hours as one might expect, but the overall variation is quite small since this is a climate controlled office (19.5 ± 1) °C.</p>
<p>The dipping period (red trace) is extremely noisy, and over small timescales quite unpredictable. I&#8217;ve marked two points of significance on the plot above. At some point I opened the window next to the bird, and with the rapid changes in temperature, airflow and humidity the bird went completely nuts (also reflected in the temperature). The second point happened when I topped up the glass the bird was drinking from, I&#8217;m guessing this temporarily spiked the evaporation rate.</p>
<p>Our first order of business is to clean up the dip period data, which I&#8217;ve done by running over it with a 30 point moving average filter. As you can see, this helped a lot:<br />
&nbsp;<br />
<a href="http://flashingleds.files.wordpress.com/2011/07/g4093-0-61.png"><img src="http://flashingleds.files.wordpress.com/2011/07/g4093-0-61.png?w=630&#038;h=342" alt="" title="Filtered" width="630" height="342" class="aligncenter size-full wp-image-381" /></a></p>
<p>&nbsp;<br />
Looking at the long-term trends in the data I can see something of a correlation between drinking period and ambient temperature (which is what we wanted), but the humidity doesn&#8217;t look like it&#8217;s having much of a bearing. To better demonstrate correlations, we can plot variables against each other:</p>
<p>&nbsp;<br />
<a href="http://flashingleds.files.wordpress.com/2011/07/correlation.png"><img class="aligncenter size-full wp-image-341" title="correlation" src="http://flashingleds.files.wordpress.com/2011/07/correlation.png?w=630&#038;h=308" alt="" width="630" height="308" /></a></p>
<p>&nbsp;<br />
From these we can see that there&#8217;s a clear (albeit slightly messy) negative linear relationship between the dipping period and ambient temperature. This is exactly what we would expect; as the temperature goes up the evaporative cooling is enhanced, so the drinking process goes faster. The second plot (against humidity) is a complete mess with no discernible relationship. Not quite what I would have expected, but oh well &#8211; for the present purposes it&#8217;s a good thing.</p>
<p>To bring things back to the idea of a temperature sensor: by fitting a line to the first  plot  above we get a formula for converting dipping period into temperature. How good is it?</p>
<p>&nbsp;<br />
<a href="http://flashingleds.files.wordpress.com/2011/07/result.png"><img class="aligncenter" title="Result" src="http://flashingleds.files.wordpress.com/2011/07/result.png?w=630&#038;h=351" alt="" width="630" height="351" /></a></p>
<p>&nbsp;<br />
Pretty good! And by pretty good, I mean &#8220;worst case error of 0.5 degrees in an operating range of 2 degrees, with a response time of approximately 15 minutes&#8221;.</p>
<p>Which is to say, <em>barely passable</em>. But hey, cut it some slack, it&#8217;s based on a frickkin&#8217; dippy bird<em>.</em></p>
<p style="padding-left:30px;">A <em>dippy bird</em>!</p>
<p style="padding-left:60px;">Is your heart made of<strong> stone?</strong></p>
<p>Incidentally I did try to repeat the data collection at home where lately the temperature has been hanging around 14°C. Evaporation is then so slow that it takes the bird about 10 minutes to drink; so not ideal for a sensor.</p>
<p>Lest you suppose that I am alone in my ambitions, some kind of weirdo grasping desperately to the dream of a drinking bird toy serving a higher purpose, allow me to offer you some perspective from the scientific literature.</p>
<ul>
<li>Ralph Lorenz carried out a quite similar experiment to this in 2006, published in the ever entertaining American Journal of Physics (<a href="http://www.df.uba.ar/users/giribet/f4/drinking_bird.pdf">you should read it</a>, it&#8217;s a great paper). As we&#8217;ve seen in the preceding plots, the dipping period is very erratic on small time scales. Ralph suggested using this as a seed for random number generation</li>
<li>Ralph also noted that the water in the glass evaporates 10x faster when the bird is drinking it, and hence suggested that drinking birds might be useful as humidifiers.</li>
<li>Don Rathjen of the Exploratorium discussed hooking up a ratchet to the bird to create a mighty 1μW engine.</li>
<li>R. Murrow in a <a href="http://www.rand.org/pubs/papers/2008/P3367.pdf">1966 report</a> proposed using dippy birds to irrigate crops near the Nile. I am not capable of making something like that up.</li>
</ul>
<div>
<p>To conclude: I have successfully made a temperature sensor out of a drinking bird, but it&#8217;s not a very good one. But let&#8217;s not be so negative about it. Let&#8217;s summarize this the semiconductor industry way: with an overblown press release from the marketing department.<br />
&nbsp;</p>
<h1><span style="color:#999999;">PRESS RELEASE</span></h1>
<h2 style="text-align:left;">SOME DUDE ON THE INTERNET LAUNCHES INDUSTRY&#8217;S MOST CHARMING TEMPERATURE SENSOR FEATURING BEST-IN-CLASS DIPPY BIRD DENSITY</h2>
<h3>Jul. 24, 2011 <span class="Apple-style-span" style="font-size:13px;font-weight:normal;">- <span class="Apple-style-span" style="font-size:13px;font-weight:normal;">The FlashingLEDs blog, an industry leader in mildly amusing electronics project </span>documentation today introduced a new model of temperature sensor, the FLED538I-AAF-$XQ12. The product features an innovative drinking bird toy topology in a compact 20 cm<sup>3</sup> package. FlashingLEDs&#8217; new sensor is designed for the demanding needs of process monitoring in stable, climate controlled indoor environments.</span></h3>
<p>&#8220;FlashingLEDs has one of the industry&#8217;s broadest portfolios of stupid crap, and to meet expanding customer needs we are adding this amazing drinking bird transducer concept,&#8221; noted Craig, director of Marketing and chief architect of the drivel on FlashingLEDs. &#8220;This revolutionary new paradigm of temperature sensing puts more dippy birds in the field than any other technology on the market today, and we feel that this is an important new direction for the industry.&#8221;</p>
</div>
<div><a href="http://flashingleds.files.wordpress.com/2011/07/result.png"><br />
</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashingleds.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashingleds.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashingleds.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashingleds.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flashingleds.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flashingleds.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flashingleds.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flashingleds.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashingleds.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashingleds.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashingleds.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashingleds.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashingleds.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashingleds.wordpress.com/336/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=336&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flashingleds.wordpress.com/2011/07/23/its-drinking-the-water/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12612e726a81d5e75ea7b55c8019023e?s=96&#38;d=identicon&#38;r=R" medium="image">
			<media:title type="html">flashingleds</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/07/setup.png" medium="image">
			<media:title type="html">Setup</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/07/path4600-8.png" medium="image">
			<media:title type="html">path4600-8</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/07/g4093-0-61.png" medium="image">
			<media:title type="html">Filtered</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/07/correlation.png" medium="image">
			<media:title type="html">correlation</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/07/result.png" medium="image">
			<media:title type="html">Result</media:title>
		</media:content>
	</item>
		<item>
		<title>Of or pertaining to cake</title>
		<link>http://flashingleds.wordpress.com/2011/04/23/of-or-pertaining-to-cake/</link>
		<comments>http://flashingleds.wordpress.com/2011/04/23/of-or-pertaining-to-cake/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 14:22:41 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flashingleds.wordpress.com/?p=29</guid>
		<description><![CDATA[In my research group there is something of a tradition to make novelty cakes for the farewell gatherings when someone leaves. I&#8217;m not going to lie to you: this is a tradition invented and driven by two of us and tolerated by the others. The madness began with a multimeter cake for a departing lab technician: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=29&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://flashingleds.files.wordpress.com/2011/04/sr830.jpg"><br />
</a>In my research group there is something of a tradition to make novelty cakes for the farewell gatherings when someone leaves. I&#8217;m not going to lie to you: this is a tradition invented and driven by two of us and <em>tolerated</em> by the others.</p>
<p style="text-align:center;"><span id="more-29"></span></p>
<p style="text-align:left;">The madness began with a multimeter cake for a departing lab technician:</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2011/03/cake.jpg"><img class="aligncenter size-full wp-image-294" title="Edible DMM" src="http://flashingleds.files.wordpress.com/2011/03/cake.jpg?w=630" alt=""   /></a><em>Sadly as an engineer he was unimpressed with a measely 3 digit meter</em></p>
<p>Over time things started to get out of control, with subsequent efforts over the years encompassing entirely edible renditions of:</p>
<ul>
<li>A gated silicon quantum dot</li>
<li>Don Eigler&#8217;s <a href="http://www.almaden.ibm.com/vis/stm/">quantum corral</a></li>
<li>A silicon nanowire, along with a laptop measuring transport through it</li>
<li>The <a href="http://en.wikipedia.org/wiki/Kane_quantum_computer">Kane quantum computer</a></li>
</ul>
<p>along with a few others. Sadly I don&#8217;t have a full set of photos to show you. Our most recent effort returned to the theme of measurement equipment with the venerable SR830 lock-in amplifier:</p>
<p><a href="http://flashingleds.files.wordpress.com/2011/04/sr830.jpg"><img title="Edible lockin" src="http://flashingleds.files.wordpress.com/2011/04/sr830.jpg?w=630&#038;h=396" alt="" width="630" height="396" /></a></p>
<p style="text-align:center;"><em>&gt;100dB of dynamic reserve and &gt;3 sticks of butter</em></p>
<p>At some point along the way I got it into my head that the pinnacle of cake achievement would be one of either:</p>
<ul>
<li>A cake with (edible) moving parts</li>
<li>A cake with (edible) electronic functionality</li>
</ul>
<p>In terms of electronics expertise I am a pretend embedded engineer in my spare time; in terms of mechanical expertise I am an unmitigated disaster who thinks all solutions begin and end with a hot glue gun. I recognize that my best hope of success lies with edible electronics.</p>
<p>You will probably not be surprised to learn that very few electrical components can be rendered in an edible form. Even the most basic element, low resistance wiring, is difficult. The first (edible) thing that comes to mind is something based on salt, but there are two problems with this:</p>
<ol>
<li>Nobody wants to eat a cake decorated with some kind of gross salt paste, with the possible exception of the Dutch (see: <a href="http://en.wikipedia.org/wiki/Salty_liquorice">Salty Liquorice</a>).  I am all about putting <a href="http://en.wikipedia.org/wiki/Vegemite">gross salt paste</a> on my toast, but not my cake.</li>
<li>Ionic conductivity is not very good. Wikipedia tells me that seawater has a typical resistivity of 20 Ωcm, which means a 10cm long, 5mm diameter tube of it would be about 1kΩ.  This is not outrageous, but suggests that you would need to use something <strong>very</strong> salty to get reasonable wires.</li>
</ol>
<p>The breakthrough came when I discovered that edible silver foil is a real thing, that you can buy. It&#8217;s popular in Indian sweets, and provided it&#8217;s relatively pure it is generally regarded as safe to eat &#8211; the foil is only a few microns thick so the quantities involved are low. (As always, you will find dissenting opinions on the internet; certainly go and do some reading if you&#8217;re concerned).</p>
<p>In truth it was <a href="http://www.amazon.com/gp/product/0061238686/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;tag=fla02-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=006123868">The Hungry Scientist Handbook</a> that put me onto this, and furthermore they had even gone ahead and done exactly what I had in mind! Their recipe (see <a href="http://splendidtable.publicradio.org/recipes/dessert_led_cake.shtml">here</a>) used silver foil wrapped around liquorice strips to illuminate a chain of LEDs on a cake. (Obviously the LEDs are not edible, but hey, you have to start somewhere)</p>
<p>Clearly it would be necessary to raise the bar. Instead of a chain of static, battery driven LEDs on a cake,  I want &#8230; <strong>a scrolling LED sign cake</strong>.</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2011/03/fail.jpg"><img class="aligncenter size-full wp-image-295" title="Fail" src="http://flashingleds.files.wordpress.com/2011/03/fail.jpg?w=630&#038;h=472" alt="" width="630" height="472" /></a><span class="Apple-style-span" style="font-style:normal;"><em>Ok, so maybe we relaxed our typically stringent aesthetic standards this time&#8230;</em></span></p>
<address><a href="http://flashingleds.files.wordpress.com/2010/11/fail.jpg"><br />
</a></address>
<p>And that&#8217;s exactly what we did. Because writing something in icing is last century my friends. By coating only one side of a liquorice strip with the foil, you can cross wires without them shorting to each other. Then you just have to lay out a matrix and stick your carefully cleaned LEDs into the straps. A microcontroller is driving the LEDs to scroll out a message. For the curious, the source code is <a href="http://flashingleds.files.wordpress.com/2011/04/cake-dot-c-is-the-actual-filename2.doc">here</a>. It&#8217;s written for an ATMega8 running on the 8MHz internal oscillator, but will also compile on the Mega48&#8230;328 line. It should be easy to employ for any 5&#215;8 LED matrix, cake or not.</p>
<p>It all sounds very easy, and I have so far been describing it in the manner of somebody who has realized absolute success in their venture. Sadly that is not quite the case.  The truth is that the cake was something of a failure, saved only by the temerity of its vision (and also its deliciousness). It turns out that silver foil is extremely difficult to work with. In the final product we ended up with a lot of hairline cracks in the foil which resulted in a number of broken connections. A few LEDs still flashed in time, but not enough to carry the effect.</p>
<p>So the cake ended up being salty anyway. Salty from my<em> tears of shame</em>.</p>
<p>Here is the sign executed on a more conventional LED matrix (halfway through my camera gets out of sync so it looks a little funky). If you&#8217;re reading this Mark, here&#8217;s what I was trying to say:</p>
<span style="text-align:center; display: block;"><a href="http://flashingleds.wordpress.com/2011/04/23/of-or-pertaining-to-cake/"><img src="http://img.youtube.com/vi/3aGnL1Gc0Gc/2.jpg" alt="" /></a></span>
<p>I&#8217;ve put this post up for two reasons:</p>
<p>1) Despite failing in the end, it was still awesome.</p>
<p>2) Hopefully some kindred spirit out there takes what I&#8217;ve learned and has another, more competent attempt at it. Please do, and please let me know how it goes!</p>
<p>P.S. I&#8217;ve since seen edible silver paint being used which looks much easier to work with: <a href="http://www.youtube.com/watch?v=pdAqI8IAxCE">http://www.youtube.com/watch?v=pdAqI8IAxCE</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashingleds.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashingleds.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashingleds.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashingleds.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flashingleds.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flashingleds.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flashingleds.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flashingleds.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashingleds.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashingleds.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashingleds.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashingleds.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashingleds.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashingleds.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=29&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flashingleds.wordpress.com/2011/04/23/of-or-pertaining-to-cake/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12612e726a81d5e75ea7b55c8019023e?s=96&#38;d=identicon&#38;r=R" medium="image">
			<media:title type="html">flashingleds</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/03/cake.jpg" medium="image">
			<media:title type="html">Edible DMM</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/04/sr830.jpg" medium="image">
			<media:title type="html">Edible lockin</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/03/fail.jpg" medium="image">
			<media:title type="html">Fail</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixing a Broken iPod</title>
		<link>http://flashingleds.wordpress.com/2011/03/27/fixing-a-broken-ipod/</link>
		<comments>http://flashingleds.wordpress.com/2011/03/27/fixing-a-broken-ipod/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 06:18:18 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flashingleds.wordpress.com/?p=20</guid>
		<description><![CDATA[A little while back I was tasked with repairing an (out of warranty) 2nd generation iPod nano. The play/pause button didn&#8217;t work, which is particularly debilitating because without it you can no longer: Play Pause Turn it off until the battery runs out As it turns out, iPods have some remote control functionality through the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=20&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A little while back I was tasked with repairing an (out of warranty) 2nd generation iPod nano. The play/pause button didn&#8217;t work, which is particularly debilitating because without it you can no longer:</p>
<ul>
<li>Play</li>
<li>Pause</li>
<li>Turn it off until the battery runs out</li>
</ul>
<p><span id="more-20"></span></p>
<p>As it turns out, iPods have some remote control functionality through the dock connector, and since we live in the future all the details of the <a href="http://www.adriangame.co.uk/ipod-acc-pro.html">protocol</a> and the <a href="http://pinouts.ru/PortableDevices/ipod_pinout.shtml">connector pinout</a> are  nicely laid out on the internet. The solution to the broken button dilemma was therefore pretty straightforward: employ a microcontroller between the iPod and an external pushbutton, sending serial commands to mimic the behaviour of the regular play/pause button. Essentially I built a single button remote control.</p>
<p>Dock connectors are <a href="http://www.sparkfun.com/products/633">available at Sparkfun</a> for $4. Looking at it you can see that there&#8217;s some space in the shell to stuff some electronics, and even a hole where the cable normally goes that we can use for a button.</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2011/03/00633-1.jpg"><img class="aligncenter size-full wp-image-267" title="00633-1" src="http://flashingleds.files.wordpress.com/2011/03/00633-1.jpg?w=630" alt="Ipod dock connector + shell"   /></a></p>
<p style="text-align:center;"><em>Order two; you&#8217;re pretty much guaranteed to screw it up the first time</em></p>
<p style="text-align:left;">The smallest micro I had on hand was an 8-pin through-hole <a href="http://www.atmel.com/dyn/products/product_card.asp?part_id=3175">ATTiny13</a>. This will fit, but only without a PCB. A surface mount version would be more sensible if you wanted to go about this in a more carefully planned manner than me. There&#8217;s not a lot else that needs to go in; the Tiny13 has a 9.6MHz internal oscillator and you can steal a clean 3.3V from the iPod on pin 18. The only external components I used were:</p>
<ol>
<li>10kΩ pullup on the Tiny13 reset line</li>
<li>pushbutton</li>
<li>10kΩ pullup on pushbutton</li>
<li>470kΩ across ipod pins 1-21 to enable the serial interface</li>
</ol>
<p style="text-align:left;">I just soldered the wires and resistors directly to the Tiny13 and the connector (tricker than it sounds). Unfortunately I didn&#8217;t take any pictures, but just imagine a messy pile of crap and you&#8217;ll have the idea. The finished product looks like this:</p>
<p style="text-align:left;"><img title="Not TOO ugly, right? Right?" src="http://flashingleds.files.wordpress.com/2010/06/ipod-fix.jpg?w=630&#038;h=186" alt="" width="630" height="186" /></p>
<p style="text-align:left;">There&#8217;s a bunch of hot glue holding everything in place. I actually tried some $0.20 cyanoacrylate superglue first, but that stuff is crazy runny<em>. </em>I was testing the circuit on my own iPod at the time, and the glue immediately wicked up through the connector and <em>backfilled my iPod with superglue</em>. Recoverable, but not cool.</p>
<p>To minimise drain on the iPod battery the program keeps the Tiny13 in power-down sleep mode for most of its life. According to the datasheet this should result in a 500nA supply current, with momentary periods of a few mA when you push the button and wake it up. That&#8217;s what the literature says, but purely because I can I went ahead and hooked one up to a preposterously expensive piece of DC measurement gear, the mighty 236-SMU from Keithley:</p>
<p style="text-align:left;"><a href="http://flashingleds.files.wordpress.com/2011/03/graph0.jpg"><img class="aligncenter size-medium wp-image-277" title="You will die before this empties your battery" src="http://flashingleds.files.wordpress.com/2011/03/graph0.jpg?w=300&#038;h=276" alt="" width="300" height="276" /></a></p>
<p style="text-align:left;">This was measured with a supply voltage of 3.3V, running initially on the 9.6MHz oscillator then switching into the power down sleep mode. The resulting current draw is a paltry 185nA, better than expected from the datasheet.  Considering that the iPod battery is (I think) 400mAh, it would take nearly 250 years for this thing to drain the battery. Basically what I&#8217;m saying is it&#8217;s fine to leave it plugged in.</p>
<p style="text-align:left;">I never cease to be astonished when I make something and it actually works, and this is no exception since <strong>it does indeed work very well</strong>. The source code is <a href="http://flashingleds.files.wordpress.com/2011/03/ipod-actually-a-c-file.doc">here</a> for those after more details. It&#8217;s a very simple control loop based on interrupts from the pushbutton; the most complicated aspect is the software UART. The iPod doesn&#8217;t seem very picky about the baud rate; I shot for 19.2k but the stability of the 9.6MHz internal oscillator is not stellar &#8230; the thing worked fine regardless.</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2011/02/ipod.png"><img class="aligncenter size-full wp-image-266" title="MS Paint for the win" src="http://flashingleds.files.wordpress.com/2011/02/ipod.png?w=630&#038;h=351" alt="MS Paint for the win" width="630" height="351" /></a></p>
<p style="text-align:left;">&nbsp;</p>
<p style="text-align:left;">If you&#8217;d like more information, you can read about other ipod interfacing projects <a href="http://courses.cit.cornell.edu/ee476/FinalProjects/s2007/awr8_asl45/awr8_asl45/index.html">here</a> and <a href="http://pargon.nl/?p=3">here</a></p>
<p style="text-align:left;">&nbsp;</p>
<p style="text-align:left;">&nbsp;</p>
<p style="text-align:left;">&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashingleds.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashingleds.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashingleds.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashingleds.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flashingleds.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flashingleds.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flashingleds.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flashingleds.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashingleds.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashingleds.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashingleds.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashingleds.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashingleds.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashingleds.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=20&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flashingleds.wordpress.com/2011/03/27/fixing-a-broken-ipod/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12612e726a81d5e75ea7b55c8019023e?s=96&#38;d=identicon&#38;r=R" medium="image">
			<media:title type="html">flashingleds</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/03/00633-1.jpg" medium="image">
			<media:title type="html">00633-1</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/06/ipod-fix.jpg" medium="image">
			<media:title type="html">Not TOO ugly, right? Right?</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/03/graph0.jpg?w=300" medium="image">
			<media:title type="html">You will die before this empties your battery</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/02/ipod.png" medium="image">
			<media:title type="html">MS Paint for the win</media:title>
		</media:content>
	</item>
		<item>
		<title>NintendOscope</title>
		<link>http://flashingleds.wordpress.com/2011/02/13/nintendoscope/</link>
		<comments>http://flashingleds.wordpress.com/2011/02/13/nintendoscope/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 07:03:24 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flashingleds.wordpress.com/?p=52</guid>
		<description><![CDATA[A couple of months ago I explained how to access and interpret the video signal from the original grayscale Gameboy. My image reconstruction at the time was done in a graphing program with some saved data. Good for a proof of principle, but a little bit lame as far as applications go. Let me show you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=52&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A couple of months ago <a href="http://flashingleds.wordpress.com/2010/10/26/intercepting-the-gameboy-lcd/">I explained</a> how to access and interpret the video signal from the original grayscale Gameboy. My image reconstruction at the time was done in a graphing program with some saved data. Good for a proof of principle, but a little bit lame as far as applications go.</p>
<p>Let me show you where I was actually headed with this project:</p>
<p style="text-align:center;"><span id="more-52"></span><a href="http://flashingleds.files.wordpress.com/2011/02/in-action1.jpg"><img class="aligncenter size-full wp-image-211" title="Oh my gosh that might be the coolest thing I've ever seen" src="http://flashingleds.files.wordpress.com/2011/02/in-action1.jpg?w=630&#038;h=472" alt="" width="630" height="472" /></a></p>
<p style="text-align:left;">That&#8217;s right my friends. Gameboy on an oscilloscope. I&#8217;ll walk you through the details of what&#8217;s going on here, but if you&#8217;re feeling impatient there&#8217;s a YouTube clip at the end of the post.</p>
<p style="text-align:left;">This project can be pretty cleanly broken up into two parts: Getting the data from the Gameboy and then displaying it on the oscilloscope.</p>
<p style="text-align:left;"><strong>1) Getting data from the Gameboy</strong></p>
<p style="text-align:left;">When I <a href="http://flashingleds.wordpress.com/2010/10/26/intercepting-the-gameboy-lcd/">discussed the video signals</a> earlier, I implied that they were slow enough to be trivial for your typical 20MHz 8-bit microcontroller. In actual fact a 4MHz datastream is <strong>fast</strong>! You get 250ns between rising clock edges, and in that time you need to:</p>
<ul>
<li>Wait for the clock edge (it&#8217;s not perfectly synchronous, so you can&#8217;t just use a 4MHz timer)</li>
<li>Read the digital value on two pins</li>
<li>Store that value in memory somewhere</li>
</ul>
<p>At 20MHz, you&#8217;ve got 5 clock cycles to do it. Good luck with that.</p>
<p>I thought about this for a while, and decided what I needed was some kind of serial→ parallel conversion. That way I could read in 8 bits at a time on each channel, and only have to do it every (250ns*8)=2μs. Since I&#8217;m not yet one of the cool kids who plays with FPGAs, I started doing this with 74 logic &#8211; counting clock pulses, latching data from a serial-parallel shift register every 8 counts, so forth and so such. It took a while.</p>
<p>And then a month into setting up this complicated circuit, it struck me that I am a moron; that <strong>most microcontrollers already have exactly this feature and it&#8217;s called SPI</strong>. Also since SPI modules are done in hardware they run much faster than you could do in software, definitely fast enough to keep up with this video signal in any case.</p>
<p>With that little design hiccup aside, the rest went pretty quickly. I&#8217;m using an XMega128A1 controller on one of Justin Mattair&#8217;s <a href="http://xmega.mattair.net/" target="_blank">XMEGA development boards</a>. This thing runs at 32MHz, and is a great option for this project because the XMega series have peripherals coming out of their asses. Seriously, there&#8217;s 4 SPI modules, 2 DACs, something like 800 timers and probably a couple thousand UART modules, I lost count.</p>
<p>In this case having two SPI modules makes life very easy &#8211; one for each data channel. I gave each module one of the data channels and the clock signal from the Gameboy. The HSYNC and VSYNC signals go to IO pins to keep everything synchronized. I&#8217;ll try to keep this description fairly high level; check out the <a href="http://flashingleds.files.wordpress.com/2011/02/nintendoscope-actually-c.doc">source code</a> if you want to get into the details.</p>
<p>The only other thing to attend to is level conversion &#8211; the Gameboy is giving 5V signals but the XMega wants 3.3V. Since this is a read-only arrangement, it&#8217;s sufficient to just use a voltage divider on every signal line.</p>
<p>The end result of this is that I have a couple of arrays of pixel data that are being updated in real time. All I have to do is find something suitably cool to do with that information.</p>
<p><strong>2) Putting it on a frickin oscilloscope</strong></p>
<p>Here&#8217;s a shot of the hardware, which I&#8217;m now halfway through describing. The other half consists of the digital-to-analog converters responsible for driving the oscilloscope.</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2011/02/electronics2.jpg"></a><a href="http://flashingleds.files.wordpress.com/2011/02/electronics2.jpg"><img class="aligncenter size-full wp-image-220" title="The brains of the operation" src="http://flashingleds.files.wordpress.com/2011/02/electronics2.jpg?w=630&#038;h=485" alt="" width="630" height="485" /></a></p>
<p style="text-align:left;">One of the neat things about analog scopes is how easy it is to repurpose the display. You are typically given the option to switch from  the time-sweep mode of operation to instead control the brightness and x-y deflection with analog voltages. Which means you just have to stick some DACs on your micro to produce those voltage signals and you have a video display! There a whole bunch of great projects along these lines; two very noteworthy examples are <a href="http://www.dutchtronix.com/ScopeClockH3-1-Enhanced.htm">Jan&#8217;s clock</a> and <a href="http://www.msarnoff.org/terminalscope/">Matthew&#8217;s incredible terminal console</a>.</p>
<p style="text-align:left;">The scope I have is a PM3065, a 100MHz dual channel cathode ray scope and apparently a collaboration between Fluke and Phillips.  I paid AU$130 second hand last year. Importantly it has a BNC input at the rear for controlling the beam intensity (&#8220;Z input&#8221;), in this case going smoothly from full-on at about 0.8V  to completely blanked at about 1.06V. The exact numbers depend on what you have the intensity knob set to, but 26mV is more or less the range.</p>
<p style="text-align:left;">Let&#8217;s discuss the X-Y control first. Switched to XY mode, the voltage on the first input controls the X-deflection of the spot and the second controls the Y-deflection. By applying sawtooth ramp signals to both inputs you can raster out a square.</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2011/02/xy-mode1.jpg"><img class="aligncenter size-full wp-image-225" title="XY mode" src="http://flashingleds.files.wordpress.com/2011/02/xy-mode1.jpg?w=630&#038;h=377" alt="" width="630" height="377" /></a><em>Tracing out a square in XY-mode</em></p>
<p>To match the Gameboy resolution we need a resolution of 160 x 144 pixels (DAC steps), and to get a halfway decent framerate we&#8217;re going to need to sweep them pretty fast. The analog voltage range is not particularly important because we can easily adjust the gain settings on the scope.</p>
<p>This is where the boatload of inbuilt peripherals on the XMega comes in handy again &#8211; it has 2 inbuilt 12-bit DACs that can run at 1MHz. They have a little bit of non-linearity at low and high values, but with 4096 (12bit) resolution there&#8217;s plenty of room to just add an offset to the ramps.</p>
<p>We&#8217;re nearly there &#8211; all that&#8217;s left is to set the intensity at each point of the raster according to the pixel data read from the Gameboy. Sadly we&#8217;ve used up the 2 inbuilt DACs to do the rastering, but since we only need 2-bit control a simple R2R ladder will suffice. There&#8217;s a little bit of fine tuning required though &#8211; for the intensity modulation input we need something like 9mV steps with about 800mV offset. Here&#8217;s what I&#8217;m using:</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2011/02/schematic.jpg"><img class="aligncenter size-full wp-image-219" title="Schematic for the R2R DAC responsible for the intensity modulation" src="http://flashingleds.files.wordpress.com/2011/02/schematic.jpg?w=630&#038;h=560" alt="" width="630" height="560" /></a><em>Schematic for the R2R DAC controlling spot intensity. </em><em>Values in red are what I actually used.</em></p>
<p style="text-align:left;">Pretty straightforward I hope. I built it all on breadboard with multi-turn potentiometers so I could easily tune resistor values/swap things out. By putting a 2-bit value on DB1 and DB2 with a couple of IO pin on the XMega, we get an analog voltage out with an adjustable step size and offset. A good check that this works is to put the scope on regular (time sweep) mode and watch the R2R analog output. You&#8217;ll see the discrete values, and if at the same time you connect that output to the intensity modulation input you get something like this:</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2011/02/intensity-modulation1.jpg"><img class="aligncenter" title="intensity modulation - 4 bit grayscale" src="http://flashingleds.files.wordpress.com/2011/02/intensity-modulation1.jpg?w=300&#038;h=225" alt="" width="300" height="225" /></a></p>
<p style="text-align:center;"><em>Demonstrating intensity modulation</em></p>
<p style="text-align:left;">From there it&#8217;s easy to play with the various potentiometers until you get 4 different spot intensities (as I have in the picture above).</p>
<p style="text-align:left;">And that&#8217;s pretty much it! The program logic is along the lines of:</p>
<h4><span style="color:#888888;">Capture a frame:</span></h4>
<h4 style="padding-left:30px;"><span style="color:#888888;">Listen in on the video data until a new frame starts (VSYNC pulse)</span></h4>
<h4 style="padding-left:30px;"><span style="color:#888888;">Capture the pixel data for that frame with the SPI ports </span></h4>
<h4><span style="color:#888888;">Draw the frame:</span></h4>
<h4 style="padding-left:30px;"><span style="color:#888888;">For each pixel in Y (0&#8230;144)</span></h4>
<h4 style="padding-left:60px;"><span style="color:#888888;">Increment the Y-deflection DAC output</span></h4>
<h4 style="padding-left:60px;"><span style="color:#888888;">For each pixel in X (0&#8230;160)</span></h4>
<h4 style="padding-left:90px;"><span style="color:#888888;">Increment the X-deflection DAC output</span></h4>
<h4 style="padding-left:90px;"><span style="color:#888888;">Set the R2R DAC value for this pixel </span></h4>
<h4><span style="color:#888888;">Repeat</span></h4>
<p><span style="color:#888888;"><br />
</span></p>
<p>The XMega is capable of capturing data at the full 60Hz that the Gameboy is refreshing, but in the above scheme we stop capturing when we draw a frame to the screen. While that&#8217;s going on we miss some frames; at the moment it captures one then skips three. This gives a 15Hz refresh rate on the scope. Here&#8217;s a logic analyzer capture that shows this going on:</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2011/02/frame.png"><img class="size-full wp-image-227 aligncenter" title="Logic capture of the whole shebang" src="http://flashingleds.files.wordpress.com/2011/02/frame.png?w=630&#038;h=321" alt="" width="630" height="321" /></a><em>Logic analyzer of the NintendOscope; showing 6.5 screen refreshes.</em></p>
<p style="text-align:left;">The signals of interest here are #3 (Gameboy rereshing screen), #5 (XMega capturing data) and #6 (XMega drawing). #3 is just the VSYNC signal from the Gameboy, while I&#8217;m getting #5 and #6 from flashing status LEDs on the XMega board. #5 goes high while it&#8217;s reading in a frame, #6 while it&#8217;s drawing on the scope.</p>
<p style="text-align:left;">15Hz is a slow enough frame rate to be kind of annoying. The XMega has the speed to push this up to at least 20Hz,  however at that speed the image starts to look terrible. I&#8217;m using a 1μs delay after each pixel to give the DACs time to settle. We can check this out with the scope by looking at DAC sweeps:</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2011/02/raster-settle1.jpg"></a><a href="http://flashingleds.files.wordpress.com/2011/02/settling-times.jpg"><img class="size-full wp-image-234 aligncenter" title="settling times" src="http://flashingleds.files.wordpress.com/2011/02/settling-times.jpg?w=630&#038;h=187" alt="Settling times for the DACs" width="630" height="187" /></a><br />
<em>Settling times for the horizontal raster DAC (left) and spot intensity DAC (right). Timebase is 2μs/division</em></p>
<p style="text-align:left;">Unsurprisingly the culprit is the R2R DAC output, which is being passed back and forth all over a breadboard. It&#8217;s taking about 1μs to settle after small changes and nearly 2μs for large changes. Hence the 1μs delay in the raster loop &#8211; it sharpens up the picture at the expense of refresh rate.</p>
<p style="text-align:left;">It would be very easy to improve on this by simply relocating the R2R ladder and amplifier to some stripboard or a proper PCB. Alternatively you could think about scrapping the R2R DAC for a decent IC version, or shopping around for a micro with 3 DACs.</p>
<p style="text-align:left;">And now I&#8217;ll leave you with a video of it in action. Sound is coming from the Gameboy speaker, and the weird horizontal brightness bands are an artifact of trying to film it. Enjoy, and be sure to let me know if you try something similar!</p>
<span style="text-align:center; display: block;"><a href="http://flashingleds.wordpress.com/2011/02/13/nintendoscope/"><img src="http://img.youtube.com/vi/-7LzetRlZEg/2.jpg" alt="" /></a></span>
<div>[<a href="http://flashingleds.files.wordpress.com/2011/02/nintendoscope-actually-c.doc" target="_blank">Source code</a>]</div>
<div>P.S. It&#8217;s also worth pointing out the work going on at <a href="http://www.rival-corp.com">RivalCorp</a> using an FPGA for the capture and outputting to VGA instead of an oscilloscope. I believe he&#8217;s looking at eventually selling a kit for it?</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashingleds.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashingleds.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashingleds.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashingleds.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flashingleds.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flashingleds.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flashingleds.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flashingleds.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashingleds.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashingleds.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashingleds.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashingleds.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashingleds.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashingleds.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=52&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flashingleds.wordpress.com/2011/02/13/nintendoscope/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12612e726a81d5e75ea7b55c8019023e?s=96&#38;d=identicon&#38;r=R" medium="image">
			<media:title type="html">flashingleds</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/02/in-action1.jpg" medium="image">
			<media:title type="html">Oh my gosh that might be the coolest thing I&#039;ve ever seen</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/02/electronics2.jpg" medium="image">
			<media:title type="html">The brains of the operation</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/02/xy-mode1.jpg" medium="image">
			<media:title type="html">XY mode</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/02/schematic.jpg" medium="image">
			<media:title type="html">Schematic for the R2R DAC responsible for the intensity modulation</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/02/intensity-modulation1.jpg?w=300" medium="image">
			<media:title type="html">intensity modulation - 4 bit grayscale</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/02/frame.png" medium="image">
			<media:title type="html">Logic capture of the whole shebang</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2011/02/settling-times.jpg" medium="image">
			<media:title type="html">settling times</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8216;Unlocking&#8217; RS232 output from your multimeter</title>
		<link>http://flashingleds.wordpress.com/2010/11/30/unlocking-rs232-output-from-your-multimeter/</link>
		<comments>http://flashingleds.wordpress.com/2010/11/30/unlocking-rs232-output-from-your-multimeter/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 12:45:29 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flashingleds.wordpress.com/?p=56</guid>
		<description><![CDATA[There is a band of products within the handheld multimeter market which, regardless of the manufacturer, are all based around an IC family from Taiwanese manufacturer CyrusTek. You can see this in Dave Jones&#8217; multimeter teardowns &#8211; nearly all the units he opens up have a CyrusTek IC running the show. So in terms of feature sets [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=56&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There is a band of products within the handheld multimeter market which, regardless of the manufacturer, are all based around an IC family from Taiwanese manufacturer CyrusTek. You can see this in <a href="http://www.eevblog.com">Dave Jones&#8217;</a> multimeter teardowns &#8211; nearly all the units he opens up have a CyrusTek IC running the show. So in terms of feature sets they are all on a fairly level playing field; the price spread mostly comes from build &amp; component quality and the user interface design.</p>
<p>If you read the datasheet for those ICs &#8211; the ES519xx series &#8211; you&#8217;ll make the interesting observation that they all do RS232 compliant output. So a vast number of multimeters &#8211; quite possibly yours - are capable of serial communication, but most manufacturers don&#8217;t break it out to the front panel for you.<span id="more-56"></span></p>
<p>Fair enough perhaps &#8211; it adds to the cost and it might not be a popular feature that everybody wants. On high end bench instruments (voltmeters, lock-in amplifiers, electrometers&#8230;) it&#8217;s a completely standard feature. Typically with those instruments you&#8217;re recording a lot of data, and you don&#8217;t want to be writing it down on a piece of paper like some chump from the 1960&#8242;s. For hobby applications, let&#8217;s imagine you want to monitor the resistance of a sensor&#8230; once a second. For 2 days. Maybe you want to measure the temperature of a heatsink as a function of the current going into your circuit to determine some operational limits. Maybe you built your own signal generator, and you want to calibrate it by measuring with a multimeter in 1Hz steps. And so forth and so such; I&#8217;m basically telling you that this can be a pretty handy tool to have kicking around.</p>
<p>I&#8217;m accustomed to only seeing serial output on $100+ meters, and even then it&#8217;s not guaranteed. If you&#8217;re willing to scrounge around it is in fact possible to find an RS232-enabled meter at a reasonable price &#8211; at $35 <a href="http://www.amazon.com/gp/product/B000OPDFLM?ie=UTF8&amp;tag=fla02-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000OPDFLM">this TekPower</a> from Amazon is the cheapest I&#8217;ve seen so far. But as you might have guessed, if you already own a CyrusTek based meter I&#8217;m about to spell out for you how to do it <em>even cheaper</em> by extracting the latent RS232 functionality from it. If you&#8217;re willing to cut some holes in your prized possession that is.</p>
<p>I&#8217;m going to show you how to do this on an ES51973 based meter that I have lying around, an overpriced $300 &#8216;ISO-TECH IDM 98II&#8217;. For different Cyrustek controllers it will obviously pay to read the datasheet &#8211; these are readily available on the net &#8211; but I don&#8217;t imagine the process will be much different to this.</p>
<p>Let&#8217;s crack this thing open and have a look:</p>
<p><a href="http://flashingleds.files.wordpress.com/2010/11/isotech.jpg"><img class="aligncenter size-full wp-image-189" title="ISOTECH" src="http://flashingleds.files.wordpress.com/2010/11/isotech.jpg?w=630&#038;h=612" alt="" width="630" height="612" /></a></p>
<p style="text-align:center;"><em>The guts of a CyrusTek meter</em></p>
<p>Let me highlight that this is <strong>not</strong> an RS232 meter, there is no provision for it anywhere. That said, to enable serial output you just need to touch the &#8216;RS232&#8242; pin to the &#8216;V-&#8217; pin. You&#8217;ll hear it beep, and you might even see an RS232 segment light up if the LCD has one. Note that this mode is not permanent &#8211; you can change measurement settings without losing it but every time you turn off the meter it will leave this mode. You&#8217;ll want to rig up a momentary contact, normally open switch across these two pins and make it available from the outside of the case. I&#8217;m going to leave the build details up to your engineering imagination, since this is not actually my personal meter and I&#8217;m therefore not at liberty to cut holes in it. (&#8220;If you can&#8217;t open it, you don&#8217;t own it. But sometimes if you don&#8217;t own it, you can still open it&#8221;)</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2010/11/rs232-enable.jpg"><img class="aligncenter size-full wp-image-186" title="No warranty offered if you blow up your meter in the process" src="http://flashingleds.files.wordpress.com/2010/11/rs232-enable.jpg?w=630&#038;h=268" alt="" width="630" height="268" /></a></p>
<p style="text-align:center;"><em><em><del>Enter the Konami code</del></em> Touch these two pins to enable serial output</em></p>
<p>The meter is now continuously ralphing out data &#8211; there is a 3V, 2400 baud serial signal appearing between &#8216;SDO&#8217; and &#8216;DGND&#8217;:</p>
<p><a href="http://flashingleds.files.wordpress.com/2010/11/rs232-output.jpg"><img title="RS232 output" src="http://flashingleds.files.wordpress.com/2010/11/rs232-output.jpg?w=630&#038;h=354" alt="" width="630" height="354" /></a></p>
<p style="text-align:center;"><em>Serial out!</em></p>
<p>Note the voltage levels; if you call DGND 0V, the serial signal will go between 0 and -3V. But because it&#8217;s battery operated we actually have some freedom to chose where we put the ground reference. To capture some data I attached a USB logic analyzer with it&#8217;s ground on SDO and the signal line on DGND. This gives an inverted serial signal which stays positive (0 to 3V).  Here&#8217;s what you see:</p>
<p><a href="http://flashingleds.files.wordpress.com/2010/11/dmm-serial-packet.jpg"></a><a href="http://flashingleds.files.wordpress.com/2010/11/dmm-serial-packet.jpg"><img title="DMM serial packet" src="http://flashingleds.files.wordpress.com/2010/11/dmm-serial-packet.jpg?w=630&#038;h=196" alt="" width="630" height="196" /></a></p>
<p style="text-align:center;"><em>Capture of the serial data</em></p>
<p>On the ES51973 it comes in 11 packet chunks (1 packet=start bit+7 databits+stop bit+parity bit), and will tell you all sorts of things including the measurement function, range and the measured value. You can refer to the datasheet to decode the databits. In the example I&#8217;ve shown above the meter was set to resistance mode with no probes connected, hence the overload condition.</p>
<p>As long as you&#8217;re going to be <strong>quite careful</strong> about what you do with the multimeter and it also remains battery operated, the easiest way to get data out is to directly wire to the SDO and DGND pins like I&#8217;ve done above. In general it&#8217;s not a great idea though; you&#8217;ll find a more common approach is to maintain electrical isolation by optocoupling the pins. This is also an easy way to see if you have things working &#8211; use a visible LED and you&#8217;ll see it flashing if you have serial data present. Alternatively if you can find enough room in the case you could think about something really neat like hiding a microcontroller in there to read the datastream, parse it and send it out wirelessly.</p>
<p>To see how the professionals do it, let&#8217;s crack open another meter that <strong>was</strong> built with RS232 in mind. My own primary meter is a freebie SDA2010 (RRP $320) which has a miniUSB jack at the top and some custom software to interpret the data.</p>
<p><a href="http://flashingleds.files.wordpress.com/2010/11/sda2010.jpg"><img class="aligncenter size-full wp-image-188" title="SDA2010" src="http://flashingleds.files.wordpress.com/2010/11/sda2010.jpg?w=630&#038;h=521" alt="" width="630" height="521" /></a></p>
<p style="text-align:center;"><em>The guts of an SDA2010</em></p>
<p>In this case the controller is hiding under an epoxy blob, but it&#8217;s still pretty easy to see the optocoupling arrangement. An infrared LED placed across the two serial pins shines onto an infrared receiver on a separate board. To be really, really sure about electrical isolation that second board is sealed up in a plastic casing. On that board is a UART to USB chip, powered over USB. All parsing of the serial data happens in the custom PC software.</p>
<p>This seems like a pretty good solution, but again I leave the choice of implementation up to you. Now that you&#8217;ve seen how simple it is, go bust open your multimeter in search of an exposed Cyrustek chip! I&#8217;d love to hear from anybody that executes a modification like this.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashingleds.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashingleds.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashingleds.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashingleds.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flashingleds.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flashingleds.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flashingleds.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flashingleds.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashingleds.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashingleds.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashingleds.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashingleds.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashingleds.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashingleds.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=56&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flashingleds.wordpress.com/2010/11/30/unlocking-rs232-output-from-your-multimeter/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12612e726a81d5e75ea7b55c8019023e?s=96&#38;d=identicon&#38;r=R" medium="image">
			<media:title type="html">flashingleds</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/11/isotech.jpg" medium="image">
			<media:title type="html">ISOTECH</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/11/rs232-enable.jpg" medium="image">
			<media:title type="html">No warranty offered if you blow up your meter in the process</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/11/rs232-output.jpg" medium="image">
			<media:title type="html">RS232 output</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/11/dmm-serial-packet.jpg" medium="image">
			<media:title type="html">DMM serial packet</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/11/sda2010.jpg" medium="image">
			<media:title type="html">SDA2010</media:title>
		</media:content>
	</item>
		<item>
		<title>Garage door opener</title>
		<link>http://flashingleds.wordpress.com/2010/11/14/garage-door-opener/</link>
		<comments>http://flashingleds.wordpress.com/2010/11/14/garage-door-opener/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 06:28:22 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flashingleds.wordpress.com/?p=74</guid>
		<description><![CDATA[Here&#8217;s a quick description of a project that&#8217;s a few years old now. My parents have an automatic garage door, and it has some lights that come on when the door is operated. One of the lightbulbs had blown while I was visiting, so I was up a ladder sorting it out. As evidence that I&#8217;ll [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=74&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick description of a project that&#8217;s a few years old now. My parents have an automatic garage door, and it has some lights that come on when the door is operated. One of the lightbulbs had blown while I was visiting, so I was up a ladder sorting it out.</p>
<p>As evidence that I&#8217;ll never be a professional electrician, while doing this I managed to accidently short a section of the control board to earth with a screwdriver. <span id="more-74"></span>While I didn&#8217;t die or cause any damage, I <strong>did</strong> make the door start to close.</p>
<p>As evidence that I&#8217;ll never be a professional electrician because I am a too much of a physicist, my next move was to <em>do it again</em> to see if it was reproducible. And yes, here was a way to open and close the garage door &#8211; touch these two points with a screwdriver.</p>
<p>And so within about a week I had some wires attached to those two points, running along the rafters and down through the wall to a microcontroller circuit mounted on the external wall of the garage.  If the correct code is entered, a relay does the work of my screwdriver and opens or closes the door. This is a useful function for my parents, saving them from walking the long way around the house if they need to get into the garage but don&#8217;t have the wireless remote on them.</p>
<p>(And yes, if you were clever you could just rip the box off the wall and short the relay, bypassing the key-code. But there are other ways into the garage anyway,  so I don&#8217;t think you could really call it a security risk.)</p>
<p>The schematics are long gone, but the source is <a href="http://flashingleds.files.wordpress.com/2010/11/garagedoor-actually-a-c-file.doc">here</a>. I think it was for an ATMega8 (?). I wrote in it about an hour, it just handles a keypad, a relay and plays some super cool tunes on a piezo buzzer. It&#8217;s a boring read, but hey whatever floats your boat.</p>
<p>I can however show you a video of the thing in action:</p>
<span style="text-align:center; display: block;"><a href="http://flashingleds.wordpress.com/2010/11/14/garage-door-opener/"><img src="http://img.youtube.com/vi/ijGxvzIipmY/2.jpg" alt="" /></a></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashingleds.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashingleds.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashingleds.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashingleds.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flashingleds.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flashingleds.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flashingleds.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flashingleds.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashingleds.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashingleds.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashingleds.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashingleds.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashingleds.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashingleds.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=74&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flashingleds.wordpress.com/2010/11/14/garage-door-opener/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12612e726a81d5e75ea7b55c8019023e?s=96&#38;d=identicon&#38;r=R" medium="image">
			<media:title type="html">flashingleds</media:title>
		</media:content>
	</item>
		<item>
		<title>Spoofing magnetic swipe cards</title>
		<link>http://flashingleds.wordpress.com/2010/11/12/magnetic-swipe-card-spoofers/</link>
		<comments>http://flashingleds.wordpress.com/2010/11/12/magnetic-swipe-card-spoofers/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 07:00:33 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flashingleds.wordpress.com/?p=10</guid>
		<description><![CDATA[About a year ago I threw a magnetic swipe card reader into a larger Digikey order. I didn&#8217;t have any specific plans for it at the time; mostly I was just curious to learn about swipe cards and what kind of hidden information I was carrying around in my wallet. The reader is one of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=10&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>About a year ago I threw a magnetic swipe card reader into a larger Digikey order. I didn&#8217;t have any specific plans for it at the time; mostly I was just curious to learn about swipe cards and what kind of hidden information I was carrying around in my wallet.<span id="more-10"></span></p>
<p>The reader is one of the Omron V3A series, which if you read some of the many <a href="http://www.ladyada.net/make/magstripe/index.html">websites</a> <a href="http://stripesnoop.sourceforge.net/">discussing </a><a href="http://www.digisoft.com.pk/Projects/swipe-card-reader-interface">swipecard</a> <a href="http://www.instructables.com/id/Turn-your-Arduino-into-a-Magnetic-Card-Reader/">readers</a> is a pretty popular choice due to it being easy to interface. Mine is a 4K model ($30 from Digikey) and reads track 2 data. Ideally you want all three tracks, but it gets expensive and for the majority of cards track 2 is where the interesting data is. For an in-depth discussion about swipe card encoding standards the best reference source is the &#8220;Magtek IO&#8221; pdf , which is very google-able.</p>
<p>Eventually I did get around to hooking it up to a microcontroller and satisfying my curiosity about my various cards. For the most part there was nothing all that interesting on any of them, until I ran my university ID card through. The only data encoded on it was my university ID number!</p>
<p>Why is that significant? Well, that ID card is used to access a variety of offices and laboratories across the campus. Staff and student ID numbers are publicly available. If you had the ability to either fake a card or encode a blank, this implies that you could open <em>any door</em> provided you knew the <strong>name</strong> of one person authorized to open it. You&#8217;d never need to lay hands on their card &#8211; just look up their university ID number, operate your device and walk on in. I was dying to know if the situation could really be that bad.</p>
<p>Card writers are readily available &#8211; Sparkfun has one for $140 and blank cards for a dollar. However since I&#8217;m not actually planning to illegally access anything or steal equipment (most of the good stuff is in my lab, anyway!) I&#8217;m not really keen to sink a lot of money into it. $140 is cheap for the technology, but too pricey just to satisfy my curiosity. We are left with option B: a swipe card spoofer. That is, a device which will fool a card reader into thinking you swiped an arbitrary card.</p>
<p>The basic design behind such a device is not my own work and I&#8217;m not the first to do this; you can find a <a href="http://www.soniktech.com/sdmce.php">few</a> <a href="http://www.instructables.com/id/Magnetic-stripe-card-spoofer/">projects</a> <a href="http://www.instructables.com/id/Arduino-Magstripe-Emulator/">around</a> to implement a device like this. That said, I&#8217;m just a dude choosing his projects for no higher purpose than his own amusement, so let&#8217;s set aside issues of redundancy and enjoy this, a fourth example of a mag-stripe spoofer.</p>
<p>Very basically, a card stripe contains a certain sequence of magnetic fields which the reader detects as you swipe the card through it.  The basis of all the card-spoofing circuits is to make some kind of electromagnet, put it next to the read-head and manipulate the magnetic field in just the right way to mimic a card. My design is heavily based on Jarek&#8217;s design which you can find <a href="http://www.soniktech.com/sdmce.php">here</a> (highly recommended reading). The idea is to create your own electromagnet by winding a coil, but since your coil will probably not fit inside the card slot you employ a &#8216;shim&#8217;. In this case that means a thin ferromagnetic core for your electromagnet which nicely couples the field to the detector in the card reader.</p>
<p>Before we go too far into the details, let me show you my finished shim so you have some idea of what I&#8217;m talking about:</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2010/11/shim1.jpg"><img class="aligncenter size-full wp-image-117" title="Shim" src="http://flashingleds.files.wordpress.com/2010/11/shim1.jpg?w=630&#038;h=427" alt="" width="630" height="427" /></a><em>Completed electromagnet</em></p>
<p>I used an old knife blade for this purpose. You first need to check that the thickness is good for the card slot and that the blade is ferromagnetic (e.g. will a fridge magnet stick to it?). I used a dremel to file out the dimensions I wanted and get all the edges smooth, which generated all kinds of sparks and made me feel extremely manly. Smooth edges are important for the next step; you can see in the picture where I&#8217;ve used some black electrical tape to cover some leftover sharp corners.</p>
<p>I then set about wrapping a coil of enamel coated wire around the shim, the thinnest I could get locally (0.25mm diameter, from Jaycar). Enamel coating is important because you don&#8217;t want the coil to short itself out. Sharp edges are bad news because they will cut through the enamel coating and give a short.</p>
<p>The strength of a magnetic field generated by a coil goes linearly with the number of turns, so for best results you want a lot.  I honestly don&#8217;t remember how many I did, but it was a lot &#8211; maybe 100 or so turns? It was not optimized in any way, I just wanted to be sure it would work first time. If you wanted to keep the size down I&#8217;m sure you could do some testing of the minimum field strength required. After I finished I wrapped the coil in some more tape to protect it, and soldered on a standard 0.1&#8243; 2 pin connector.</p>
<p>Now that the difficult part is done, you need something to intelligently power this coil so it creates the right field sequence. I put together an AVR board based on the Tiny2313, which as we will soon discover was not a clever choice.</p>
<p>The features I wanted were:</p>
<ul>
<li>Should be as small as practical so I feel more like an awesome spy. Lots of surface mount components, and a professionally made PCB (from batchPCB.com)</li>
<li>Needs a powerful, compact battery to run the coil. Also needs to be something I have hanging around. I went for a 9V, and designed the PCB to have the same outline as a 9V battery so it could sit on top of it.</li>
<li>Should be able to store card sequences in memory and let me select which sequence to generate</li>
<li>Should be able to interface to a card reader so I can record a new card just by swiping it instead of needing a computer</li>
<li>However if I do have a computer handy, I should be able to use it as an RS232 adapter for the card reader and display decoded info on a terminal.</li>
</ul>
<p>Here&#8217;s what I came up with:</p>
<p><a href="http://flashingleds.files.wordpress.com/2010/11/schematic.png"><img class="aligncenter size-full wp-image-120" title="Schematic" src="http://flashingleds.files.wordpress.com/2010/11/schematic.png?w=630&#038;h=309" alt="" width="630" height="309" /></a></p>
<p style="text-align:center;"><em>Final schematic</em></p>
<p><a href="http://flashingleds.files.wordpress.com/2010/11/pcb.jpg"><img class="aligncenter size-full wp-image-121" title="PCB" src="http://flashingleds.files.wordpress.com/2010/11/pcb.jpg?w=630" alt=""   /></a></p>
<p style="text-align:center;"><em>Completed, assembled board</em></p>
<p>(Note the &#8216;aftermarket&#8217; resistor at the top &#8211; I forgot a pulldown resistor for the transistor base. The schematic has been corrected with resistor R4. Also the pullup R2 was actually 4k7, I&#8217;m just lazy with putting in component values on schematics)</p>
<p>There is a main on/off power switch and a 5V linear regulator for the Tiny2313, which is running on an internal 1MHz oscillator. The Tiny outputs the selected card sequence once a second on one of its IO pins, but a momentary push switch isolates that from the transistor driver. So nothing actually happens at the coil unless I&#8217;m holding down the &#8216;SEND&#8217; switch. The transistor driver is required since we want to use the highest current possible to get the biggest magnetic field possible. AVRs have pretty high source/drain ratings on IO pins, but we want <em>even more</em>.</p>
<p>Note that you don&#8217;t actually need to swap the <em>polarity</em> of the coil current; it suffices to just switch it on and off. That makes the drive electronics a lot easier. I put a reverse biased LED in parallel with the coil to be my snubber diode for the inductive &#8216;kickback&#8217;. I would not in general recommend this, but it was the only kind of diode I had on hand so I went with it. As a nice side effect you get some visual feedback when the coil operates. It turns out you also get some audible feedback &#8211; the magstripe reader makes some sick-sounding bleepy noises when you fire the coil with the shim in place. Not entirely sure why, but it heightens the sense of being a wicked cool hacker from a 90&#8242;s film.</p>
<p>The rest is pretty ordinary; a menu switch and some leds to cycle through memory slots, headers for a serial link connection and for a magstripe reader connection. The final assembly looks something like this: (Battery &#8216;unfolded&#8217; from the PCB; logic analyser on the Omron reader)</p>
<p><a href="http://flashingleds.files.wordpress.com/2010/11/in-action.jpg"><img class="aligncenter size-full wp-image-123" title="In action" src="http://flashingleds.files.wordpress.com/2010/11/in-action.jpg?w=630" alt=""   /></a></p>
<p style="text-align:center;"><em>Tomfoolery in progress</em></p>
<p>The good news is that it works! As captured by a logic analyser, here is the output from swiping my real ID card, and under that is the output from <em>faking</em> my ID card. The extra channel on the spoofed data shows you what the I/O pin driving the coil was doing to generate this.</p>
<p><a href="http://flashingleds.files.wordpress.com/2010/11/untitled.jpg"><img class="aligncenter size-full wp-image-118" title="Untitled" src="http://flashingleds.files.wordpress.com/2010/11/untitled.jpg?w=630&#038;h=328" alt="" width="630" height="328" /></a></p>
<p style="text-align:center;"><em>Logic capture of an entire card swipe / fake card swipe</em></p>
<p>To clarify the operation of the &#8216;card detect&#8217; signal from the reader: I initially thought this was based on some kind of mechanical switch that detected a card in the slot. But it&#8217;s not &#8211; it&#8217;s just based on getting a certain number of coil toggles. So you don&#8217;t need to swipe the shim, you can just place it in the swipe slot so it&#8217;s sitting on the read-head and go for gold.</p>
<p>Zoomed out this far it doesn&#8217;t look like a very good match, but if we look a little closer we can see that the spoofer did indeed make the card reader produce the same output sequence:</p>
<p><a href="http://flashingleds.files.wordpress.com/2010/11/swipe-card-logic-analyser.jpg"><img class="aligncenter size-full wp-image-119" title="Swipe card logic analyser" src="http://flashingleds.files.wordpress.com/2010/11/swipe-card-logic-analyser.jpg?w=630&#038;h=320" alt="" width="630" height="320" /></a></p>
<p style="text-align:center;"><em>Zoomed in logic captures</em></p>
<p>(This also hopefully clarifies the coil sequence; within one clock period a single toggle causes data high and two toggles causes data low)</p>
<p>So awesome, I succeeded at the dubious art of magstripe spoofing! However as mentioned earlier the Tiny2313 was a bad choice on my part &#8211; there was not quite enough program memory to implement all the neat features I listed above. I should have gone with something like a TQFP mega88. Lesson learned, always leave yourself plenty of headroom while you&#8217;re still at the prototype stage. Slashed down source code for the Tiny2313 is available <del>he﻿re</del> <a href="http://flashingleds.files.wordpress.com/2010/11/swipecard-actually-a-c-file2.doc">here</a> (link fixed!). It&#8217;s very much thrown together; I&#8217;m putting it up so you can pick out any interesting parts if you&#8217;re having trouble making your own.</p>
<p>So after this technical diversion, let&#8217;s resume the story. Now that I can fake a card, was I able to open a door knowing only an ID number?</p>
<p>Sadly (but at the same time happily) <strong>no, it didn&#8217;t work.</strong> There are a few possibilities here, but my suspicion is that whoever designed this security system did a decent job of it and used <em>more than one data track</em>. So in reality there is probably more than just the ID number on the card, but with only a track 2 reader that&#8217;s all I saw. The design of the spoofer I&#8217;ve discussed can only fake one data track, which could still be interesting in some applications but is not enough here. (In principle you could fake three tracks at once but you would need a very complicated shim).</p>
<p>So my suspicious looking entry device was rejected and my office door remains secure against this manner of skulduggery.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashingleds.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashingleds.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashingleds.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashingleds.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flashingleds.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flashingleds.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flashingleds.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flashingleds.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashingleds.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashingleds.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashingleds.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashingleds.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashingleds.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashingleds.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=10&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flashingleds.wordpress.com/2010/11/12/magnetic-swipe-card-spoofers/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12612e726a81d5e75ea7b55c8019023e?s=96&#38;d=identicon&#38;r=R" medium="image">
			<media:title type="html">flashingleds</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/11/shim1.jpg" medium="image">
			<media:title type="html">Shim</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/11/schematic.png" medium="image">
			<media:title type="html">Schematic</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/11/pcb.jpg" medium="image">
			<media:title type="html">PCB</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/11/in-action.jpg" medium="image">
			<media:title type="html">In action</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/11/untitled.jpg" medium="image">
			<media:title type="html">Untitled</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/11/swipe-card-logic-analyser.jpg" medium="image">
			<media:title type="html">Swipe card logic analyser</media:title>
		</media:content>
	</item>
		<item>
		<title>Intercepting the Gameboy LCD</title>
		<link>http://flashingleds.wordpress.com/2010/10/26/intercepting-the-gameboy-lcd/</link>
		<comments>http://flashingleds.wordpress.com/2010/10/26/intercepting-the-gameboy-lcd/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 04:48:17 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://flashingleds.wordpress.com/?p=6</guid>
		<description><![CDATA[A peculiar aspect of the original Gameboy is how well it did given how absolutely dreadful the display hardware was. The screen is not backlit, the colour palette is a meager 4 shades of gray and the resolution is only 160&#215;144 . Before you object that that&#8217;s just how the technology was back then, note [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=6&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A peculiar aspect of the original Gameboy is how well it did given how absolutely dreadful the display hardware was. The screen is not backlit, the colour palette is a meager 4 shades of gray and the resolution is only 160&#215;144 . Before you object that <em>that&#8217;s just how the technology was back then</em>, note that it launched at about the same time as the Lynx and the Game Gear,  both of which had beautiful backlit, 4096 colour screens.<span id="more-6"></span></p>
<p>However the upshot of such a dismal screen is that the battery life is phenomenal, and this was instrumental in the Gameboy being such a spectacular success.  And when lots of big developers get involved, you get graphics that are actually pretty nice.</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2010/06/4bits-are-enough.jpg"><img class="aligncenter size-full wp-image-40" title="2bits are enough" src="http://flashingleds.files.wordpress.com/2010/06/4bits-are-enough.jpg?w=630" alt=""   /></a></p>
<p style="text-align:center;"><em>Brilliant pixel art in 4 shades</em></p>
<p>Twenty years later the hobby electronics scene is thriving and there is a wide variety of powerful, cheap hardware. You now have an army of people like me who are not embedded engineers, but have 20+MHz microcontrollers and a passionate desire to build stupid, pointless crap with them.</p>
<p>And those people may be interested to learn that <em>because it&#8217;s so low-spec</em>,  it&#8217;s quite straightforward to hijack the gameboy display for whatever nefarious purposes you please.</p>
<p><strong><em>[EDIT: </em></strong><em>Based on some of the feedback I might not have made the point of this project perfectly clear. I'm not interested in re-using the screen (because the screen is terrible as discussed above). I want to access the video data from the gameboy so I can display it on something more interesting. You may of course do whatever you please with this information<strong>]</strong></em></p>
<p>Let&#8217;s discuss how to go about this. A good source of information about the gameboy hardware is <a href="http://www.devrs.com" target="_blank">devrs.com</a>. Particularly handy is the schematic by Jeff Frohwein:</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2010/09/gameboy2.gif"><img class="aligncenter size-full wp-image-99" title="Gameboy schematic" src="http://flashingleds.files.wordpress.com/2010/09/gameboy2.gif?w=630" alt=""   /></a></p>
<p style="text-align:center;"><em>Direct your attention to the &#8220;LCD Display&#8221; block on the left</em></p>
<p>The signals we are interested in are VERTSYN,HORSYNC, DATAOUT0, DATAOUT1 and CLOCK. These are the control lines for the LCD coming from the central processor (which is not shown in this schematic). I&#8217;ll explain how these control lines work in a moment. First we&#8217;ll discuss how to tap into them, which should enable us to reconstruct the images being sent to the LCD.</p>
<p>Just opening a Gameboy turns out to be one of the most difficult steps, thanks to stupid Nintendo and their stupid tri-wing screws. After several attempts with flathead screwdrivers I gave up and bought a triwing driver from ebay for a few bucks. Unless you&#8217;re happy to smash up the case, I suggest you do the same.</p>
<p>Once you <em>do</em> have it open, it&#8217;s not hard to find the signals we&#8217;re after with an oscilloscope or logic analyzer:</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2010/06/bitmap.png"><img class="aligncenter" title="bitmap" src="http://flashingleds.files.wordpress.com/2010/06/bitmap.png?w=500&#038;h=224" alt="" width="500" height="224" /></a></p>
<p style="text-align:center;"><em>The LCD connector</em></p>
<p>Handily they&#8217;re 5V logic levels, but if your instrument does not have robust input protection then <strong>be careful of the -30V DC contrast signal</strong>! (I forget exactly which one, but it&#8217;s one of the lower 10 pins &#8211; use a multimeter to find it if you&#8217;re worried). The pitch is not particularly tight, so I simply soldered some ribbon cable to the LCD connector. It&#8217;s possible (but tight) to then feed this through the cart slot and still have access to the pins with the Gameboy closed up again.</p>
<p>With the gameboy on, this is the kind of data you&#8217;ll see:</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2010/09/logic.png"><img class="aligncenter size-full wp-image-100" title="Logic" src="http://flashingleds.files.wordpress.com/2010/09/logic.png?w=630" alt=""   /></a></p>
<p style="text-align:center;"><em>Logic capture of one display line. This is too zoomed in to see any VSYNC pulses</em></p>
<p>Let&#8217;s discuss how these signal lines operate. The controller scans through each frame line by line, setting each pixel in sequence to whatever colour value is required. We start at the upper left of the screen, and start belting out pixel values.</p>
<p>The pixel clock pulses once for each pixel.  At the falling edge of the CLOCK signal, , DATA1 and DATA0 give you the 2-bit colour value corresponding to that pixel. You can see in the capture above that there is a large section of one colour in the middle of this line, where the colour value is 0b11.</p>
<p>Once all 160 pixels in the first horizontal line are done, we wait for a signal to move down and start the next line underneath. This is the role of the HSYNC line, and the signal is a rising edge.</p>
<p>Once 144 lines have been drawn, we wait for a signal to go back and start all over again with a new frame. This is the role of the VSYNC line, and the signal is a rising edge.</p>
<p>From the logic capture you can see that when a line is finished, the controller does not immediately start the next one. In fact over half the time assigned to each line is not used;  the pixel clock is not running. Specifically, we get 68.9us of deadtime after all 160 clock pulses before the next HSYNC pulse happens. After all 144 lines, we get 1.1ms before the next VSYNC pulse. This is not really an awful lot of time, so to do anything practical with this data you&#8217;ll probably be skipping some frames. Remember that 60Hz is the LCD refresh rate, but it&#8217;s not necessarily the speed at which the central processor is updating the screen.</p>
<p>As a proof of principle I exported a capture of the signal waveforms (with the excellent Saleae Logic) to my graphing software of choice (the excellent Igor Pro). After throwing together a very simple script to process the signals, we can indeed reconstruct the image!</p>
<p style="text-align:center;"><a href="http://flashingleds.files.wordpress.com/2010/06/recontruction.png"><img class="aligncenter size-full wp-image-43" title="recontruction" src="http://flashingleds.files.wordpress.com/2010/06/recontruction.png?w=630" alt=""   /></a></p>
<p style="text-align:center;"><em>Good grief, it worked!</em></p>
<p>If you&#8217;d like to play with this yourself, raw data from a frame (it&#8217;s not the same frame as the image above) and the Igor script are available below. Since WordPress apparently won&#8217;t let me post *.txt files, I have renamed them as doc files. I leave it &#8220;<em>as an exercise for the reader</em>&#8221; to change the file extension back if required.</p>
<p><a href="http://flashingleds.files.wordpress.com/2010/09/logic-capture-actually-a-txt-file.doc">Raw data</a></p>
<p><a href="http://flashingleds.files.wordpress.com/2010/09/igor-script-actually-a-txt-file.doc">Igor script</a> (be warned that it&#8217;s really something quick and dirty I threw together)</p>
<p>I have plans for this, and in a future post I&#8217;ll discuss doing something with it in (semi) real-time.</p>
<p>P.S. Of course I understand that you could get the same result, possibly a lot easier, with an emulator. But there&#8217;s just something <em>pure</em> about working with original hardware.</p>
<p>P.P.S. Navy Seals is an absolutely dreadful game. The other game I have on hand is Hook, which is <em>even worse</em></p>
<p>[EDIT: Followup post <strong><a href="http://flashingleds.wordpress.com/2011/02/13/nintendoscope/">here</a></strong>]</p>
<p>[EDIT (30/12/2011): If you came looking for gameboy hardware info, another great resource is <a href="http://www.idt.mdh.se/utbildning/exjobb/files/TR1234.pdf">this report</a> by John Ernberg]</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/flashingleds.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/flashingleds.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/flashingleds.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/flashingleds.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/flashingleds.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/flashingleds.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/flashingleds.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/flashingleds.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/flashingleds.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/flashingleds.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/flashingleds.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/flashingleds.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/flashingleds.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/flashingleds.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=flashingleds.wordpress.com&amp;blog=12061912&amp;post=6&amp;subd=flashingleds&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://flashingleds.wordpress.com/2010/10/26/intercepting-the-gameboy-lcd/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/12612e726a81d5e75ea7b55c8019023e?s=96&#38;d=identicon&#38;r=R" medium="image">
			<media:title type="html">flashingleds</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/06/4bits-are-enough.jpg" medium="image">
			<media:title type="html">2bits are enough</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/09/gameboy2.gif" medium="image">
			<media:title type="html">Gameboy schematic</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/06/bitmap.png" medium="image">
			<media:title type="html">bitmap</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/09/logic.png" medium="image">
			<media:title type="html">Logic</media:title>
		</media:content>

		<media:content url="http://flashingleds.files.wordpress.com/2010/06/recontruction.png" medium="image">
			<media:title type="html">recontruction</media:title>
		</media:content>
	</item>
	</channel>
</rss>
