<?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>Hack a Day &#187; attiny13</title>
	<atom:link href="http://hackaday.com/tag/attiny13/feed/" rel="self" type="application/rss+xml" />
	<link>http://hackaday.com</link>
	<description>Fresh hacks every day</description>
	<lastBuildDate>Fri, 10 Feb 2012 12:21:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hackaday.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/5560f98f805877b0e332f191cb9e0af3?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Hack a Day &#187; attiny13</title>
		<link>http://hackaday.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hackaday.com/osd.xml" title="Hack a Day" />
	<atom:link rel='hub' href='http://hackaday.com/?pushpress=hub'/>
		<item>
		<title>Building an EEPROM programmer</title>
		<link>http://hackaday.com/2012/01/11/building-an-eeprom-programmer/</link>
		<comments>http://hackaday.com/2012/01/11/building-an-eeprom-programmer/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 19:01:54 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[pcs hacks]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[attiny85]]></category>
		<category><![CDATA[attinyisp]]></category>
		<category><![CDATA[eeprom]]></category>
		<category><![CDATA[isp]]></category>
		<category><![CDATA[programmer]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[veronica]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=65272</guid>
		<description><![CDATA[Behold this ATtiny85 based EEPROM programmer. It seems like a roundabout way of doing things, but [Quinn Dunki] wanted to build to her specifications using tools she had on hand. What she came up with is an ATtinyISP USB programmer, pushing data to an ATtiny85, which then programs an EEPROM chip with said data. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=65272&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-65280" title="attiny-eeprom-programmer" src="http://hackadaycom.files.wordpress.com/2012/01/attiny-eeprom-programmer-e1326302346949.jpg" alt="" width="470" height="350" /></p>
<p>Behold this <a href="http://quinndunki.com/blondihacks/?p=780">ATtiny85 based EEPROM programmer</a>. It seems like a roundabout way of doing things, but [Quinn Dunki] wanted to build to her specifications using tools she had on hand. What she came up with is an ATtinyISP USB programmer, pushing data to an ATtiny85, which then programs an EEPROM chip with said data.</p>
<p>The hardware is the next module for her Veronica 6502 computer build. <a href="http://hackaday.com/2012/01/04/backplane-and-mainboard-for-a-6502-computer/">When we last saw that project</a> [Quinn] was planning to add persistent storage for the operating firmware. This will be in the form of an EEPROM programmed with this device. Using ISP and an ATtiny as a go-between means that she should have no problems reflashing the OS without removing the chip. But it all depends on how she designs the interface.</p>
<p>For example, she blew a whole bunch of time troubleshooting the device because garbage data was being written to the chip. In the end, having <a href="http://hackaday.com/2011/12/07/programming-the-6502-one-nibble-at-a-time/">her manual bus programmer</a> hooked up during the flashing operation was the culprit. Lesson learned, it&#8217;s onward and upward with the build.</p>
<p>We&#8217;ve been featuring [Quinn's] projects a lot lately. That&#8217;s in part because they&#8217;re really interesting, but also because she does such a great job of documenting her experience.</p>
<br />Filed under: <a href='http://hackaday.com/category/microcontrollers/'>Microcontrollers</a>, <a href='http://hackaday.com/category/pcs-hacks/'>pcs hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/65272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/65272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/65272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/65272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/65272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/65272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/65272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/65272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/65272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/65272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/65272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/65272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/65272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/65272/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=65272&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2012/01/11/building-an-eeprom-programmer/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2012/01/attiny-eeprom-programmer-e1326302346949.jpg" medium="image">
			<media:title type="html">attiny-eeprom-programmer</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple IR sensor simplifies laptop audio control</title>
		<link>http://hackaday.com/2011/12/13/simple-ir-sensor-simplifies-laptop-audio-control/</link>
		<comments>http://hackaday.com/2011/12/13/simple-ir-sensor-simplifies-laptop-audio-control/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 18:01:56 +0000</pubDate>
		<dc:creator>Mike Nathan</dc:creator>
				<category><![CDATA[misc hacks]]></category>
		<category><![CDATA[wireless hacks]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[ir]]></category>
		<category><![CDATA[remote]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=63278</guid>
		<description><![CDATA[[Owen] has a fairly big project in the works, where he’ll need to use infrared light to send data wirelessly between two nodes. The only problem with his grand plan is that he has never built anything of the sort. As a learning exercise, he decided to try his hand at building a wireless control [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=63278&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-63280" title="tiny-ir-tv-remote-receiver" src="http://hackadaycom.files.wordpress.com/2011/12/tiny-ir-tv-remote-receiver.jpg" alt="tiny-ir-tv-remote-receiver" width="470" height="367" /></p>
<p>[Owen] has a fairly big project in the works, where he’ll need to use infrared light to send data wirelessly between two nodes. The only problem with his grand plan is that he has never built anything of the sort. As a learning exercise, he decided to try his hand at building<a href="http://www.hackniac.com/blog/?p=742" target="_blank"> a wireless control interface for his laptop</a>, which he uses to play music while doing homework.</p>
<p>His laptop usually sits across the room from [Owen], where it is connected to a speaker and amplifier. He hates getting up repeatedly to change songs, so he figured he might as well build an IR receiver to control Winamp that responds to commands from his TV’s remote control. Using his Open Bench logic sniffer and an IR receiver from an old VCR, he deciphered his remote’s encoding system. He then programmed an ATtiny13 to decode messages received by the IR sensor, sending them to his laptop via USB.</p>
<p>He packaged things inside a tiny mint tin, which he hangs from a desk lamp while in use. Now he can easily perform just about any action in Winamp with a few button presses on his remote. [Owen] says that he’s incredibly happy with the results, and now that he has a firm grasp of IR signaling concepts, we can’t wait to see what he builds next.</p>
<br />Filed under: <a href='http://hackaday.com/category/misc-hacks/'>misc hacks</a>, <a href='http://hackaday.com/category/wireless-hacks/'>wireless hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/63278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/63278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/63278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/63278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/63278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/63278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/63278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/63278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/63278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/63278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/63278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/63278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/63278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/63278/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=63278&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/12/13/simple-ir-sensor-simplifies-laptop-audio-control/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikenathanathackaday</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/12/tiny-ir-tv-remote-receiver.jpg" medium="image">
			<media:title type="html">tiny-ir-tv-remote-receiver</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple circuit reminds you to lock the door as you rush out of the house</title>
		<link>http://hackaday.com/2011/10/11/simple-circuit-reminds-you-to-lock-the-door-as-you-rush-out-of-the-house/</link>
		<comments>http://hackaday.com/2011/10/11/simple-circuit-reminds-you-to-lock-the-door-as-you-rush-out-of-the-house/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 11:01:11 +0000</pubDate>
		<dc:creator>Mike Nathan</dc:creator>
				<category><![CDATA[ATtiny hacks]]></category>
		<category><![CDATA[home hacks]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[door]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=58205</guid>
		<description><![CDATA[It seems that [pppd] is always rushing out of his apartment to catch the bus, and he finds himself frequently questioning whether or not he remembered to lock the door. He often doubles back to check, and while he has never actually forgotten to lock the door, he would rather not deal with the worry. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=58205&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-58206" title="door_lock_minder" src="http://hackadaycom.files.wordpress.com/2011/10/door_lock_minder.jpg" alt="door_lock_minder" width="470" height="353" /></p>
<p>It seems that [pppd] is always rushing out of his apartment to catch the bus, and he finds himself frequently questioning <a href="http://dangerousprototypes.com/forum/viewtopic.php?f=56&amp;t=2919&amp;view=unread#p28684" target="_blank">whether or not he remembered to lock the door.</a> He often doubles back to check, and while he has never actually forgotten to lock the door, he would rather not deal with the worry.</p>
<p>Since he finally had some free time on his hands, he decided to put together a simple device that would help end his worry once and for all. Using an ATtiny13, [pppd] designed a circuit that would detect when his door has been unlocked and opened, beeping every few seconds until the lock is reengaged. The circuit relies on a reed switch installed inside the door frame, which is tripped by the magnet he glued to his door’s deadbolt.</p>
<p>He says that the system works well so far, though he does have a few improvements in mind already.</p>
<br />Filed under: <a href='http://hackaday.com/category/attiny-hacks/'>ATtiny hacks</a>, <a href='http://hackaday.com/category/home-hacks/'>home hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/58205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/58205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/58205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/58205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/58205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/58205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/58205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/58205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/58205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/58205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/58205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/58205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/58205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/58205/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=58205&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/10/11/simple-circuit-reminds-you-to-lock-the-door-as-you-rush-out-of-the-house/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">mikenathanathackaday</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/10/door_lock_minder.jpg" medium="image">
			<media:title type="html">door_lock_minder</media:title>
		</media:content>
	</item>
		<item>
		<title>Two dice, one 8-pin uC</title>
		<link>http://hackaday.com/2011/09/27/attiny-hacks-two-dice-one-6-pin-uc/</link>
		<comments>http://hackaday.com/2011/09/27/attiny-hacks-two-dice-one-6-pin-uc/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 15:03:19 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[charlieplexing]]></category>
		<category><![CDATA[dice]]></category>
		<category><![CDATA[die]]></category>
		<category><![CDATA[pip]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=56609</guid>
		<description><![CDATA[[Mike Shegedin] makes full use of an 8-pin microcontroller with this ATtiny13-based dice project. With a maximum of six I/O pins (that includes using the reset pin as I/O) he needed a couple of tricks in order to drive 14 LEDs and use a momentary push button for user input. We&#8217;re certainly familiar with the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=56609&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-56610" title="attiny13-dice" src="http://hackadaycom.files.wordpress.com/2011/09/attiny13-dice-e1316792111938.jpg" alt="" width="470" height="311" /></p>
<p>[Mike Shegedin] makes full use of an 8-pin microcontroller with this <a href="http://www.ezdenki.com/dice.php">ATtiny13-based dice project</a>. With a maximum of six I/O pins (that includes using the reset pin as I/O) he needed a couple of tricks in order to drive 14 LEDs and use a momentary push button for user input. We&#8217;re certainly familiar with the concepts here, but it still took quite a while to figure out what is going on with the schematic that [Mike] posted.</p>
<p>You&#8217;ve probably already guessed that he&#8217;s using Charlieplexing to drive more LEDs than he has pins. But when we started looking at the layout we thought he had drawn the schematic wrong, because there are six pairs of LEDs where the two diodes in each pair a <em>not</em> reverse biased, but hooked up in parallel. That, plus the fact that his battery is hooked up backwards. After several minutes of study the light bulb finally clicked on. Dice add pips (the dots on each side of a die) in pairs with the exception of the center pip. That means that you only need to control four total lines for each die (three pairs plus the center pip). There&#8217;s two ways to handle this, you could use four rows and two columns with traditional multiplexing, or you can reverse bias the two sets of LEDs for each die and use Charlieplexing. The former is a bit easier to program, the latter saves you one I/O pin and meant that [Mike] didn&#8217;t need to use the reset pin as I/O.</p>
<p>This is a clever addition to the collection of dice projects we&#8217;ve seen like <a href="http://hackaday.com/2011/09/14/attiny-hacks-look-ma-no-batteries/">the battery-less die</a>, and <a href="http://hackaday.com/2011/09/16/attiny-hacks-roll-2d6-with-an-attiny/">the ATtiny2313 powered dice</a>.</p>
<br />Filed under: <a href='http://hackaday.com/category/microcontrollers/'>Microcontrollers</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/56609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/56609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/56609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/56609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/56609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/56609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/56609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/56609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/56609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/56609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/56609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/56609/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/56609/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/56609/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=56609&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/09/27/attiny-hacks-two-dice-one-6-pin-uc/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/09/attiny13-dice-e1316792111938.jpg" medium="image">
			<media:title type="html">attiny13-dice</media:title>
		</media:content>
	</item>
		<item>
		<title>ATtiny Hacks: Look Ma, no batteries!</title>
		<link>http://hackaday.com/2011/09/14/attiny-hacks-look-ma-no-batteries/</link>
		<comments>http://hackaday.com/2011/09/14/attiny-hacks-look-ma-no-batteries/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 13:04:41 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[dice]]></category>
		<category><![CDATA[die]]></category>
		<category><![CDATA[faraday]]></category>
		<category><![CDATA[induction]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=55612</guid>
		<description><![CDATA[[Gadre] built his own ATtiny project without using any batteries. It&#8217;s an electronic Dice (or die if you&#8217;re being critical) which uses induction to charge a storage capacitor to act as the power source. The voltage generator is made from a tube of Perspex which houses a set of rare-earth magnets. At the enter of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=55612&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-55211" title="ATtiny Hacks Theme Banner" src="http://hackadaycom.files.wordpress.com/2011/09/attinyhacks.png" alt="ATtiny Hacks Theme Banner" width="470" height="60" /><br />
<img class="alignnone size-full wp-image-55613" title="Faraday-For-Fun-An-Electronic-Batteryless-Dice" src="http://hackadaycom.files.wordpress.com/2011/09/faraday-for-fun-an-electronic-batteryless-dice.jpg" alt="" width="470" height="353" /></p>
<p>[Gadre] built his own ATtiny project without using any batteries. It&#8217;s an electronic Dice (or die if you&#8217;re being critical) which uses <a href="http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/">induction to charge a storage capacitor to act as the power source</a>. The voltage generator is made from a tube of Perspex which houses a set of rare-earth magnets. At the enter of the tube [Gadre] machined a channel wich accepts about 1500 windings of 30 AWG magnet wire. When someone shakes the tube back and forth the magnet passes the wire, inducing a current.  The product is stored in a 4700 uF capacitor, which feeds a boost converter to power the rest of the circuit.</p>
<p>The ATtiny13V that controls the circuit is running its internal RC oscillator at 128 kHz, the lowest setting possible in order to minimize power consumption. After a good shake the user can press a button to roll the die, which is then displayed for several seconds on a group of seven LEDs. See for yourself in the video after the break.</p>
<p><span id="more-55612"></span><span style="text-align:center; display: block;"><a href="http://hackaday.com/2011/09/14/attiny-hacks-look-ma-no-batteries/"><img src="http://img.youtube.com/vi/lHOUamO67uk/2.jpg" alt="" /></a></span></p>
<br />Filed under: <a href='http://hackaday.com/category/microcontrollers/'>Microcontrollers</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/55612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/55612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/55612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/55612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/55612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/55612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/55612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/55612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/55612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/55612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/55612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/55612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/55612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/55612/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=55612&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/09/14/attiny-hacks-look-ma-no-batteries/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/09/attinyhacks.png" medium="image">
			<media:title type="html">ATtiny Hacks Theme Banner</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/09/faraday-for-fun-an-electronic-batteryless-dice.jpg" medium="image">
			<media:title type="html">Faraday-For-Fun-An-Electronic-Batteryless-Dice</media:title>
		</media:content>
	</item>
		<item>
		<title>Hardware XOR for output pins on AVR microcontrollers</title>
		<link>http://hackaday.com/2011/07/09/hardware-xor-for-output-pins-on-avr-microcontrollers/</link>
		<comments>http://hackaday.com/2011/07/09/hardware-xor-for-output-pins-on-avr-microcontrollers/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 22:00:47 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[assembler]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[toggle]]></category>
		<category><![CDATA[xor]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=48447</guid>
		<description><![CDATA[Did you know that most AVR chips have a type of hardware exclusive OR (XOR) option when it comes to the logic levels of the output pins? If you look in the datasheet (the image above is a screenshot from an ATtiny13 datasheet) you&#8217;ll find a section on Toggling the Pin. It turns out that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=48447&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-48448" title="hardware-xor-for-avr-chips" src="http://hackadaycom.files.wordpress.com/2011/07/hardware-xor-for-avr-chips.jpg" alt="" width="470" height="224" /></p>
<p>Did you know that most AVR chips have a type of hardware exclusive OR (XOR) option when it comes to the logic levels of the output pins? If you look in the datasheet (the image above is a screenshot from an ATtiny13 datasheet) you&#8217;ll find a section on Toggling the Pin. It turns out that if you set a PORT as an output, writing logic one to the corresponding PIN register will toggle the logic levels of that out. This is really easy to overlook if you&#8217;re writing in C, but I&#8217;ve been working on learning a bit of assembler language and found this to be very useful. Keep reading after the break and I&#8217;ll tell you how I happened upon this info and what it&#8217;s good for.</p>
<p><span id="more-48447"></span>So first off, let&#8217;s talk about why this doesn&#8217;t matter very much if you&#8217;re writing in C code. Normally if you want to toggle some output pins you&#8217;ll just write a one-liner that XOR&#8217;s with a bitmask:</p>
<p><pre class="brush: cpp;">PORTB ^= 0xFF;</pre></p>
<p>This is a bit of C shorthand (learn more about that <a href="http://hackaday.com/2010/11/05/avr-programming-03-reading-and-compiling-code/">from my tutorial series</a>) that performs the XOR on the current output levels and writes the result back to the port. But the same thing can be done in hardware by writing the bitmask to the PINB register:</p>
<p><pre class="brush: cpp;">PINB = 0xFF;</pre></p>
<p>You don&#8217;t really care, because it&#8217;s just one line of code. In fact it&#8217;s probably easier to XOR the PORTB because it makes more sense conceptually. But the compiler might end up using more cycles than if you had written to the PIN register.</p>
<p>I happened across this feature because I was blinking some LEDs as a way to learn assembler. I had this jumble of code in an Interrupt Service Routine:</p>
<p><pre class="brush: cpp;">ldi myReg, 0xFF
in intReg, PORTB
eor intReg, myReg
out PORTB, intReg</pre></p>
<p>It loads a bitmask into one register, loads in the current logic from PORTB to another register, performs an XOR of the two, and writes the result back to PORTB. This takes four cycles and requires two registers. Toggling bits is such a rudimentary operation I was surprised there wasn&#8217;t a command to XOR bits directly so I started searching around. <a href="http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;file=viewtopic&amp;t=83904&amp;start=0">I came across this article</a> over at AVR Freaks which clued me into the bit toggle feature. Now I was able to reduce my assembler code as follows:</p>
<p><pre class="brush: cpp; wrap-lines: false;">ldi intReg2, 0xFF	;temporarity use intReg2 as a bit mask
out PINB, intReg2	;writing to PINB effectivley does an Exclusive OR on PORTB</pre></p>
<p>This results in the same toggling effect, but takes just two cycles and requires the use of only one register.</p>
<p>What I found most interesting is that no matter how much I use AVR chips, there &#8216;s never a shortage of surprises waiting to be found in the datasheet.</p>
<br />Filed under: <a href='http://hackaday.com/category/microcontrollers/'>Microcontrollers</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/48447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/48447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/48447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/48447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/48447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/48447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/48447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/48447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/48447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/48447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/48447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/48447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/48447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/48447/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=48447&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/07/09/hardware-xor-for-output-pins-on-avr-microcontrollers/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/07/hardware-xor-for-avr-chips.jpg" medium="image">
			<media:title type="html">hardware-xor-for-avr-chips</media:title>
		</media:content>
	</item>
		<item>
		<title>ATtiny13 powered handheld helicopter game</title>
		<link>http://hackaday.com/2011/06/26/attiny13-powered-handheld-helicopter-game/</link>
		<comments>http://hackaday.com/2011/06/26/attiny13-powered-handheld-helicopter-game/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 21:09:59 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[helicopter]]></category>
		<category><![CDATA[lcd]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=47092</guid>
		<description><![CDATA[[Owen] just finished putting together a portable helicopter game. It&#8217;s pretty impressive, especially since he used an ATtiny13 microcontroller. That chip uses an 8-pin dip package, offering only five I/O pins (six if you use the reset pin) and 1k of programming space. The game runs on a small cellphone-type LCD screen. The helicopter remains [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=47092&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-47093" title="tiny13-helicopter-game" src="http://hackadaycom.files.wordpress.com/2011/06/tiny13-helicopter-game-e1309029231499.jpg" alt="" width="470" height="353" /></p>
<p>[Owen] just finished putting together <a href="http://www.hackniac.com/blog/?p=268">a portable helicopter game</a>. It&#8217;s pretty impressive, especially since he used an ATtiny13 microcontroller. That chip uses an 8-pin dip package, offering only five I/O pins (six if you use the reset pin) and 1k of programming space.</p>
<p>The game runs on a small cellphone-type LCD screen. The helicopter remains somewhere in the center column of the screen as the maze that makes up the game board approaches one step at a time. The single button that controls the helicopter will raise it with each step of the maze when held down, or allow it to fall when released. The player&#8217;s progress is shown as a hex value in the upper left corner of the screen. When you hit a wall, your score will be shown next to the high score for the game and will be saved in EEPROM if it&#8217;s a new record. As the game progresses, the maze gets harder based on the score. Check it out in a video clip after the break.</p>
<p><span id="more-47092"></span><span style="text-align:center; display: block;"><a href="http://hackaday.com/2011/06/26/attiny13-powered-handheld-helicopter-game/"><img src="http://img.youtube.com/vi/p_Sm2s3hkeo/2.jpg" alt="" /></a></span></p>
<br />Filed under: <a href='http://hackaday.com/category/microcontrollers/'>Microcontrollers</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/47092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/47092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/47092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/47092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/47092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/47092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/47092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/47092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/47092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/47092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/47092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/47092/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/47092/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/47092/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=47092&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/06/26/attiny13-powered-handheld-helicopter-game/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/06/tiny13-helicopter-game-e1309029231499.jpg" medium="image">
			<media:title type="html">tiny13-helicopter-game</media:title>
		</media:content>
	</item>
		<item>
		<title>Dimming control for an Ikea solar desk lamp</title>
		<link>http://hackaday.com/2011/05/16/dimming-control-for-an-ikea-solar-desk-lamp/</link>
		<comments>http://hackaday.com/2011/05/16/dimming-control-for-an-ikea-solar-desk-lamp/#comments</comments>
		<pubDate>Mon, 16 May 2011 21:32:31 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[home hacks]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[ikea]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[pwm]]></category>
		<category><![CDATA[solar]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=42989</guid>
		<description><![CDATA[[Frank] decided to augment his desk lamp&#8217;s features by adding dimming controls (translated). Since the light source is a triad of LEDs the best method of dimming their intensity is to use Pulse Width Modulation. That&#8217;s the method that he went with, and luckily the SUNNAN lamp from Ikea which he&#8217;s using as the donor for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=42989&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-42990" title="dimming-control-for-Ikea-soloar-lamp" src="http://hackadaycom.files.wordpress.com/2011/05/dimming-control-for-ikea-soloar-lamp.jpg" alt="" width="470" height="372" /></p>
<p>[Frank] decided to augment his desk lamp&#8217;s features by <a href="http://wiki.villaro-dixon.eu/doku.php?id=electronique:lampe_ikea:accueil">adding dimming controls</a> (<a href="http://translate.google.com/translate?js=n&amp;prev=_t&amp;hl=en&amp;ie=UTF-8&amp;layout=2&amp;eotf=1&amp;sl=auto&amp;tl=en&amp;u=http%3A%2F%2Fwiki.villaro-dixon.eu%2Fdoku.php%3Fid%3Delectronique%3Alampe_ikea%3Aaccueil">translated</a>). Since the light source is a triad of LEDs the best method of dimming their intensity is to use Pulse Width Modulation. That&#8217;s the method that he went with, and luckily the <a href="http://www.ikea.com/us/en/catalog/products/90154371">SUNNAN lamp from Ikea</a> which he&#8217;s using as the donor for the project has just enough room to squeeze in the parts necessary for this hack.</p>
<p>You need two main bits to use PWM with a lamp like this; a microcontroller (or possibly a timer chip like the 555) and a transistor to protect that chip from the current necessary to run the LEDs at full brightness. [Frank] went with an ATtiny13 and a 2N2222 transistor, both quite common and very inexpensive (you can even <a href="http://hackaday.com/2010/12/09/part-2-help-me-reverse-engineer-an-led-light-bulb/">pull the microcontroller from a light bulb</a> if you know where to look). Two buttons were added to the top of the lamp base which allow for up and down controls. There&#8217;s even an SOS function which is triggered by pressing both buttons at the same time. [Frank's] happy to show off the completed project in the clip after the break.</p>
<p><span id="more-42989"></span><span style="text-align:center; display: block;"><a href="http://hackaday.com/2011/05/16/dimming-control-for-an-ikea-solar-desk-lamp/"><img src="http://img.youtube.com/vi/lyg1QQ1XCvo/2.jpg" alt="" /></a></span></p>
<br />Filed under: <a href='http://hackaday.com/category/home-hacks/'>home hacks</a>, <a href='http://hackaday.com/category/microcontrollers/'>Microcontrollers</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/42989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/42989/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/42989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/42989/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/42989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/42989/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/42989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/42989/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/42989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/42989/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/42989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/42989/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/42989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/42989/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=42989&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/05/16/dimming-control-for-an-ikea-solar-desk-lamp/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/05/dimming-control-for-ikea-soloar-lamp.jpg" medium="image">
			<media:title type="html">dimming-control-for-Ikea-soloar-lamp</media:title>
		</media:content>
	</item>
		<item>
		<title>AVR HVSP on a tiny breadboard</title>
		<link>http://hackaday.com/2011/04/06/avr-hvsp-on-a-tiny-breadboard/</link>
		<comments>http://hackaday.com/2011/04/06/avr-hvsp-on-a-tiny-breadboard/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 18:30:48 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[attiny2313]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[breadboard]]></category>
		<category><![CDATA[hvsp]]></category>
		<category><![CDATA[isp]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=39550</guid>
		<description><![CDATA[AVR chips are convenient because you can program them in circuit at their operating voltage. That is, unless you screw up the fuse settings and they&#8217;ll no longer listen to an In System Programmer. If you find yourself facing this problem, just build this circuit on a breadboard and &#8216;unbrick&#8217; by holding down the button. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=39550&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-39553" title="avr-hvsp-on-breadboard" src="http://hackadaycom.files.wordpress.com/2011/04/avr-hvsp-on-breadboard-e1302104827832.jpg" alt="" width="470" height="353" /></p>
<p>AVR chips are convenient because you can program them in circuit at their operating voltage. That is, unless you screw up the fuse settings and they&#8217;ll no longer listen to an In System Programmer. If you find yourself facing this problem, just build this circuit on a breadboard and <a href="http://www.simpleavr.com/avr/hvsp-fuse-resetter">&#8216;unbrick&#8217; by holding down the button</a>.</p>
<p>The circuit seen above is a High Voltage Serial Programmer. This is one of two high voltage protocols used by AVR chips; HVSP is for chips that don&#8217;t have enough pins to use High Voltage Parallel Programming. This rendition uses a 12V power source, which is the level necessary for the high voltage method. A 7805 linear regulator joins the mix to provide operational voltage, along with one transistor, an ATtiny2313 to control the circuit, a four-digit 7-segment display for feedback, and one button for control.</p>
<p>Watch the video after the break to see an ATtiny13 programmed to disable the reset pin <a href="http://hackaday.com/2010/12/14/make-your-own-minimalist-avr-isp/">using a breadboarded programmer</a>. That chip is then easily rescued, having been automatically recognized by using its device signature.</p>
<p><span id="more-39550"></span><span style="text-align:center; display: block;"><a href="http://hackaday.com/2011/04/06/avr-hvsp-on-a-tiny-breadboard/"><img src="http://img.youtube.com/vi/rHaswi-OYXo/2.jpg" alt="" /></a></span></p>
<br />Filed under: <a href='http://hackaday.com/category/microcontrollers/'>Microcontrollers</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/39550/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/39550/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/39550/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/39550/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/39550/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/39550/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/39550/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/39550/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/39550/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/39550/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/39550/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/39550/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/39550/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/39550/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=39550&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/04/06/avr-hvsp-on-a-tiny-breadboard/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/04/avr-hvsp-on-breadboard-e1302104827832.jpg" medium="image">
			<media:title type="html">avr-hvsp-on-breadboard</media:title>
		</media:content>
	</item>
		<item>
		<title>Add a shutoff timer to your bathroom fan</title>
		<link>http://hackaday.com/2011/03/19/add-a-shutoff-timer-to-your-bathroom-fan/</link>
		<comments>http://hackaday.com/2011/03/19/add-a-shutoff-timer-to-your-bathroom-fan/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 14:38:24 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[home hacks]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[bathroom]]></category>
		<category><![CDATA[fan]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[light sensor]]></category>
		<category><![CDATA[TRIAC]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=37883</guid>
		<description><![CDATA[Adding this board (translated) to your bathroom fan will turn it into a smart device. It&#8217;s designed to automatically shut off the fan after it&#8217;s had some time to clear humidity from the room. It replaces the wall switch which normally controls these fans by converting the fan connection to always be connected to mains. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=37883&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-37884" title="SANYO DIGITAL CAMERA" src="http://hackadaycom.files.wordpress.com/2011/03/bathroom-fan-timer.jpg" alt="" width="470" height="353" /></p>
<p>Adding <a href="http://arv.radioliga.com/content/view/218/44/">this board</a> (<a href="http://translate.google.com/translate?js=n&amp;prev=_t&amp;hl=en&amp;ie=UTF-8&amp;layout=2&amp;eotf=1&amp;sl=auto&amp;tl=en&amp;u=http%3A%2F%2Farv.radioliga.com%2Fcontent%2Fview%2F218%2F44%2F">translated</a>) to your bathroom fan will turn it into a smart device. It&#8217;s designed to automatically shut off the fan after it&#8217;s had some time to clear humidity from the room. It replaces the wall switch which normally controls these fans by converting the fan connection to always be connected to mains.  The board draws constant power to keep the ATtiny13 running via a half-wave rectification circuit. A single LED that rises from the center of the PCB lights up to signal that the fan is in operation, but it is also used as a light sensor, similar to <a href="http://hackaday.com/2011/03/15/picaxe-using-leds-to-communicate/">the LED communications hack</a> from a couple of days ago. When the lights go on in the bathroom the microcontroller will turn on the exhaust fan via a Triac. It will remain on until the light level in the bathroom drops.</p>
<p>There&#8217;s an interesting timing algorithm that delays the fan startup, and varies the amount of time it will stay on in the dark depending on how long the bathroom lights were on. This way, a longer shower (which will build up more humidity) will cause the fan to remain on for the base of five minutes, plus one minute longer for every two minutes the bathroom was in use. Pretty smart, and quite useful if your bathroom sees high traffic from several family members.</p>
<br />Filed under: <a href='http://hackaday.com/category/home-hacks/'>home hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/37883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/37883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/37883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/37883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/37883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/37883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/37883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/37883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/37883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/37883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/37883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/37883/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/37883/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/37883/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=37883&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2011/03/19/add-a-shutoff-timer-to-your-bathroom-fan/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2011/03/bathroom-fan-timer.jpg" medium="image">
			<media:title type="html">SANYO DIGITAL CAMERA</media:title>
		</media:content>
	</item>
		<item>
		<title>Part 2: Help me reverse engineer an LED light bulb</title>
		<link>http://hackaday.com/2010/12/09/part-2-help-me-reverse-engineer-an-led-light-bulb/</link>
		<comments>http://hackaday.com/2010/12/09/part-2-help-me-reverse-engineer-an-led-light-bulb/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 14:55:20 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[HackIt]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[light bulb]]></category>
		<category><![CDATA[reverse engineer]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=31519</guid>
		<description><![CDATA[Almost a month ago I started trying to reverse engineer an inexpensive LED color changing light bulb. With your help I&#8217;ve mapped out the circuit, and taken control of the bulb. But there&#8217;s still a few mysteries in this little blinker. Join me after the break to see what I&#8217;ve done so far, peruse the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=31519&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-31524" title="more-led-bulb-hacking" src="http://hackadaycom.files.wordpress.com/2010/12/more-led-bulb-hacking.jpg" alt="" width="470" height="353" /></p>
<p>Almost a month ago I started trying to reverse engineer an inexpensive LED color changing light bulb. With your help I&#8217;ve mapped out the circuit, and taken control of the bulb. But there&#8217;s still a few mysteries in this little blinker. Join me after the break to see what I&#8217;ve done so far, peruse the schematic and source code, and to help solve the two remaining mysteries.</p>
<p><span id="more-31519"></span></p>
<h2><strong>What I&#8217;ve Accomplished</strong></h2>
<p>First off, thank you to all the commenters on the original post. I figured a lot out about this circuit because of that help. Notably, that the code I had dumped wasn&#8217;t any use because the lock bits had been set. There was also a lot of constructive input and conjecture about this when I shared it at the <a href="http://www.sector67.org/">Sector67</a> meeting on Tuesday (a hackerspace here in Madison).</p>
<p>I&#8217;m happy to say that I was able to program the ATtiny13 chip while in place. I damaged the first bulb I cracked open by drilling through an inductor. The second time I was more careful, and soldered ribbon cable onto each of the microcontroller pins.</p>
<p><img class="alignnone size-full wp-image-31520" title="IMG_1116" src="http://hackadaycom.files.wordpress.com/2010/12/img_1116-e1291849053605.jpg" alt="" width="470" height="353" /></p>
<p>I can program this chip without removing it from the board. This is accomplished by using High Voltage Serial Programming (HVSP) while AC power is not connected. I reset the fuses to factory settings to enable the reset pin but I have been unable to program this using ISP. But that&#8217;s not really a problem. The diffuser was taped in place and I added an IDC connector for easy interface with the bulb.</p>
<p><a href="https://github.com/szczys/Sylvania-LED-firmware">The firmware I&#8217;ve written is up on GitHub</a>. It has a few features; the default operation is to fade between red and green every 20 minutes as a porch light during this Christmas season. I&#8217;ll discuss the circuit below, but there are two unused pins on the device and I&#8217;ve added two test modes that are entered by jumping the pin to ground on the IDC connector. One of the test modes makes the red/green fader happen every 2 seconds. The other scrolls through primary and secondary colors with a 1/2 second delay.</p>
<p>So what we have is a microcontroller that drives two RGB LED modules in series. This chip has two available pins and 1K of programming space. So it should be relatively simple to make this into an I2C addressable module. Ideally this would be done without using AC power, sparking one of the questions I ask at the bottom of the post.</p>
<h2><strong>The Circuitry</strong></h2>
<p>I traced out the circuit board and recreated the schematic using an Ohmmeter and continuity Tester. There are two separate schematics, one for the LED control circuitry and another for the power supply.</p>
<p><a href="http://hackadaycom.files.wordpress.com/2010/12/led-control.png"><img class="alignnone size-large wp-image-31521" title="led-control" src="http://hackadaycom.files.wordpress.com/2010/12/led-control.png?w=450&#038;h=123" alt="" width="450" height="123" /></a></p>
<p><a href="http://hackadaycom.files.wordpress.com/2010/12/led-psu.png"><img class="alignnone size-large wp-image-31522" title="led-psu" src="http://hackadaycom.files.wordpress.com/2010/12/led-psu.png?w=450&#038;h=152" alt="" width="450" height="152" /></a></p>
<p>As expected, the power supply uses the example circuit from <a href="http://www.es.co.th/Schemetic/PDF/LNK304-306.PDF">the LNK304 datasheet</a>. The 12V output connects to the two VCC points on the controller schematic but the ground or return path is a bit peculiar. Look at the upper leg on the PSU schematic which includes R2, R3, R10, and C7. I&#8217;ve labeled this as &#8216;GND (5V rail)&#8217; because this connects to the ground side of the ATtiny13. The &#8216;GND (12V rail)&#8217; connects to the low side of the LEDs but that is separated from the microcontroller ground path. Obviously the Zener diode is clamping power input for the microcontroller (which needs 5V), but I have no idea how the filter circuit leading back to the AC hot is working.</p>
<p>Take a look at the component list and then see if you can help solve two questions.</p>
<ul>
<li>R1 – inline with center conductor of light socket; ~0.5 Ohm. Might be a fuse</li>
<li>R2 – 1004</li>
<li>R3 – 1004</li>
<li>R4 – 3001</li>
<li>R5 – 1302</li>
<li>R6 – 1201</li>
<li>R7 – 1Bx</li>
<li>R8 – 270</li>
<li>R9 – 270</li>
<li>R10 – 1003</li>
<li>D1 &#8211; 1N4007</li>
<li>D2 &#8211; 1N4007</li>
<li>D3 – R106 TF</li>
<li>D4 – Looks like a zener</li>
<li>D5 – RGB LED</li>
<li>D6 – RGB LED</li>
<li>D7 – JF S1J</li>
<li>IC1 – PNP Transistor</li>
<li>IC2 – PNP Transistor</li>
<li>IC3 – PNP Transistor</li>
<li>IC4 – LNK304GN AC/DC switching converter</li>
<li>IC5 – ATtiny13</li>
<li>C1 – smd without label</li>
<li>C2 – 50V 22 uF electrolytic</li>
<li>C3 – 400V 4.7 uF electrolytic</li>
<li>C4 – 400V 4.7 uF electrolytic</li>
<li>C5 – 25V 100 uF electrolytic</li>
<li>C6 – smd without label</li>
<li>C7- smd without label</li>
<li>L1 – 102J CEC</li>
<li>L2 – 102J CEC</li>
</ul>
<h2><strong>Help solve these two questions:</strong></h2>
<p style="padding-left:30px;">1. How does the GND connection for the ATtiny13 work? A complete answer will explain what the path that includes R2, R3, R10, and C7 actually does, and how it works in conjunction with the switching converter.</p>
<p style="padding-left:30px;">2. What is the easiest way to power the control circuit using DC?</p>
<p>Feel free to leave a comment with your thoughts. But if you&#8217;re so inclined, I&#8217;d love to read a more verbose description so post your thoughts on your own host and leave a link in the comments.</p>
<h2>Follow Me</h2>
<p><a href="http://twitter.com/szczys">szczys</a></p>
<br />Filed under: <a href='http://hackaday.com/category/hackit/'>HackIt</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/31519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/31519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/31519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/31519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/31519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/31519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/31519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/31519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/31519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/31519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/31519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/31519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/31519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/31519/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=31519&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2010/12/09/part-2-help-me-reverse-engineer-an-led-light-bulb/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/12/more-led-bulb-hacking.jpg" medium="image">
			<media:title type="html">more-led-bulb-hacking</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/12/img_1116-e1291849053605.jpg" medium="image">
			<media:title type="html">IMG_1116</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/12/led-control.png?w=450" medium="image">
			<media:title type="html">led-control</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/12/led-psu.png?w=450" medium="image">
			<media:title type="html">led-psu</media:title>
		</media:content>
	</item>
		<item>
		<title>Help me reverse engineer an LED light bulb</title>
		<link>http://hackaday.com/2010/11/12/help-me-reverse-engineer-an-led-light-bulb/</link>
		<comments>http://hackaday.com/2010/11/12/help-me-reverse-engineer-an-led-light-bulb/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 21:14:11 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[HackIt]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[buck converter]]></category>
		<category><![CDATA[color change]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[light bulb]]></category>
		<category><![CDATA[reverse engineer]]></category>
		<category><![CDATA[sylvania]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=30654</guid>
		<description><![CDATA[I went to the last monthly meeting of Sector 67, a hackerspace in Madison, WI. One of the things shown off was a color changing LED light bulb that Menards was clearing out for $1.99. Inside there&#8217;s two RGB LEDs controlled by an ATtiny13 and powered by an AC/DC buck converter. An ATtiny13 will run [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=30654&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-30656" title="hacking-sylvania-lightbulb" src="http://hackadaycom.files.wordpress.com/2010/11/hacking-sylvania-lightbulb.jpg" alt="hack LED bulb" width="470" height="353" /></p>
<p>I went to the last monthly meeting of <a href="http://www.sector67.org/">Sector 67</a>, a hackerspace in Madison, WI. One of the things shown off was a color changing LED light bulb that Menards was clearing out for $1.99. Inside there&#8217;s two RGB LEDs controlled by an ATtiny13 and powered by an AC/DC buck converter. An ATtiny13 will run you around $1.25 by itself so this price is quite amazing. I grabbed a couple of these bulbs and set to work on them. Join me after the break to see what I&#8217;ve got so far.</p>
<p><span id="more-30654"></span></p>
<p>These bulbs use a candelabra base so I grabbed an adapter and tried it out in a lamp. Here&#8217;s the result, you can see it stepping through color levels a few times a second:</p>
<span style="text-align:center; display: block;"><a href="http://hackaday.com/2010/11/12/help-me-reverse-engineer-an-led-light-bulb/"><img src="http://img.youtube.com/vi/yRrYp3qRBXc/2.jpg" alt="" /></a></span>
<p>We&#8217;ve seen this in a lot of <a href="http://hackaday.com/2009/11/17/diy-mood-lamp-looks-store-bought/">mood light hacks</a>, I want to get at the hardware and make it do my bidding. First thing&#8217;s first, time to crack it open. For some reason I thought that carefully drilling some holes around the base would help me figure out where best to use the Dremel cutting wheel. Unfortunately I immediately drilled through one of the inductor coils. Drat.</p>
<p><img class="alignnone size-full wp-image-30657" title="drilled-inductor" src="http://hackadaycom.files.wordpress.com/2010/11/drilled-inductor.jpg" alt="hack sylvania light bulb" width="470" height="353" /></p>
<p>Well, no stopping now. I&#8217;m not too worried as I also bought a solid red version of this bulb. I want to see what&#8217;s inside, whether it&#8217;s the same design with unpopulated components, or the full shebang with different hardware. I assume there&#8217;s no microcontroller inside so I&#8217;ll steal the inductor from that one later.</p>
<p>I cut off the diffuser and got to the circuit board. Here&#8217;s some images (click for hi-res) as well as a cursory list of hardware.</p>
<p><a href="http://hackadaycom.files.wordpress.com/2010/11/top-side-of-board.jpg"><img class="size-thumbnail wp-image-30658" title="top-side-of-board" src="http://hackadaycom.files.wordpress.com/2010/11/top-side-of-board.jpg?w=128&#038;h=96" alt="" width="128" height="96" /></a><a href="http://hackadaycom.files.wordpress.com/2010/11/underside-of-board.jpg"><img class="alignnone size-thumbnail wp-image-30659" title="underside-of-board" src="http://hackadaycom.files.wordpress.com/2010/11/underside-of-board.jpg?w=128&#038;h=96" alt="" width="128" height="96" /></a></p>
<p>Top:</p>
<ul>
<li>R2 &#8211; 1004</li>
<li>R3 &#8211; 1004</li>
<li>R4 &#8211; 3001</li>
<li>R5 &#8211; 1302</li>
<li>R10 &#8211; 1003</li>
<li>D4 &#8211; Looks like a zener&#8230; perhaps to set down votage for the tiny13</li>
<li>D5 &#8211; RGB LED</li>
<li>D6 &#8211; RGB LED</li>
<li>D7 &#8211; JF S1J</li>
<li>IC5 &#8211; ATtiny13</li>
<li>C1 &#8211; smd without label</li>
<li>C7- smd without label</li>
</ul>
<p>Bottom:</p>
<ul>
<li>R1 &#8211; inline with center conductor of light socket</li>
<li>P1 &amp; P2 &#8211; Labels for incoming AC power?</li>
<li>L1 &#8211; 102J CEC</li>
<li>L2 &#8211; 102J CEC</li>
<li>C2 &#8211; 50V 22 uF electrolytic</li>
<li>C3 &#8211; 400V 4.7 uF electrolytic</li>
<li>C4 &#8211; 400V 4.7 uF electrolytic</li>
<li>C5 &#8211; 25V 100 uF electrolytic</li>
<li>C6 &#8211; smd without label</li>
<li>D3 &#8211; R106 TF</li>
<li>R6 &#8211; 1201</li>
<li>R7 &#8211; 1Bx</li>
<li>R8 &#8211; 270</li>
<li>R9 &#8211; 270</li>
<li>IC1 &#8211; NGS (transistor for driving LEDs?)</li>
<li>IC2 &#8211; NGS (transistor for driving LEDs?)</li>
<li>IC3 &#8211; NGS (transistor for driving LEDs?)</li>
<li>IC4 &#8211; LNK304GN AC/DC switching converter</li>
</ul>
<p>I wanted to see if I could talk to the ATtiny13 so I soldered wires onto the pins and hooked it up to my AVR Dragon programmer. ISP was a no go so I soldered more wire to the remaining connection and gave high voltage programming a shot. That was also a failure. But since I already hosed that inductor I have no issue popping the microprocessor off of the board. Here it is soldered onto some perfboard and inserted in a breadboard:</p>
<p><img class="alignnone size-full wp-image-30661" title="hvsp-using-avr-dragon" src="http://hackadaycom.files.wordpress.com/2010/11/hvsp-using-avr-dragon-e1289594608462.jpg" alt="hack LED" width="470" height="353" /></p>
<p>I tried ISP again and that was a no-go. But this time around High Voltage Serial Programming worked. I talked to the chip with AVRdude using this command:</p>
<pre>avrdude -P usb -p t13 -c dragon_hvsp -v</pre>
<p>That polls the chip and reads back the fuse settings. Currently the lfuse is 0x6A which is the factory default but the hfuse is 0xFA. After checking the datasheet I see that they&#8217;ve disabled the reset function (that&#8217;s why ISP doesn&#8217;t work) and enabled brownout detection. I dumped the firmware and the eeprom and that&#8217;s where I&#8217;m at. Now I need your help.</p>
<p>I haven&#8217;t done much reverse engineering before this so I&#8217;m not sure what to do next. I disassembled the firmware using &#8216;ndisasm&#8217; but I have no idea what I can learn from it, or even how to read it. I&#8217;d love some help answering two questions:</p>
<p style="padding-left:30px;">1) Why couldn&#8217;t I talk to the chip when it was on the circuit board?</p>
<p style="padding-left:30px;">2) <del>What can I learn from <a href="http://pastebin.com/FVrKYQCZ">the disassembled code</a></del>. <strong>Update: </strong>after running the code through an AVR disassembler it looks like this is just an ascending list of numbers. [Tiago] pointed out in the comments that this is the behavior when the lock bits have been set. It should be possible to reuse the chip by erasing it but I won&#8217;t be able to dump the firmware first. Now I&#8217;ll focus on figuring out how the board is routed.</p>
<p>Let me know in the comments.</p>
<br />Filed under: <a href='http://hackaday.com/category/hackit/'>HackIt</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/30654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/30654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/30654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/30654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/30654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/30654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/30654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/30654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/30654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/30654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/30654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/30654/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/30654/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/30654/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=30654&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2010/11/12/help-me-reverse-engineer-an-led-light-bulb/feed/</wfw:commentRss>
		<slash:comments>101</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/11/hacking-sylvania-lightbulb.jpg" medium="image">
			<media:title type="html">hacking-sylvania-lightbulb</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/11/drilled-inductor.jpg" medium="image">
			<media:title type="html">drilled-inductor</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/11/top-side-of-board.jpg?w=128" medium="image">
			<media:title type="html">top-side-of-board</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/11/underside-of-board.jpg?w=128" medium="image">
			<media:title type="html">underside-of-board</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/11/hvsp-using-avr-dragon-e1289594608462.jpg" medium="image">
			<media:title type="html">hvsp-using-avr-dragon</media:title>
		</media:content>
	</item>
		<item>
		<title>Waking up with the (fake) sun</title>
		<link>http://hackaday.com/2010/07/09/waking-up-with-the-fake-sun/</link>
		<comments>http://hackaday.com/2010/07/09/waking-up-with-the-fake-sun/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 19:00:09 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[clock hacks]]></category>
		<category><![CDATA[alarm]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[sunrise]]></category>
		<category><![CDATA[TRIAC]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=25824</guid>
		<description><![CDATA[[Bogdan] has some trouble getting up in the morning. A blaring alarm will do the trick but that&#8217;s no way to start the day. To get him through the dark winter months he wanted to try a sunrise simulator. He patched into the alarm signal of his bedside clock, intercepting the command from the clock&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=25824&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-25825" title="sunrise-simulator" src="http://hackadaycom.files.wordpress.com/2010/07/sunrise-simulator-e1278690459817.jpg" alt="" width="470" height="353" /></p>
<p>[Bogdan] has some trouble getting up in the morning. A blaring alarm will do the trick but that&#8217;s no way to start the day. To get him through the dark winter months he wanted to try <a href="http://www.electrobob.com/sunrise_simulator/">a sunrise simulator</a>. He patched into the alarm signal of his bedside clock, intercepting the command from the clock&#8217;s microprocessor and using it as an input for his own ATtiny13. From there, the tiny13 gradually brightens a 150W halogen lamp using a triac until his room is as bright as a July morning. A signal is then sent to the alarm clock&#8217;s audio amplifier to turn on the audible alarm. He&#8217;s got the system set for a 20-minute sunrise so it&#8217;s just a matter of programming his alarm 20-minutes early than the &#8216;I absolutely have to get out of bed now&#8217; time.</p>
<br />Filed under: <a href='http://hackaday.com/category/clock-hacks/'>clock hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/25824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/25824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/25824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/25824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/25824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/25824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/25824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/25824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/25824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/25824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/25824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/25824/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/25824/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/25824/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=25824&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2010/07/09/waking-up-with-the-fake-sun/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/07/sunrise-simulator-e1278690459817.jpg" medium="image">
			<media:title type="html">sunrise-simulator</media:title>
		</media:content>
	</item>
		<item>
		<title>Wireless garage door indicator</title>
		<link>http://hackaday.com/2010/07/05/wireless-garage-door-indicator/</link>
		<comments>http://hackaday.com/2010/07/05/wireless-garage-door-indicator/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 17:00:38 +0000</pubDate>
		<dc:creator>Mike Szczys</dc:creator>
				<category><![CDATA[home hacks]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[garage door]]></category>
		<category><![CDATA[RF]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=25629</guid>
		<description><![CDATA[[Sixerdoodle's] garage door indicator tells him if the door is open or closed. He was inspired by the hack from last September but wanted to make it wireless. The setup uses an RF transmitter/receiver pair from Sparkfun, each controlled by an ATtiny13 microcontroller. We found his battle with RF interference from other devices to be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=25629&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-25630" title="wireless-garage-door-indicator" src="http://hackadaycom.files.wordpress.com/2010/07/wireless-garage-door-indicator-e1278345060305.jpg" alt="" width="470" height="314" /></p>
<p>[Sixerdoodle's] <a href="http://www.jenrathbun.com/Electronics/?page_id=538">garage door indicator</a> tells him if the door is open or closed. He was inspired by <a href="http://hackaday.com/2009/09/26/open-garage-door-indicator/">the hack from last September</a> but wanted to make it wireless. The setup uses an RF transmitter/receiver pair from Sparkfun, each controlled by an ATtiny13 microcontroller. We found his battle with RF interference from other devices to be interesting. Working out those bugs made for a great learning experience.</p>
<br />Filed under: <a href='http://hackaday.com/category/home-hacks/'>home hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/25629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/25629/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/25629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/25629/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/25629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/25629/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/25629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/25629/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/25629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/25629/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/25629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/25629/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/25629/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/25629/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=25629&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2010/07/05/wireless-garage-door-indicator/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Mike Szczys</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/07/wireless-garage-door-indicator-e1278345060305.jpg" medium="image">
			<media:title type="html">wireless-garage-door-indicator</media:title>
		</media:content>
	</item>
		<item>
		<title>Holy robin trap Batman!</title>
		<link>http://hackaday.com/2010/06/30/holy-robin-trap-batman/</link>
		<comments>http://hackaday.com/2010/06/30/holy-robin-trap-batman/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 17:23:37 +0000</pubDate>
		<dc:creator>Jakob Griffith</dc:creator>
				<category><![CDATA[home hacks]]></category>
		<category><![CDATA[attiny13]]></category>
		<category><![CDATA[batman]]></category>
		<category><![CDATA[bird]]></category>
		<category><![CDATA[cardboard]]></category>
		<category><![CDATA[mirror]]></category>
		<category><![CDATA[robin]]></category>
		<category><![CDATA[solenoid]]></category>
		<category><![CDATA[trap]]></category>

		<guid isPermaLink="false">http://hackaday.com/?p=25491</guid>
		<description><![CDATA[[Matt Meerian] introduced us to his kludge of cardboard, tape, mirrors, and electronics in the form of a clever non lethal robin trap. Whenever a pesky robin would enter the box, a sensor is triggered, the solenoid drops a lid, and the bird is contained (and we assume taken far away after that). Of course [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=25491&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-25492" title="The title is awesome, and you know it. Don't be hatin'..." src="http://hackadaycom.files.wordpress.com/2010/06/robin-trap.png" alt="" width="470" height="276" /></p>
<p>[Matt Meerian] introduced us to his kludge of cardboard, tape, mirrors, and electronics in the form of a clever non lethal <a href="http://electronicsfluff.blogspot.com/2010/06/relocation-of-robin-for-those-of-you.html">robin trap</a>. Whenever a pesky robin would enter the box, a sensor is triggered, the solenoid drops a lid, and the bird is contained (and we assume taken far away after that).</p>
<p>Of course the plan backfired; we wont spoil what happened, but you can click the link above to find out.</p>
<p>Related: <a href="http://hackaday.com/2009/03/11/arduino-mouse-trap/">Arduino Mouse Trap</a></p>
<br />Filed under: <a href='http://hackaday.com/category/home-hacks/'>home hacks</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/25491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/25491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/25491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/25491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hackadaycom.wordpress.com/25491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hackadaycom.wordpress.com/25491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hackadaycom.wordpress.com/25491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hackadaycom.wordpress.com/25491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/25491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/25491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/25491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/25491/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/25491/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/25491/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&amp;blog=4779443&amp;post=25491&amp;subd=hackadaycom&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hackaday.com/2010/06/30/holy-robin-trap-batman/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Jakob Griffith</media:title>
		</media:content>

		<media:content url="http://hackadaycom.files.wordpress.com/2010/06/robin-trap.png" medium="image">
			<media:title type="html">The title is awesome, and you know it. Don&#039;t be hatin&#039;...</media:title>
		</media:content>
	</item>
	</channel>
</rss>
