<?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>Catmacey&#039;s stuff</title>
	<atom:link href="http://catmacey.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://catmacey.wordpress.com</link>
	<description>Electronics things, DIY and stuff...</description>
	<lastBuildDate>Tue, 27 Dec 2011 18:40:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='catmacey.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Catmacey&#039;s stuff</title>
		<link>http://catmacey.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://catmacey.wordpress.com/osd.xml" title="Catmacey&#039;s stuff" />
	<atom:link rel='hub' href='http://catmacey.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Firmware for lighthouse v2.</title>
		<link>http://catmacey.wordpress.com/2011/08/28/firmware-for-lighthouse-v2/</link>
		<comments>http://catmacey.wordpress.com/2011/08/28/firmware-for-lighthouse-v2/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 18:37:18 +0000</pubDate>
		<dc:creator>catmacey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://catmacey.wordpress.com/?p=564</guid>
		<description><![CDATA[Here&#8217;s the firmware for my V2 lighthouse PCBs. If you bought a PCB from me I should have already sent this to you, but I though I had better post it here just in case. Download the C source and Hex here Filed under: Uncategorized<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=564&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the firmware for my V2 lighthouse PCBs.<br />
If you bought a PCB from me I should have already sent this to you, but I though I had better post it here just in case.</p>
<p><a href="http://catmacey.com/electronics/lighthouse/lighthouse_v2.zip">Download the C source and Hex here</a></p>
<br />Filed under: <a href='http://catmacey.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/catmacey.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/catmacey.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/catmacey.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/catmacey.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/catmacey.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/catmacey.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/catmacey.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/catmacey.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/catmacey.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/catmacey.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/catmacey.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/catmacey.wordpress.com/564/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/catmacey.wordpress.com/564/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/catmacey.wordpress.com/564/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=564&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://catmacey.wordpress.com/2011/08/28/firmware-for-lighthouse-v2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c43ab8b5c4b72304a1c452a0f04d23be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Catmacey</media:title>
		</media:content>
	</item>
		<item>
		<title>Charlieplexed lighthouse version 2 PCBs have arrived</title>
		<link>http://catmacey.wordpress.com/2011/02/08/charlieplexed-lighthouse-version-2-pcbs-have-arrived/</link>
		<comments>http://catmacey.wordpress.com/2011/02/08/charlieplexed-lighthouse-version-2-pcbs-have-arrived/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 01:01:22 +0000</pubDate>
		<dc:creator>catmacey</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[12f683]]></category>
		<category><![CDATA[charlieplex]]></category>
		<category><![CDATA[eagle]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[lighthouse]]></category>
		<category><![CDATA[lights]]></category>
		<category><![CDATA[PCB]]></category>
		<category><![CDATA[PIC]]></category>

		<guid isPermaLink="false">http://catmacey.wordpress.com/?p=511</guid>
		<description><![CDATA[My version two charlieplexed lighthouse circuit PCBs (charliediscs) have arrived back from the Seeedstudio&#8217;s fab. I used the same deal as for my last boards, this time it took around 3 weeks in total.  That&#8217;s pretty good for 20USD! The overall circuit is the same as the prototype I built two years ago but with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=511&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_522" class="wp-caption aligncenter" style="width: 500px"><a href="http://catmacey.wordpress.com/2011/02/08/charlieplexed-lighthouse-version-2-pcbs-have-arrived/"><img class="size-full wp-image-522  " title="Charlieplexed lighthouse" src="http://catmacey.files.wordpress.com/2011/02/pict0062.jpg?w=500" alt=""   /></a><p class="wp-caption-text">A long exposure makes it look quite funky</p></div>
<p>My version two <a href="http://en.wikipedia.org/wiki/Charlieplexing">charlieplexed</a> lighthouse circuit PCBs (charliediscs) have arrived back from the <a href="http://www.seeedstudio.com/depot/">Seeedstudio&#8217;s</a> fab. I used the same deal as for my last boards, this time it took around 3 weeks in total.  That&#8217;s pretty good for 20USD!</p>
<p><span id="more-511"></span>The overall circuit is the same as the <a href="http://catmacey.wordpress.com/2008/06/09/mini-lighthouse-led-circuit/">prototype</a> I built two years ago but with some improvements to make it easier to use and also to allow you to use normal LEDs rather than surface mount packages. It&#8217;s mostly SMD but I&#8217;m still using the DIP package PIC12f683 (<a href="http://ww1.microchip.com/downloads/en/devicedoc/41211d_.pdf">datasheet</a>) as I have a whole bunch of them that I bought a while ago.</p>
<p style="text-align:center;">&nbsp;</p>
<div id="attachment_525" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-525 " title="Two of the new boards" src="http://catmacey.files.wordpress.com/2011/02/pict00731.jpg?w=500" alt=""   /><p class="wp-caption-text">Two of the new boards. Seeedstudio sent me twelve in total.</p></div>
<div id="attachment_512" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-512 " title="Top" src="http://catmacey.files.wordpress.com/2011/02/dscf6665.jpg?w=500" alt=""   /><p class="wp-caption-text">Top side of the board. Note the hybrid LED pads that combine the SMD with a plated hole for normal LEDs. I also added a couple of mounting holes.</p></div>
<div id="attachment_513" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-513 " title="Bottom" src="http://catmacey.files.wordpress.com/2011/02/dscf6671.jpg?w=500" alt=""   /><p class="wp-caption-text">Bottom of the board. It&#039;s mostly the LM317 voltage regulator down here.  If you were using a regulated supply you could by-pass it.</p></div>
<div id="attachment_518" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-518 " title="LED packages" src="http://catmacey.files.wordpress.com/2011/02/pict0032.jpg?w=500" alt=""   /><p class="wp-caption-text">The board is designed to suit many type of LED package.  Here&#039;s are some standard 603, 805 and 1206 packages (top) and a couple of oddballs (bottom)</p></div>
<p style="text-align:center;">&nbsp;</p>
<div id="attachment_520" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-520" title="Fancier LEDs" src="http://catmacey.files.wordpress.com/2011/02/pict0038.jpg?w=500" alt=""   /><p class="wp-caption-text">You could also use some fancier packages such as these PLCC packages or the OSRAM PLCC side LED that I used on the prototype (top and bottom)</p></div>
<p style="text-align:center;">&nbsp;</p>
<div id="attachment_514" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-514" title="5mm LEDs" src="http://catmacey.files.wordpress.com/2011/02/dscf6673.jpg?w=500" alt=""   /><p class="wp-caption-text">But for this one I&#039;m going to use some super-bright 5mm blue LEDs that I&#039;ve had kicking around for a while.  I&#039;ve bent them at a right angle so the light goes sideways.</p></div>
<div id="attachment_517" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-517" title="Close up of 5mm LEDs" src="http://catmacey.files.wordpress.com/2011/02/pict0010.jpg?w=500" alt=""   /><p class="wp-caption-text">Make sure you fit the LEDs with the polarity running in the same direction. It&#039;s doesn&#039;t really matter which way you choose as long as they are all the same.</p></div>
<div id="attachment_515" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-515" title="LEDs soldered" src="http://catmacey.files.wordpress.com/2011/02/dscf6686.jpg?w=500" alt=""   /><p class="wp-caption-text">All the LEDs are soldered in, just need to clip the legs.</p></div>
<div id="attachment_519" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-519" title="ICSP connector" src="http://catmacey.files.wordpress.com/2011/02/pict0033.jpg?w=500" alt=""   /><p class="wp-caption-text">By swapping around some of the pins this version can be programmed and then run with the ICSP connector still attached.  No need to have the isolation switch that I needed on the prototype. It makes testing much easier.</p></div>
<div id="attachment_516" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-516" title="lighthouse v2 schematic" src="http://catmacey.files.wordpress.com/2011/02/lighthouse-v2-schematic.jpg?w=500" alt=""   /><p class="wp-caption-text">Schematic for version 2. More or less the same as v1 but now the ICSP Clock line is used as the button input rather than as part of the charlieplexing. This means it can be programmed without needing to isolate the ICSP lines.</p></div>
<div id="attachment_524" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-524" title="Comparison" src="http://catmacey.files.wordpress.com/2011/02/pict0080.jpg?w=500" alt=""   /><p class="wp-caption-text">The original prototype (left) and the new v2 circuit (right).  The new circuit is a bit bigger, partly to fit the hybrid LED pads in but also because the max size for the PCB deal was 5cm x 5cm so I thought I&#039;d make the most of it. Note the red dip switch serving as the ICSP isolator for programming the prototype.  We don&#039;t need that any more!</p></div>
<div id="attachment_521" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-521" title="Dark" src="http://catmacey.files.wordpress.com/2011/02/pict0058.jpg?w=500" alt=""   /><p class="wp-caption-text">Another arty long exposure shot.</p></div>
<p><span style="text-align:center; display: block;"><a href="http://catmacey.wordpress.com/2011/02/08/charlieplexed-lighthouse-version-2-pcbs-have-arrived/"><img src="http://img.youtube.com/vi/tK1zPhki-_4/2.jpg" alt="" /></a></span></p>
<br />Filed under: <a href='http://catmacey.wordpress.com/category/electronics/'>Electronics</a> Tagged: <a href='http://catmacey.wordpress.com/tag/12f683/'>12f683</a>, <a href='http://catmacey.wordpress.com/tag/charlieplex/'>charlieplex</a>, <a href='http://catmacey.wordpress.com/tag/eagle/'>eagle</a>, <a href='http://catmacey.wordpress.com/tag/electronics/'>Electronics</a>, <a href='http://catmacey.wordpress.com/tag/led/'>LED</a>, <a href='http://catmacey.wordpress.com/tag/lighthouse/'>lighthouse</a>, <a href='http://catmacey.wordpress.com/tag/lights/'>lights</a>, <a href='http://catmacey.wordpress.com/tag/pcb/'>PCB</a>, <a href='http://catmacey.wordpress.com/tag/pic/'>PIC</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/catmacey.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/catmacey.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/catmacey.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/catmacey.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/catmacey.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/catmacey.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/catmacey.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/catmacey.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/catmacey.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/catmacey.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/catmacey.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/catmacey.wordpress.com/511/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/catmacey.wordpress.com/511/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/catmacey.wordpress.com/511/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=511&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://catmacey.wordpress.com/2011/02/08/charlieplexed-lighthouse-version-2-pcbs-have-arrived/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c43ab8b5c4b72304a1c452a0f04d23be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Catmacey</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/pict0062.jpg" medium="image">
			<media:title type="html">Charlieplexed lighthouse</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/pict00731.jpg" medium="image">
			<media:title type="html">Two of the new boards</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6665.jpg" medium="image">
			<media:title type="html">Top</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6671.jpg" medium="image">
			<media:title type="html">Bottom</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/pict0032.jpg" medium="image">
			<media:title type="html">LED packages</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/pict0038.jpg" medium="image">
			<media:title type="html">Fancier LEDs</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6673.jpg" medium="image">
			<media:title type="html">5mm LEDs</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/pict0010.jpg" medium="image">
			<media:title type="html">Close up of 5mm LEDs</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6686.jpg" medium="image">
			<media:title type="html">LEDs soldered</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/pict0033.jpg" medium="image">
			<media:title type="html">ICSP connector</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/lighthouse-v2-schematic.jpg" medium="image">
			<media:title type="html">lighthouse v2 schematic</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/pict0080.jpg" medium="image">
			<media:title type="html">Comparison</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/pict0058.jpg" medium="image">
			<media:title type="html">Dark</media:title>
		</media:content>

		<media:content url="http://img.youtube.com/vi/tK1zPhki-_4/2.jpg" medium="image" />
	</item>
		<item>
		<title>What do you get if you cross a Tobo with a Billy?</title>
		<link>http://catmacey.wordpress.com/2011/02/02/what-do-you-get-if-you-cross-an-ikea-tobo-with-a-billy/</link>
		<comments>http://catmacey.wordpress.com/2011/02/02/what-do-you-get-if-you-cross-an-ikea-tobo-with-a-billy/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 01:43:50 +0000</pubDate>
		<dc:creator>catmacey</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[TV]]></category>
		<category><![CDATA[Billy]]></category>
		<category><![CDATA[IKEA]]></category>
		<category><![CDATA[Tobo]]></category>

		<guid isPermaLink="false">http://catmacey.wordpress.com/?p=474</guid>
		<description><![CDATA[We&#8217;ve been telling ourselves that we&#8217;re going to get a new TV for a couple of years and we finally did it.  We&#8217;re now all super funky flat-screened, just like the popular kids are doing! Our apartment is not the biggest and space is always at a premium so we needed something that would take [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=474&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_501" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-501" title="DSCF6652" src="http://catmacey.files.wordpress.com/2011/02/dscf6652.jpg?w=500" alt=""   /><p class="wp-caption-text">A new TV unit! It&#039;s a hybrid of an IKEA Tobo, a bit of Billy and some pine boards.</p></div>
<p>We&#8217;ve been telling ourselves that we&#8217;re going to get a new TV for a couple of years and we finally did it.  We&#8217;re now all super funky flat-screened, just like the popular kids are doing!</p>
<p><span id="more-474"></span>Our apartment is not the biggest and space is always at a premium so we needed something that would take up as little space as possible whilst containing all the TV junk.  We had our old 28&#8243; widescreen CRT on wheels so we could swing it out in front of the sofa for movies then push it back again for a bit of space.  However the rest of the TV junk (DVD player, HTPC and all the DVDs) was in a stationary unit against the wall so the two together wasn&#8217;t the best use of space.</p>
<p>So the idea for the new TV unit was to combine the the TV and the junk into one more compact piece of furniture which would again be on wheels to allow as much space flexibility as possible.</p>
<p>We got the new TV at Christmas, a nice 37&#8243; Samsung LED jobbie, but I couldn&#8217;t find anything that would suit for the base unit.  All the TV stands I could find were too low, too wide or too shallow. They were all intended to be stationary up against a wall, not surprising really&#8230;  I needed something with a bit of depth to be stable on the move, but no wider that 120cm to be able to fit in the 136cm space between the balcony doors.  Height was important too, it needed to be just right for when you have your feet up on the coffee table. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>After almost giving up and going the hard route of building a fully custom unit (or getting it made professionally) I found the Tobo TV unit at IKEA, it&#8217;s 114cm wide by 50cm deep and the main carcase is 48cm high. Perfect.  Now with a bit of help from some Billy shelving, a few castors and some pine from my local wood shop I can add a whole bunch of storage and support the TV securely at the right height.</p>
<p>I won&#8217;t go into massive details about how it goes together but here are some construction photos.  I used Google sketchup to workout the details.  The great thing about IKEA stuff is the many of the models are already built for you so it&#8217;s easy to try things out even if you&#8217;ve never seen the unit in real life. Assuming that the models are accurate of course&#8230; not always the case!</p>
<div id="attachment_485" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-485" title="TV Unit - Custom built" src="http://catmacey.files.wordpress.com/2011/02/tv-unit-custom-built.jpg?w=500" alt=""   /><p class="wp-caption-text">This was my design for a custom built unit. It was probably a bit ambitious for me to really consider building it myself, I don&#039;t have the tools, space or time, but it helped me to work out what I needed in a TV unit.</p></div>
<div id="attachment_486" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-486" title="TV Unit - Stuva" src="http://catmacey.files.wordpress.com/2011/02/tv-unit-stuva.jpg?w=500" alt=""   /><p class="wp-caption-text">This was an idea using IKEA&#039;s new Stuva childrens units, but it worked out that the TV would be too high for comfortable viewing and also maybe a bit unstable too due to the height of the TV.</p></div>
<p>Here&#8217;s what I ended up building.  The base is Tobo unit with a 3cm wider pine board on top, a cut-down 80cm wide billy shelf sits on top of that and some more pine board caps it all off and provides a sturdy face to mount the TV to.</p>
<div id="attachment_484" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-484" title="TV Unit - Complete" src="http://catmacey.files.wordpress.com/2011/02/tv-unit-complete.jpg?w=500" alt=""   /><p class="wp-caption-text">Front of unit. Tobo on the bottom, truncated billy on the top. Lots of storage space.</p></div>
<div id="attachment_482" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-482" title="TV Unit - Complete - back" src="http://catmacey.files.wordpress.com/2011/02/tv-unit-complete-back.jpg?w=500" alt=""   /><p class="wp-caption-text">Billy shelving is accessed from the back when the unit is swung out from the wall.</p></div>
<div id="attachment_483" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-483" title="TV Unit - Complete - transparent" src="http://catmacey.files.wordpress.com/2011/02/tv-unit-complete-transparent.jpg?w=500" alt=""   /><p class="wp-caption-text">Same again but transparent to show construction.</p></div>
<p><img class="aligncenter size-full wp-image-481" title="TV Unit - Back - transparent" src="http://catmacey.files.wordpress.com/2011/02/tv-unit-back-transparent.jpg?w=500" alt=""   /></p>
<div id="attachment_480" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-480" title="Salon - space" src="http://catmacey.files.wordpress.com/2011/02/salon-space.jpg?w=500" alt=""   /><p class="wp-caption-text">When the unit is against the wall the center of the room is free and clear.</p></div>
<div id="attachment_479" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-479" title="Salon - movies" src="http://catmacey.files.wordpress.com/2011/02/salon-movies.jpg?w=500" alt=""   /><p class="wp-caption-text">When we want to watch movies on the sofa we swing it out to the perfect spot.</p></div>
<p>Our living room is looking like an IKEA showroom.  The sofa is Manstad, there&#8217;s some Trofast in the corner for Hannah&#8217;s toys, a couple of Hol boxes&#8230; I think Tobo and Billy will feel at home, especially if they look around the rest of the apartment.</p>
<p>Here&#8217;s some photos of the construction.</p>
<div id="attachment_488" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-488" title="DSCF6606" src="http://catmacey.files.wordpress.com/2011/02/dscf6606.jpg?w=500" alt=""   /><p class="wp-caption-text">Starting off with the Tobo carcase and centering the pine board on top.</p></div>
<div id="attachment_492" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-492" title="DSCF6612" src="http://catmacey.files.wordpress.com/2011/02/dscf6612.jpg?w=500" alt=""   /><p class="wp-caption-text">Test fitting the billy. I cut the sides down to 48cm being careful not to mess up the laminate. Really all that&#039;s left of Billy is the sides and a single shelf. But for 25 Euro it was a cheap and easy way to go.</p></div>
<div id="attachment_490" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-490" title="DSCF6609" src="http://catmacey.files.wordpress.com/2011/02/dscf6609.jpg?w=500" alt=""   /><p class="wp-caption-text">I added four of these shelf brackets inside the Tobo to add some extra stiffness so it doesn&#039;t fold when pulled sideways.  I&#039;m assuming that a unit intended to be stationary isn&#039;t designed to take forces in those directions.</p></div>
<div id="attachment_494" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-494" title="DSCF6614" src="http://catmacey.files.wordpress.com/2011/02/dscf6614.jpg?w=500" alt=""   /><p class="wp-caption-text">Here I have the pine marked out where the Billy will go and have used the hole saw that comes with the Signum cable outlet kit to cut right through both the pine and the Tobo.  It took a couple of goes but ensured good alignment. </p></div>
<div id="attachment_493" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-493" title="DSCF6613" src="http://catmacey.files.wordpress.com/2011/02/dscf6613.jpg?w=500" alt=""   /><p class="wp-caption-text">I&#039;ve widened it into one super-hole for all the cables to pass through.</p></div>
<div id="attachment_491" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-491" title="DSCF6610" src="http://catmacey.files.wordpress.com/2011/02/dscf6610.jpg?w=500" alt=""   /><p class="wp-caption-text">View from the front.  I&#039;ll cut a hole in the vertical panel for cables to feed the TV and another in the top for the other various things like the telephone.</p></div>
<div id="attachment_495" class="wp-caption aligncenter" style="width: 378px"><img class="size-full wp-image-495" title="DSCF6615" src="http://catmacey.files.wordpress.com/2011/02/dscf6615.jpg?w=500" alt=""   /><p class="wp-caption-text">The construction is now pretty much done so now everything is test fitted to work out the TV mounting position.</p></div>
<p>Now it all comes apart and I have to varnish the pine.  I used a thin coat with a tint in order to blend the unit in with the rest of the room then another thicker clear coat for protection.  The clear coat took two days to dry <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<div id="attachment_498" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-498" title="DSCF6621" src="http://catmacey.files.wordpress.com/2011/02/dscf6621.jpg?w=500" alt=""   /><p class="wp-caption-text">Finally the varnish is dry so I&#039;ve rebuilt it all and put the back panel on.  I want to minimise the cables connecting the unit to the wall.  Just one power cord, a Cat5 network cable, telephone and TV antenna.  Now I just need to work out where all the wires go.</p></div>
<div id="attachment_497" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-497" title="DSCF6620" src="http://catmacey.files.wordpress.com/2011/02/dscf6620.jpg?w=500" alt=""   /><p class="wp-caption-text">Coming together.  Nearly all the cables are routed now. The TV mount is a bit odd, it is sort of free hanging (it was intended for a wall, they don&#039;t move much normally) so I&#039;ll use some BlueTak to hold the TV steady when the unit is moved around.</p></div>
<p>A few photos of the finished unit in place and relatively tidy.</p>
<div id="attachment_502" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-502" title="DSCF6649" src="http://catmacey.files.wordpress.com/2011/02/dscf6649.jpg?w=500" alt=""   /><p class="wp-caption-text">All ready to go. The pine matches the floor quite well.  It&#039;s IKEA too...</p></div>
<div id="attachment_503" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-503" title="DSCF6650" src="http://catmacey.files.wordpress.com/2011/02/dscf6650.jpg?w=500" alt=""   /><p class="wp-caption-text">Not bad for a weekend&#039;s hacking around.</p></div>
<div id="attachment_504" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-504" title="DSCF6654" src="http://catmacey.files.wordpress.com/2011/02/dscf6654.jpg?w=500" alt=""   /><p class="wp-caption-text">It&#039;s a bit messy round the back, but I don&#039;t plan of spending much time looking at it from this angle.</p></div>
<p>Hope you enjoyed the show.<br />
Thanks for viewing and I hope that it inspires you to get your hammer and saw out.</p>
<br />Filed under: <a href='http://catmacey.wordpress.com/category/diy/'>DIY</a>, <a href='http://catmacey.wordpress.com/category/tv/'>TV</a> Tagged: <a href='http://catmacey.wordpress.com/tag/billy/'>Billy</a>, <a href='http://catmacey.wordpress.com/tag/ikea/'>IKEA</a>, <a href='http://catmacey.wordpress.com/tag/tobo/'>Tobo</a>, <a href='http://catmacey.wordpress.com/tag/tv/'>TV</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/catmacey.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/catmacey.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/catmacey.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/catmacey.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/catmacey.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/catmacey.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/catmacey.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/catmacey.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/catmacey.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/catmacey.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/catmacey.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/catmacey.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/catmacey.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/catmacey.wordpress.com/474/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=474&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://catmacey.wordpress.com/2011/02/02/what-do-you-get-if-you-cross-an-ikea-tobo-with-a-billy/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c43ab8b5c4b72304a1c452a0f04d23be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Catmacey</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6652.jpg" medium="image">
			<media:title type="html">DSCF6652</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/tv-unit-custom-built.jpg" medium="image">
			<media:title type="html">TV Unit - Custom built</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/tv-unit-stuva.jpg" medium="image">
			<media:title type="html">TV Unit - Stuva</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/tv-unit-complete.jpg" medium="image">
			<media:title type="html">TV Unit - Complete</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/tv-unit-complete-back.jpg" medium="image">
			<media:title type="html">TV Unit - Complete - back</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/tv-unit-complete-transparent.jpg" medium="image">
			<media:title type="html">TV Unit - Complete - transparent</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/tv-unit-back-transparent.jpg" medium="image">
			<media:title type="html">TV Unit - Back - transparent</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/salon-space.jpg" medium="image">
			<media:title type="html">Salon - space</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/salon-movies.jpg" medium="image">
			<media:title type="html">Salon - movies</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6606.jpg" medium="image">
			<media:title type="html">DSCF6606</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6612.jpg" medium="image">
			<media:title type="html">DSCF6612</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6609.jpg" medium="image">
			<media:title type="html">DSCF6609</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6614.jpg" medium="image">
			<media:title type="html">DSCF6614</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6613.jpg" medium="image">
			<media:title type="html">DSCF6613</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6610.jpg" medium="image">
			<media:title type="html">DSCF6610</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6615.jpg" medium="image">
			<media:title type="html">DSCF6615</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6621.jpg" medium="image">
			<media:title type="html">DSCF6621</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6620.jpg" medium="image">
			<media:title type="html">DSCF6620</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6649.jpg" medium="image">
			<media:title type="html">DSCF6649</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6650.jpg" medium="image">
			<media:title type="html">DSCF6650</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2011/02/dscf6654.jpg" medium="image">
			<media:title type="html">DSCF6654</media:title>
		</media:content>
	</item>
		<item>
		<title>My first professionally made PCBs</title>
		<link>http://catmacey.wordpress.com/2010/12/06/my-first-professionally-made-pcbs/</link>
		<comments>http://catmacey.wordpress.com/2010/12/06/my-first-professionally-made-pcbs/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 16:29:48 +0000</pubDate>
		<dc:creator>catmacey</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[12f683]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[eagle]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[microchip]]></category>
		<category><![CDATA[PCB]]></category>
		<category><![CDATA[PIC]]></category>
		<category><![CDATA[seeedstudio]]></category>

		<guid isPermaLink="false">http://catmacey.wordpress.com/?p=437</guid>
		<description><![CDATA[I thought I&#8217;d have a go at getting my PWM controller PCB made professionally. There are quite a few options out there these days, most seem to be based in HK or China.  I used Seeedstudio&#8217;s prototype PCB service; 20 Dollars plus shipping for 10 copies of a 5cm by 5cm double sided board, how&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=437&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_466" class="wp-caption aligncenter" style="width: 500px"><a href="http://catmacey.wordpress.com/2010/12/06/my-first-professionally-made-pcbs"><img class="size-full wp-image-466 " title="DSCF6355" src="http://catmacey.files.wordpress.com/2010/12/dscf6355.jpg?w=500" alt=""   /></a><p class="wp-caption-text">A stack of PCBs ready to be assembled</p></div>
<p>I thought I&#8217;d have a go at getting my PWM controller PCB made professionally.</p>
<p><span id="more-437"></span> There are quite a few options out there these days, most seem to be based in HK or China.  I used <a href="http://www.seeedstudio.com/depot/fusion-pcb-2-layer-5cm5cm-max-10pcs-p-513.html">Seeedstudio&#8217;s prototype PCB</a> service; 20 Dollars plus shipping for 10 copies of a 5cm by 5cm double sided board, how&#8217;s about that for a bargain!  If you only really need a single board then I guess it could seem expensive, especially if you make a mistake and have to scrap them.  But for hassle free PCBs I think 20 Dollars is more than a fair trade against the time it would take to make them myself using toner transfer.  In fact when I compare it to the amount of hassle it takes to make a double  sided board at home with toner transfer I don&#8217;t know why I didn&#8217;t try  this before.</p>
<p>There are restrictions to getting super cheap prices.  The board size, thickness and silkscreen options are limited unless you pay more, but they fit what I need.  What you get is a double sided board with double sided solder mask and silkscreen plus a minimum trace/space size of 6mil.  6mil is pretty fine detail and far beyond what I can reliably do using <a href="http://catmacey.wordpress.com/projects/making-pcbs-with-simple-tools/">toner transfer</a> where my limit was around 12mil. Five of the boards are electrically tested to ensure they have been built correctly.   That ensures that the PCB doesn&#8217;t have any shorts or open circuits and faithfully represents the design you submitted.  It doesn&#8217;t ensure that your design is going to work&#8230; That&#8217;s up to you!</p>
<p>The down side of course is that it&#8217;s not immediate.  You have to plan ahead and send them off to be manufactured, then  assuming your design is suitable you&#8217;ll get them back in a couple of weeks.  I sent my order off on the 18th of Nov and got the boards back last Thursday (2nd Dec) so that&#8217;s&#8230; Wow! 14 days! Not bad!</p>
<p>Of course the nice thing with toner transfer is that if you&#8217;re on a roll and need a circuit board right now and have a few spare hours then you can get results fast.  But these days with a two year old child and a busy job I find it&#8217;s rare to get the time anyway, at least not at a time of day when it&#8217;d be convenient to be messing about with chemicals or drilling the board with a noisy Dremel.</p>
<p>Seeedstudio provide a DRU (Design Rule Set) for Eagle CAD so you can check that your board meets the spacing and sizing requirements.  They also provide a CAM routine that separates the layers out into the required Gerber files.  Its sounds like tricky thing to do but in fact it&#8217;s fairly simple.  Gerber files are in industry standard format and essentially a text file.  In our case we need a collection of files, one for the drill locations and sizes, 1 each for the copper top and bottom, 1 each for the solder mask top and bottom and 1 each for the silkscreen.</p>
<p>It&#8217;s important to check that your board passes the DRC in Eagle.  This checks the board for placement problems that don&#8217;t meet rule set and will highlight issues that are sometimes hard to spot such as components that are too close together or traces or pads that are too small.  It&#8217;s also important that you make sure your component library is accurate.  The DRC checks things based on the information provided in your component definitions.  If you use the libraries that come with Eagle you&#8217;ll probably be fine, but if you have modified them or drawn your own you&#8217;ll have to extra careful that all the various layers are correct, especially the solder mask that you normally don&#8217;t care about when doing toner transfer.</p>
<p>Another important thing is to make sure that your silk screens work.  By default Eagle places the component names (Layers 25 tNames and 26 bNames) right next to the component.  In most cases this is not the best location, it&#8217;ll be underneath another component or over a pad.  So you&#8217;ll need to &#8220;smash&#8221; the component to be able to move the name independently from the component.  That way you can move, rotate or scale the name to a better place&#8230; Or just delete it if it is really unnecessary.  At this point it&#8217;s handy to add some extra labels to identify the design or point out other useful features such as power ground or test points.</p>
<p>The last thing is to make sure you have a clear outline of the board in your dimension layer as this will be used to cut the board out. And in Seeed&#8217;s case you need to make sure that the board dimensions are within the limits for the service.</p>
<p>So once you&#8217;ve got all the layers tided double check and send them away!</p>
<p>Anyway here&#8217;s mine.</p>
<div id="attachment_439" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-439" title="DSCF6357" src="http://catmacey.files.wordpress.com/2010/12/dscf6357.jpg?w=500" alt="Top side of the board."   /><p class="wp-caption-text">It&#039;s a bit of mix of surface mount (SMT) and through the hole components based on what I had to hand in my parts box. The resistors are 0603 SMT, the LEDs are 1206 SMT and the voltage regulator is a LM317 in SOT223 SMT package.  Everything else is through the hole.</p></div>
<div id="attachment_451" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-451" title="DSCF6358-1" src="http://catmacey.files.wordpress.com/2010/12/dscf6358-1.jpg?w=500" alt=""   /><p class="wp-caption-text">The support tabs on the encoder needed bending a little bit to make them fit.  Also there&#039;s no copper around the tabs, it would have been handy to have something to solder them to but not a big deal. I should have double checked my library part.</p></div>
<div id="attachment_462" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-462" title="DSCF6364-1" src="http://catmacey.files.wordpress.com/2010/12/dscf6364-1.jpg?w=500" alt=""   /><p class="wp-caption-text">Top side with the SMT LEDs and resistors soldered on.</p></div>
<p style="text-align:center;">&nbsp;</p>
<div id="attachment_453" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-453" title="DSCF6444" src="http://catmacey.files.wordpress.com/2010/12/dscf6444.jpg?w=500" alt=""   /><p class="wp-caption-text">0603 resistors are pretty small but not hard to solder even if they do end up looking a little bit blobby.</p></div>
<p style="text-align:center;">&nbsp;</p>
<div id="attachment_461" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-461" title="DSCF6363-1" src="http://catmacey.files.wordpress.com/2010/12/dscf6363-1.jpg?w=500" alt=""   /><p class="wp-caption-text">Bottom side. LM317 regulator providing 5v for the PIC</p></div>
<div id="attachment_454" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-454" title="DSCF6451-1" src="http://catmacey.files.wordpress.com/2010/12/dscf6451-1.jpg?w=500" alt=""   /><p class="wp-caption-text">A couple of errors... but nothing critical.</p></div>
<div id="attachment_443" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-443" title="DSCF6370" src="http://catmacey.files.wordpress.com/2010/12/dscf6370.jpg?w=500" alt=""   /><p class="wp-caption-text">Assembled, tested and... Working!</p></div>
<div id="attachment_444" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-444" title="DSCF6376" src="http://catmacey.files.wordpress.com/2010/12/dscf6376.jpg?w=500" alt=""   /><p class="wp-caption-text">I kept the new one pretty much the same size as the stripboard prototype. If I went for a completely SMT version I could probably reduce it to around half the size, but the encoder and the screw connectors dominate the layout so there&#039;s no real need for it to be smaller.</p></div>
<p>So there you go.  Not perfect as you can see, I&#8217;ll have a few things to correct for next time, but all in all a great success, I&#8217;m already lining up my next order with a re-working of my <a href="http://catmacey.wordpress.com/2008/06/09/mini-lighthouse-led-circuit/">lighthouse circuit</a>.</p>
<p>Finally, I&#8217;ve got 9 spare boards so if anyone reading this would like a  bare board to build the circuit for themselves I&#8217;ll be happy to send you  one for 5 Euro including shipping.</p>
<p>The parts list is as follows;</p>
<pre>Part     Desc           Package
----------------------------------------
C1       100nF          E2,5-5
C2       1uF            E2,5-5
FET      2n7000         TO92-SPLAYED
ICSP     ICSP_HEADER    1X06
LED      Connector          AK500/2
LED1     LED            1206 SMT
LED2     LED            1206 SMT
PIC      PIC12f68329P   DIL8
PWR      Connector          AK500/2
R1       50R            R0603 SMT
R2       1K             R0603 SMT
R3       1K             R0603 SMT
R4       10K            R0603 SMT
R5       330R           R0603 SMT
R6       1K             R0603 SMT
SW1      ROTARY-ENCODER Sure Electronics
U$2      LM317M         SOT223</pre>
<br />Filed under: <a href='http://catmacey.wordpress.com/category/electronics/'>Electronics</a> Tagged: <a href='http://catmacey.wordpress.com/tag/12f683/'>12f683</a>, <a href='http://catmacey.wordpress.com/tag/components/'>components</a>, <a href='http://catmacey.wordpress.com/tag/eagle/'>eagle</a>, <a href='http://catmacey.wordpress.com/tag/electronics/'>Electronics</a>, <a href='http://catmacey.wordpress.com/tag/led/'>LED</a>, <a href='http://catmacey.wordpress.com/tag/microchip/'>microchip</a>, <a href='http://catmacey.wordpress.com/tag/pcb/'>PCB</a>, <a href='http://catmacey.wordpress.com/tag/pic/'>PIC</a>, <a href='http://catmacey.wordpress.com/tag/seeedstudio/'>seeedstudio</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/catmacey.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/catmacey.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/catmacey.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/catmacey.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/catmacey.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/catmacey.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/catmacey.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/catmacey.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/catmacey.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/catmacey.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/catmacey.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/catmacey.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/catmacey.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/catmacey.wordpress.com/437/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=437&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://catmacey.wordpress.com/2010/12/06/my-first-professionally-made-pcbs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c43ab8b5c4b72304a1c452a0f04d23be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Catmacey</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/12/dscf6355.jpg" medium="image">
			<media:title type="html">DSCF6355</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/12/dscf6357.jpg" medium="image">
			<media:title type="html">DSCF6357</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/12/dscf6358-1.jpg" medium="image">
			<media:title type="html">DSCF6358-1</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/12/dscf6364-1.jpg" medium="image">
			<media:title type="html">DSCF6364-1</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/12/dscf6444.jpg" medium="image">
			<media:title type="html">DSCF6444</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/12/dscf6363-1.jpg" medium="image">
			<media:title type="html">DSCF6363-1</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/12/dscf6451-1.jpg" medium="image">
			<media:title type="html">DSCF6451-1</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/12/dscf6370.jpg" medium="image">
			<media:title type="html">DSCF6370</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/12/dscf6376.jpg" medium="image">
			<media:title type="html">DSCF6376</media:title>
		</media:content>
	</item>
		<item>
		<title>Updated code for simple PWM LED controller</title>
		<link>http://catmacey.wordpress.com/2010/10/20/updated-code-for-simple-pwm-led-controller/</link>
		<comments>http://catmacey.wordpress.com/2010/10/20/updated-code-for-simple-pwm-led-controller/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 21:23:32 +0000</pubDate>
		<dc:creator>catmacey</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[12f683]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[lights]]></category>
		<category><![CDATA[microchip]]></category>
		<category><![CDATA[PIC]]></category>

		<guid isPermaLink="false">http://catmacey.wordpress.com/?p=405</guid>
		<description><![CDATA[I&#8217;ve updated the code to my LED strip driver and included a few new features. Here&#8217;s a quick demo video. [UPDATE 7 Mar 2011] Added input/output graph plus link to download LUT calc excel file. [UPDATE : DEC 6 2010] I&#8217;ve had some proper PCB&#8217;s made for this circuit. More info here. Intensity memory. Now [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=405&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated the code to my LED strip driver and included a few new features.</p>
<span style="text-align:center; display: block;"><a href="http://catmacey.wordpress.com/2010/10/20/updated-code-for-simple-pwm-led-controller/"><img src="http://img.youtube.com/vi/JJXDWnv_b68/2.jpg" alt="" /></a></span>
<p>Here&#8217;s a quick demo video.<br />
<strong>[UPDATE 7 Mar 2011]</strong> Added input/output graph plus link to download LUT calc excel file.<br />
<strong>[UPDATE : DEC 6 2010]</strong> I&#8217;ve had some proper PCB&#8217;s made for this circuit. <a title="My first professionally made PCBs" href="../2010/12/06/my-first-professionally-made-pcbs/">More info here</a>.</p>
<p><span id="more-405"></span></p>
<p><strong>Intensity memory.</strong></p>
<p>Now the code stores the current LED intensity (PWM duty) in EEPROM so that it can &#8220;remember&#8221; it after you turn it off and on again.  It actually stores the lookup table index (See below for explanation) rather than the intensity, but the end result is the same. It&#8217;s quite handy as it means the system works much more like how you expect lights to work.  It&#8217;s done with a simple test in the main loop that checks to see if the current value is different to the one it last stored.  If it&#8217;s different then it stores the current value.  The main loop contains a delay of 100mS so this runs about 10 times a second. (But only updates the EEPROM if the value has changed)</p>
<p>Reading and writing to EEPROM is pretty easy.  There&#8217;s a couple of things to be observed and a specific set of instructions to activate a write. It&#8217;s all in the datasheet.  There&#8217;s <a href="http://lika.be/wp/2005/08/boostc-compiler-libraries/comment-page-1/#comment-321" target="_blank">a great set of BoostC libraries by Lieven Hollevoet here.</a> I modified his eeprom library by to work with the PIC12f683. I&#8217;ve included my modified library in the zip file with the latest version of the code. (Thanks Lieven!)</p>
<p><strong>Input debouncing.</strong></p>
<p>I added some very simple de-bouncing to the input from the rotary encoder.  I was getting a lot of jittering due to the mechanical nature of the contacts in the encoder.  The de-bouncing is really simple.  When the IOC interrupt is called I store the current value of the rotary encoder inputs. I then wait 1mS and see if the value is the same. If it is then I process the input, if not I ignore it.</p>
<p>The length of the delay is important and depends on the type of input being de-bounced. Faster changing inputs require better solutions. If the delay is too long then you&#8217;ll miss catching some valid state changes. Too short and you&#8217;ll still get caught out by bouncing contacts.<a href="http://www.ganssle.com/debouncing-pt2.htm" target="_blank"> There&#8217;s some great and really detailed info here</a>.</p>
<p>The short version in this case is that allowing around 1 to 5 ms of  &#8220;settle&#8221; time is sufficient for this sort of application.  My delay of 1mS limits my maximum counts per second to around 1000 give or take a bit of overhead in the interrupt routine.</p>
<p>My encoder has 20 detents of a cycle (4 states) each so that&#8217;s 80 state changes per revolution.  1000 / 80 = 12.5 revolutions per second&#8230; More than enough for an encoder being turned by hand!</p>
<p>In practice it works perfectly, giving stable and precise control at just about any speed I can manage to twiddle at.</p>
<p><a href="http://www.rocketnumbernine.com/2010/03/06/decoding-a-rotary-encoder/" target="_blank">There&#8217;s more good rotary encoders info here.</a></p>
<p><strong>Intensity mapping</strong>.</p>
<p>I&#8217;ve created a &#8220;mapping&#8221; function in between the input and output to give a more linear feel to the way the LED intensity changes as you turn the knob.   The human eye has a more or less logarithmic response to light. It is more sensitive to changes at low light levels than it is to changes at high intensity. With direct relationship between input and output the perceived light level changes in a non-linear fashion; all the &#8220;action&#8221; is at the lower end, with the upper end tailing off into &#8220;bright&#8221;.</p>
<p>By creating an exponential mapping between the input and output the perception is that the light intensity changes in a more linear fashion. This gives good resolution of brightness at low levels where you can tell the difference at the cost of loss of resolution at high intensity &#8211; where you can&#8217;t tell the difference anyway.</p>
<p>It&#8217;s done like this.</p>
<p>The input is limited to between 0 and 127, the output uses the full 10bits of available PWM resolution.  The relationship is exponential, at least I think that&#8217;s what it is, using the following formula;</p>
<p><code>Round(((x^(10/input_limit)-1)/(x-1)) * output_limit)</code></p>
<p>Trial and error gave <strong>x</strong> a value of 36. With the rounding in place it gives a nice linear start to the curve up until around point 15 where it starts to grow exponentially.</p>
<p><code>Round(((36^(10/127)-1)/(36-1)) * 1024)</code></p>
<p>A graph of input/output looks like this.</p>
<div id="attachment_538" class="wp-caption aligncenter" style="width: 500px"><img class="size-medium wp-image-538" title="lookuptablecalc" src="http://catmacey.files.wordpress.com/2010/10/lookuptablecalc1.jpg?w=490&#038;h=390" alt="" width="490" height="390" /><p class="wp-caption-text">Input / Output mapping</p></div>
<p><a title="Lookup table download" href="http://www.catmacey.com/electronics/led-pwm/lookuptablecalc.xls" target="_blank">You can download the Excel document</a> that I created and have a play for yourself.</p>
<p>The lookup table is as follows (128 values). I tweaked it slightly to add 9 back in sacrificing a duplicate 3.  (I&#8217;ve marked them in blue in the excel file)</p>
<p><code>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 24, 25, 27, 28, 30, 32, 33, 35, 37, 39, 41, 43, 45, 47, 49, 52, 54, 56, 59, 61, 64, 66, 69, 72, 75, 78, 81, 84, 87, 91, 94, 98, 101, 105, 109, 113, 117, 121, 125, 130, 134, 139, 144, 149, 154, 159, 165, 170, 176, 182, 188, 194, 200, 207, 214, 221, 228, 235, 243, 250, 258, 267, 275, 284, 293, 302, 311, 321, 331, 342, 352, 363, 374, 386, 398, 410, 422, 435, 449, 462, 476, 491, 506, 521, 537, 553, 570, 587, 605, 623, 641, 661, 680, 701, 721, 743, 765, 788, 811, 835, 860, 885, 912, 939, 966, 995, 1023]</code></p>
<p>The lookup table array (LUT) needs to be stored in program memory as it&#8217;s a constant and we don&#8217;t have enough EEPROM anyway.  The only problem is that my lookup table contains values up to 1023 which would require an INT datatype (two bytes) and program memory can only store unsigned chars (single bytes).  I could store each int as two bytes and always remember to increment my counter by two, but that wastes a lot of space.</p>
<p>So to work around that I only store the lower byte in the LUT.  There&#8217;s not much going on in the upper byte as we&#8217;re only using the first two bits so I just store the index of the LUT at which these bits change in another 4 value array.  When I need to retrieve the full value (all 16 bits) I get the lower byte directly and find the upper byte by finding the index of the highest value that is less than the LUT position that I&#8217;m asking for.</p>
<p>Does that even make sense?</p>
<p>The data for the lower byte looks like this.</p>
<p><code>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 24, 25, 27, 28, 30, 32, 33, 35, 37, 39, 41, 43, 45, 47, 49, 52, 54, 56, 59, 61, 64, 66, 69, 72, 75, 78, 81, 84, 87, 91, 94, 98, 101, 105, 109, 113, 117, 121, 125, 130, 134, 139, 144, 149, 154, 159, 165, 170, 176, 182, 188, 194, 200, 207, 214, 221, 228, 235, 243, 250, 2, 11, 19, 28, 37, 46, 55, 65, 75, 86, 96, 107, 118, 130, 142, 154, 166, 179, 193, 206, 220, 235, 250, 9, 25, 41, 58, 75, 93, 111, 129, 149, 168, 189, 209, 231, 253, 20, 43, 67, 92, 117, 144, 171, 198, 227, 255]</code></p>
<p>The array for the upper byte just stores 4 values.</p>
<p><code>[0, 81, 104, 118]</code></p>
<p>To get the full value for LUT position 110 I first get the lower byte directly (<code>111</code>) then starting from the right hand side, I look for the highest value less than 110 (<code>104</code>) and store its index (<code>2</code>) in to the upper byte.  In binary that gives a 16 bit integer of <code>0b10,0110,1111</code> which in decimal is 623!</p>
<p>Working with integers and bytes is made a lot easier by using a union data-type that contains both an int and two bytes.<br />
<code><br />
union int_or_bytes {<br />
unsigned int ui;  //unsigned int<br />
unsigned char ub[2]; //array of bytes. lowest byte first.<br />
};</code></p>
<p>Anyway the end result is that when you turn the knob the light intensity grows in a nice linear manner, plus now it takes far fewer rotations to reach full intensity (around 3 1/2).</p>
<p><a href="http://catmacey.com/electronics/led-pwm/ledstrip_pwm_version-2.zip" target="_blank">The latest code, including the eeprom library and a HEX file is here</a>.<br />
The circuit remain the same as before.</p>
<br />Filed under: <a href='http://catmacey.wordpress.com/category/electronics/'>Electronics</a> Tagged: <a href='http://catmacey.wordpress.com/tag/12f683/'>12f683</a>, <a href='http://catmacey.wordpress.com/tag/components/'>components</a>, <a href='http://catmacey.wordpress.com/tag/electronics/'>Electronics</a>, <a href='http://catmacey.wordpress.com/tag/led/'>LED</a>, <a href='http://catmacey.wordpress.com/tag/lights/'>lights</a>, <a href='http://catmacey.wordpress.com/tag/microchip/'>microchip</a>, <a href='http://catmacey.wordpress.com/tag/pic/'>PIC</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/catmacey.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/catmacey.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/catmacey.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/catmacey.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/catmacey.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/catmacey.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/catmacey.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/catmacey.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/catmacey.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/catmacey.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/catmacey.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/catmacey.wordpress.com/405/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/catmacey.wordpress.com/405/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/catmacey.wordpress.com/405/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=405&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://catmacey.wordpress.com/2010/10/20/updated-code-for-simple-pwm-led-controller/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c43ab8b5c4b72304a1c452a0f04d23be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Catmacey</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/10/lookuptablecalc1.jpg?w=490" medium="image">
			<media:title type="html">lookuptablecalc</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick post about the DSO Nano</title>
		<link>http://catmacey.wordpress.com/2010/10/19/quick-post-about-the-dso-nano/</link>
		<comments>http://catmacey.wordpress.com/2010/10/19/quick-post-about-the-dso-nano/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 09:43:19 +0000</pubDate>
		<dc:creator>catmacey</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[oscilloscope]]></category>
		<category><![CDATA[suppliers]]></category>

		<guid isPermaLink="false">http://catmacey.wordpress.com/?p=413</guid>
		<description><![CDATA[A friend asked me about the oscilloscope I was using in my last post, you can see it in the very poor quality video at the end of the post. So I thought I&#8217;d make a quick post to explain.  It&#8217;s called the DSO Nano, it&#8217;s sold by Seeedstudio and the short of it is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=413&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_415" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-415" title="dso-nano" src="http://catmacey.files.wordpress.com/2010/10/dso-nano.jpg?w=500" alt=""   /><p class="wp-caption-text">DSO Nano (Image taken from Seeedstudio.)</p></div>
<p>A friend asked me about the oscilloscope I was using in my last post, you can see it in the very poor quality video at the end of the post. So I thought I&#8217;d make a quick post to explain.  It&#8217;s called the DSO Nano, it&#8217;s sold by <a href="http://www.seeedstudio.com/depot/" target="_blank">Seeedstudio</a> and the short of it is that it&#8217;s a fantastic tool for a great price.  It is limited in bandwidth, and has only one channel but I love it all the same.   It has around 1MHz of analog bandwidth which is admittedly quite low &#8211; giving a useable working limit to signals of around 100KHz &#8211; but that is more than enough for audio and fine for just about everything I&#8217;ve been doing such as debugging my PWM output from my LED fader.</p>
<p><span id="more-413"></span>If you want more details <a href="http://www.justblair.co.uk/seeed-studio-dso-nano-pocket-digital-storage-oscilloscope-review.html" target="_blank">there&#8217;s a nice review here at JustBlair&#8217;s site</a>.</p>
<p>Seeed are currently selling a newer updated version (<a href="http://www.seeedstudio.com/depot/dso-nano-v2-p-681.html" target="_blank">the DSO Nano v2</a>) that has a nicer case and a better charging circuit but is essentially the same bit of kit.  Plus there&#8217;s work afoot for a really cool looking two channel higher frequency model called the <a href="http://www.seeedstudio.com/blog/2010/09/18/dso-quad-is-forming-make-a-wish/" target="_blank">DSO Quad</a>, if the price range is similar then I&#8217;m definitely getting one!</p>
<p>Whilst you&#8217;re at the Seeed site have a look of some of the other stuff they have.  There are come really nice bits and bobs including the excellent <a href="http://www.seeedstudio.com/depot/bus-pirate-v3-assembled-p-609.htm" target="_blank">Bus Pirate</a> (it can talk i2c, SPI etc) and the great <a href="http://www.seeedstudio.com/depot/open-workbench-logic-sniffer-p-612.html" target="_blank">Open Workbench Logic Sniffer</a> (16 channel logic analyser) both by <a href="http://dangerousprototypes.com/" target="_blank">Dangerous Prototypes</a>.</p>
<p>With those three tools you have just about all you need for some decent hobby level electronics fiddling.</p>
<p>Things to note.  If like me you have an older version of the DSO Nano there are newer firmwares that significantly improve the user interface. I belive the new version of the Nano ships with with the latest version.</p>
<p>Also the Bus Pirate and OWLS are both under heavy development so there are new firmwares being release fairly frequently for them too.  Don&#8217;t get me wrong, they&#8217;re both fully functional and very useful as they are, they&#8217;re just getting even better with every revision.</p>
<p>So there you go, a kind of infomercial&#8230;</p>
<br />Filed under: <a href='http://catmacey.wordpress.com/category/electronics/'>Electronics</a> Tagged: <a href='http://catmacey.wordpress.com/tag/electronics/'>Electronics</a>, <a href='http://catmacey.wordpress.com/tag/oscilloscope/'>oscilloscope</a>, <a href='http://catmacey.wordpress.com/tag/suppliers/'>suppliers</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/catmacey.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/catmacey.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/catmacey.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/catmacey.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/catmacey.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/catmacey.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/catmacey.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/catmacey.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/catmacey.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/catmacey.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/catmacey.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/catmacey.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/catmacey.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/catmacey.wordpress.com/413/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=413&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://catmacey.wordpress.com/2010/10/19/quick-post-about-the-dso-nano/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c43ab8b5c4b72304a1c452a0f04d23be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Catmacey</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/10/dso-nano.jpg" medium="image">
			<media:title type="html">dso-nano</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple PWM control for LED strip</title>
		<link>http://catmacey.wordpress.com/2010/09/13/simple-pwm-control-for-led-strip/</link>
		<comments>http://catmacey.wordpress.com/2010/09/13/simple-pwm-control-for-led-strip/#comments</comments>
		<pubDate>Sun, 12 Sep 2010 23:30:26 +0000</pubDate>
		<dc:creator>catmacey</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[12f683]]></category>
		<category><![CDATA[eagle]]></category>
		<category><![CDATA[lights]]></category>
		<category><![CDATA[microchip]]></category>
		<category><![CDATA[PIC]]></category>

		<guid isPermaLink="false">http://catmacey.wordpress.com/?p=353</guid>
		<description><![CDATA[I have been playing around with building a lamp for my desk using a LED strip and constant current driver that I bought from Deal Extreme a while ago combined with a PIC12f683 to provide variable brightness via Pulse Width Modulation (PWM). [UPDATE OCT 20 2010] I&#8217;ve updated the firmware for this project to include [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=353&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been playing around with building a lamp for my desk using a LED strip and constant current driver that I bought from Deal Extreme a while ago combined with a PIC12f683 to provide variable brightness via Pulse Width Modulation (PWM).</p>
<div id="attachment_354" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-354" title="DSCF5126" src="http://catmacey.files.wordpress.com/2010/09/dscf5126.jpg?w=500" alt=""   /><p class="wp-caption-text">The demo using a plain old green LED as the output.</p></div>
<p>[UPDATE OCT 20 2010] I&#8217;ve updated the firmware for this project to include new features. <a title="Updated code for simple PWM LED controller" href="http://catmacey.wordpress.com/2010/10/20/updated-code-for-simple-pwm-led-controller/">More info and firmware download here</a>.</p>
<p><span id="more-353"></span></p>
<p>What I need is a desk lamp that can work in various different situations.</p>
<ol>
<li>As a normal desk lamp during the evenings for reading etc.</li>
<li>As a late night gaming light providing the most minimal illumination necessary to be able to see the keyboard whilst playing games late into the early hours of the morning.</li>
<li>As an inspection lamp giving strong and diffuse illumination when fiddling with tiny electronics stuff.</li>
</ol>
<p>So I decided to create a simple circuit using the PWM output from a PIC12f683 as a dimmer sitting between the constant current driver and the LED strip to allow me to choose the amount of light I need.  <a href="http://en.wikipedia.org/wiki/Pulse-width_modulation" target="_blank">For more information about PWM go here</a>.</p>
<p>The constant current driver is actually designed for driving three 1W LEDs at 320mA without current limiting resistors.  The led strip is 3W and built to run off 12v so already contains current limiting resistors which gives a current rating 250mA (3W/12v).  It&#8217;s not an ideal situation.  The  LED strip is very bright and gets a quite hot after running for just ten minutes.  So by using PWM not only can vary the light intensity but I can also limit the average current to the strip to the quarter Amp that it is designed for by putting a ceiling on the maximum duty cycle.  That&#8217;s the idea anyway.</p>
<p>I&#8217;m not sure if the driver will like being used like this and I&#8217;m not certain that the LED will survive being pulsed at 320mA.  But both the driver and the LED strip are fairly inexpensive so if all goes wrong I&#8217;ll not be heart broken.</p>
<div id="attachment_358" class="wp-caption aligncenter" style="width: 500px"><a href="http://www.dealextreme.com/details.dx/sku.13190" target="_blank"><img class="size-full wp-image-358   " title="DSCF5248" src="http://catmacey.files.wordpress.com/2010/09/dscf5248.jpg?w=500" alt=""   /></a><p class="wp-caption-text">3W 48-LED 15ni 180-Lumen Aluminium Alloy Light Strip (Click for DX link)</p></div>
<div id="attachment_357" class="wp-caption aligncenter" style="width: 500px"><a rel="attachment wp-att-357" href="http://catmacey.wordpress.com/2010/09/13/simple-pwm-control-for-led-strip/dscf5224/" target="_blank"><img class="size-full wp-image-357     " title="DSCF5224" src="http://catmacey.files.wordpress.com/2010/09/dscf5224.jpg?w=500" alt=""   /></a><p class="wp-caption-text">3*1W 320mA Constant Current LED Driver. (Click for DX link)</p></div>
<p><strong>Overview</strong></p>
<p style="text-align:center;">&nbsp;</p>
<div id="attachment_370" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-370" title="Circuit version 1" src="http://catmacey.files.wordpress.com/2010/09/circuit-1.jpg?w=500" alt=""   /><p class="wp-caption-text">Circuit version 1</p></div>
<p>The circuit is really simple consisting of the PIC12f683 to generate the PWM, a rotary encoder interfaced to the PIC to set the duty/brightness and a MOSFET to act as the switch.  A constant current supply doesn&#8217;t regulate the voltage of it&#8217;s output &#8211; that&#8217;s kind of the whole point of it &#8211; so a voltage regulator is needed to provide the PIC with stable supply.  I chose an L78L05 as I happened to have a bunch of them in my parts box and I wanted to run the PIC at 5v to ensure I can switch the FET properly.  An LM317 or similar would do just as well I&#8217;m sure.  The current draw of the PIC is so tiny that I could probably get away with using a Zener diode as a regulator (<a href="http://www.reuk.co.uk/Zener-Diode-Voltage-Regulator.htm" target="_blank">more info about that here</a>) but I don&#8217;t have any of them hanging around&#8230;</p>
<p>The MOSFET is an N-Channel 2N7000 that again I have in my parts box.  It&#8217;s capable of switching a continuous load of 350mA and is a &#8220;logic level&#8221; FET which means the Gate threshold voltage is fairly low at around 3v which means it can be driven directly by a microprocessor.  The PIC is running at VDD = 5V, a high output is VDD &#8211; 0.7V so that gives a Gate voltage (VGS) of 4.3V which should be more than enough to switch the FET fully on.  At least I think so&#8230;</p>
<p>One thing to note that caused me lots of confusion is that to easily drive the FET directly from a microprocessor the FET must be used as a sink &#8211; ie. below the load &#8211; rather than as a source above the load.</p>
<p>The reason is actually fairly simple but it got my head all messed up for a while so I&#8217;ll explain below just in case like me you&#8217;re more familiar with transistors rather than FETs.</p>
<p>FETs in a lot of ways are pretty similar to transistors and in a lot of situations can be used to do the same thing.  However there&#8217;s one fundamental and really important difference! A FET is a voltage operated device whereas a transistor is current operated.  So where with a transistor you turn it on by poking some current into it&#8217;s Base pin, with a FET you turn it on by poking a voltage into it&#8217;s Gate pin and that voltage is relative to the voltage at it&#8217;s Source pin &#8211; (kind of the same as an NPN transistor&#8217;s Emitter).  So if like in my case you are using the FET to switch 12V and  your microprocessor output is 4.3V then you need to put the FET after the Load in the circuit so that the FET Source pin is at GND which means that your VGS will be relative to GND too and therefore the FET will switch.<br />
If you put the FET before the Load then the voltage at the FET Source pin will be dependant on the resistance of your Load. If your FET drain is at 12V then most likely the voltage at the Source pin will be higher than the 4.3V you are providing at the Gate and so the FET will not switch.</p>
<p>I&#8217;ve not explained that very well. <strong>If I&#8217;ve got this all wrong please tell me I don&#8217;t want to pass on my idiocy!</strong><br />
There&#8217;s much more useful information here; <a href="http://www.electronics-tutorials.ws/transistor/tran_8.html" target="_blank">Electronics Tutorial about Transistors and FET&#8217;s</a> and here; <a href="http://brunningsoftware.co.uk/FET.htm" target="_blank">Using a MOSFET as a Switch</a></p>
<p>Anyway I didn&#8217;t really think about that and had the FET as a source for while and was really confused as to why it wasn&#8217;t working.</p>
<p><strong>Input</strong></p>
<p>I chose to use a Rotary Encoder as input the the PIC as I&#8217;ve not used them before.  I built a quick version using a potentiometer connected to the PIC ADC but I really wanted to try using the encoder.  I got the encoder from <a href="http://www.sureelectronics.net/goods.php?id=221" target="_blank">Sure Electronics</a>. It&#8217;s outputs a 2 bit grey code with 20 cycles per rotation and one detent (bump) per cycle.  Rotary encoders are actually really easy to use with the PIC you can either sample the input on a frequent basis or as I did connect the inputs to pins that can use the PIC&#8217;s interrupt on change feature (IOC) and handle the processing in an interrupt routine.  There&#8217;s a good PDF <a href="http://www.tufts.edu/programs/mma/emid/RotaryEncoder.pdf" target="_blank">here</a> with more info on using rotary encoders. The detents mean that the encoder has a sort of bumpiness to it as you turn it and in my case they are aligned with the start/end of each cycle so the output always reads 00 at a detent. Different encoders have different mechanical configurations though so yours might be different.</p>
<p><strong>Output</strong><a rel="attachment wp-att-365" href="http://catmacey.wordpress.com/2010/09/13/simple-pwm-control-for-led-strip/circuit/"><br />
</a></p>
<p>The pic 12f683 has a single Capture and Compare peripheral that can be used as a very flexible hardware PWM output at up to 10bits of resolution. It&#8217;s completely handled in hardware so needs no servicing to keep it running and has a double buffered duty cycle to avoid glitchy changes in duty.  It&#8217;s really easy once you have it up and running, the most complex thing is that the duty register is 10bit and split over two 8bit registers so you need write to two places and to do a bit of rotating and masking to get your bits in the right positions.</p>
<p>The update frequency (period) depends on the main PIC oscillator (TOSC) and the chosen PWM output resolution.  It&#8217;s explained pretty clearly in the <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/41211D_.pdf" target="_blank">PIC12f683 datasheet</a> but it generally speaking a toss up between two things, resolution and refresh rate. The higher your resolution the more ticks it will take to complete a cycle and so the lower the refresh rate (period) will be for any given oscillator frequency.  I&#8217;m using the PIC&#8217;s internal oscillator at 8Mhz (osccon = 0b01110001;) to give me the highest TOSC speed the PIC can generate without using an external oscillator.  I&#8217;m using 8bits of resolution for my PWM output giving a PWM frequency of 31KHz (8,000,000 / 256).  I not sure I really need that much resolution but for now it&#8217;s fine and 31KHz is so far above what the eye can register as to be irrelevant.</p>
<p>One thing that is important &#8211; and my reasoning for using the highest TOSC &#8211; is to have the shortest duration possible for a single step, or tick of the PWM cycle.  This is important to give you good control at the lower end of the brightness scale. eg. when going from fully off PWM=0 to the very first step where PWM=1.  LEDs can be switched on and off extremely fast and the human eye is very sensitive to even very short bursts of  light (strobe lights for example).  This means that the eye is very sensitive to very small difference in brightness at the low end whereas once the brightness increases it is harder to spot the difference.  The shorter a single PWM pulse is the better.  With an 8Mhz base clock the duration of a single PWM step is 125nS long.  That&#8217;s pretty damn short but still very easy to spot when you increase the PWM from off to tick 1.</p>
<p>I feel that I don&#8217;t fully understanding the issues at play here with regards to PWM frequency and resolution. I&#8217;m not sure if it is better to have a lower frequency PWM and have more resolution to play with or have less resolution with a higher frequency.  Either way the 8Mhz TOSC acts as the limit on the step size so it ultimately doesn&#8217;t make much difference.  An advantage of a higher resolution PWM cycle would be that I could use the extra resolution to map an exponential increase in PWM duty in response to the linear input from the encoder.  At the moment without any mapping function the first 40% of the PWM duty cycle appears to contain all the change; it&#8217;s during this region that the LED goes from off, though a gradual increase in brightness until at about 40%  the LED is just &#8220;bloody bright&#8221; and you don&#8217;t really notice that it is any getting brighter.  Adding a mapping function to this interface would allow me to have finer control over the lower end of the  brightness scale and  would give a more linear feel to the interface. It would also mean I could condense the &#8220;action&#8221; into 3 or 4 complete turns from full off to fully on rather than the almost 13 turns that it takes now.</p>
<p>Another option is to add some acceleration into the interface and a bit of inertia to the current brightness.  The idea being that turning the dial rapidly would accelerate the rate of increase in brightness whereas turning the dial slowly would allow for a small and constant increase. Similar to how you can set your mouse up on Windows move it slowly and it stays slow and accurate, give it a quick flick and it flies across the screen. Mind you I hate that feature in mice&#8230;</p>
<p>But that&#8217;s something for a later date.</p>
<p><strong>Prototype</strong></p>
<p>I used Eagle CAD to draw the circuit schematic and also to layout a prototype sized to fit a scrap bit perf-board that I had lying around (18 by 14 holes).</p>
<div id="attachment_356" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-356" title="Perfboard Prototype" src="http://catmacey.files.wordpress.com/2010/09/dscf5218.jpg?w=500" alt=""   /><p class="wp-caption-text">Perf-board prototype with some extra wires to sort out my FET problems. </p></div>
<div id="attachment_355" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-355" title="DSCF5207" src="http://catmacey.files.wordpress.com/2010/09/dscf5207.jpg?w=500" alt=""   /><p class="wp-caption-text">Underneath isn&#039;t pretty... but it works!</p></div>
<p>The input from the constant current source is the black connector on the left,  the output to the LED strip is the green connector on the right.  The  red and green 5mm LEDs are used as indicators to show a pulse up or down and also to show when you hit the maximum. brightness limit.  The momentary  action switch (push the knob) is connected to MCLR so at the moment it resets the PIC when you push it, but I might set the PIC up to use MCLR as an input and do something useful with it. There&#8217;s a bit of space on the board to double up the FET to handle more load if necessary, but so far after a few continuous hours of use it hasn&#8217;t gotten warm.</p>
<p><a href="http://catmacey.com/electronics/led-pwm/led_pwm_version-1.zip">The code is here</a>.  It&#8217;s written in <a href="http://www.sourceboost.com/Products/BoostC/Overview.html" target="_blank">BoostC </a>, there is a free version if you don&#8217;t have it.</p>
<p>Currently it&#8217;s pretty basic.  I have only implemented a basic linear step, no fancy mapping function yet and I think I need to de-bounce the encoder inputs as I&#8217;m getting a bit of 2 steps forward, one step back when turning the dial. But other than that it does work ok so what more could I ask for at this stage.</p>
<p>Here&#8217;s a very poor quality video (my camera is a bit dated)<br />
<span style="text-align:center; display: block;"><a href="http://catmacey.wordpress.com/2010/09/13/simple-pwm-control-for-led-strip/"><img src="http://img.youtube.com/vi/-a9c7aDzjX8/2.jpg" alt="" /></a></span></p>
<br />Filed under: <a href='http://catmacey.wordpress.com/category/electronics/'>Electronics</a> Tagged: <a href='http://catmacey.wordpress.com/tag/12f683/'>12f683</a>, <a href='http://catmacey.wordpress.com/tag/eagle/'>eagle</a>, <a href='http://catmacey.wordpress.com/tag/electronics/'>Electronics</a>, <a href='http://catmacey.wordpress.com/tag/lights/'>lights</a>, <a href='http://catmacey.wordpress.com/tag/microchip/'>microchip</a>, <a href='http://catmacey.wordpress.com/tag/pic/'>PIC</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/catmacey.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/catmacey.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/catmacey.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/catmacey.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/catmacey.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/catmacey.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/catmacey.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/catmacey.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/catmacey.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/catmacey.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/catmacey.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/catmacey.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/catmacey.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/catmacey.wordpress.com/353/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=353&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://catmacey.wordpress.com/2010/09/13/simple-pwm-control-for-led-strip/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c43ab8b5c4b72304a1c452a0f04d23be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Catmacey</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/09/dscf5126.jpg" medium="image">
			<media:title type="html">DSCF5126</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/09/dscf5248.jpg" medium="image">
			<media:title type="html">DSCF5248</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/09/dscf5224.jpg" medium="image">
			<media:title type="html">DSCF5224</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/09/circuit-1.jpg" medium="image">
			<media:title type="html">Circuit version 1</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/09/dscf5218.jpg" medium="image">
			<media:title type="html">Perfboard Prototype</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2010/09/dscf5207.jpg" medium="image">
			<media:title type="html">DSCF5207</media:title>
		</media:content>
	</item>
		<item>
		<title>Eagle CAD files for lighthouse circuit</title>
		<link>http://catmacey.wordpress.com/2009/08/07/eagle-cad-files-for-lighthouse-circuit/</link>
		<comments>http://catmacey.wordpress.com/2009/08/07/eagle-cad-files-for-lighthouse-circuit/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 10:15:06 +0000</pubDate>
		<dc:creator>catmacey</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[eagle cad]]></category>
		<category><![CDATA[lighthouse]]></category>
		<category><![CDATA[pic12f683]]></category>

		<guid isPermaLink="false">http://catmacey.wordpress.com/?p=344</guid>
		<description><![CDATA[For any one that is interested I have tidied up the Eagle CAD files for my lighthouse circuit.  You can grab them here. They&#8217;re not perfect and are probably not suitable for sending to a PCB production company but they might give you a head start of making your own version. They&#8217;re saved from Eagle [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=344&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><img class="aligncenter" title="DSCF1336-1" src="../files/2009/08/dscf1336-1.jpg" alt="DSCF1336-1" width="490" height="362" /></p>
<p>For any one that is interested I have tidied up the Eagle CAD files for my <a href="http://catmacey.wordpress.com/2008/06/09/mini-lighthouse-led-circuit/">lighthouse circuit</a>.  You can <a href="http://catmacey.com/electronics/lighthouse/lighthouse.zip">grab them here.</a> They&#8217;re not perfect and are probably not suitable for sending to a PCB production company but they might give you a head start of making your own version.</p>
<p>They&#8217;re saved from <a href="http://www.cadsoft.de/freeware.htm" target="_blank">Eagle CAD version 5.6.0</a> so you&#8217;ll need to go to thier site to get that if you don&#8217;t have the latest version.</p>
<br />Posted in Electronics Tagged: eagle cad, Electronics, lighthouse, pic12f683 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/catmacey.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/catmacey.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/catmacey.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/catmacey.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/catmacey.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/catmacey.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/catmacey.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/catmacey.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/catmacey.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/catmacey.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/catmacey.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/catmacey.wordpress.com/344/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/catmacey.wordpress.com/344/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/catmacey.wordpress.com/344/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=344&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://catmacey.wordpress.com/2009/08/07/eagle-cad-files-for-lighthouse-circuit/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c43ab8b5c4b72304a1c452a0f04d23be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Catmacey</media:title>
		</media:content>
	</item>
		<item>
		<title>Reviving a dead NiCad battery</title>
		<link>http://catmacey.wordpress.com/2009/03/28/reviving-a-dead-nicad-battery/</link>
		<comments>http://catmacey.wordpress.com/2009/03/28/reviving-a-dead-nicad-battery/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 19:23:59 +0000</pubDate>
		<dc:creator>catmacey</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[black and decker]]></category>
		<category><![CDATA[charger]]></category>
		<category><![CDATA[disposable camera]]></category>
		<category><![CDATA[drill]]></category>
		<category><![CDATA[NiCad]]></category>

		<guid isPermaLink="false">http://catmacey.wordpress.com/?p=300</guid>
		<description><![CDATA[UPDATED! : I&#8217;ve added a photo to the battery terminals, see below. Recently my trusty Black &#38; Decker Quatro drill/driver/saw/sander started misbehaving.  It&#8217;s been great for years and gotten us through a lot of DIY and IKEA modification.  But now it could barely manage to cut a 15cm length of 1cm chipboard. Time for a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=300&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#ff0000;">UPDATED! : I&#8217;ve added a photo to the battery terminals, see below.</span></p>
<p style="text-align:center;">Recently my trusty Black &amp; Decker Quatro drill/driver/saw/sander started misbehaving.  It&#8217;s been great for years and gotten us through a lot of DIY and IKEA modification.  But now it could barely manage to cut a 15cm length of 1cm chipboard.<a href="http://catmacey.wordpress.com/2009/03/28/reviving-a-dead-nicad-battery/"><img class="aligncenter size-full wp-image-326" title="pict0027" src="http://catmacey.files.wordpress.com/2009/03/pict0027.jpg?w=500" alt="pict0027"   /></a></p>
<p>Time for a bit of investigation.</p>
<p><span id="more-300"></span></p>
<p>I wondered if this was due to the charger not actually charging, it seemed ok, the LEDs lit up but on closer inspection there was a suspiciously low voltage at the charging pins and a distinct smell of &#8220;<a title="Magic smoke, or Factor smoke" href="http://en.wikipedia.org/wiki/Magic_smoke" target="_blank">magic-smoke</a>&#8220;.  So after a quick trip to the Ferreteria to buy some star drivers (why do they use these annoying types of screws) I could see that there was a very hot and rather charred looking transistor.  Looks like the charger was dead.  I thought about replacing the transistor, but unfortunately the part wasn&#8217;t marked and after a lot of Googling I couldn&#8217;t find any schematics.  It&#8217;s quite an old model and not available any more and plus there&#8217;s no knowing what else might have died, so I bit the bullet and bought a new fast charger.</p>
<p>Turns out that the battery pack had died too, it probably died first and took the charger with it in some sort of suicide pact.  A quick search of some online DIY forums shows that this is a common &#8220;feature&#8221;&#8230;  The new charger has a diagnostic &#8220;blinky light&#8221; that alerts you to a dead pack.</p>
<div id="attachment_303" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-303" title="pict0019" src="http://catmacey.files.wordpress.com/2009/03/pict0019.jpg?w=500" alt="pict0019"   /><p class="wp-caption-text">14.4v Black &amp; Decker Firestorm NiCad pack.</p></div>
<p>The pack is a 14.4v NiCad (12 cells of 1.2v) which should have a terminal voltage of around 14.4v (not surprisingly).  Mine had dropped to just a little over 6v.  Bad. at nearly 60 Euros for a new pack&#8230; Very bad. Especially as I had just shelled out on a new charger.</p>
<p>I remembered from my childhood RC car days that NiCads have this problem called crystal dendrite growth.  What happens is that inside the battery crystals form, the crystal conduct electricity so when enough of them have formed they basically short out the battery.  What we used to do in those days was whack the battery across a car battery for a second or two and that&#8217;d sort it out.  It burns away the crystals and brings the battery back to life.  Also gets quite hot too! I remember that it works quite well,  not quite as good as a brand new battery but better than you might think.</p>
<p>That&#8217;s easy when the battery pack is 7.2 volts and you have a 12v car battery with effectively infinite current to zap with.  Not so easy when you&#8217;re living in an apartment with no car and the pack voltage is 14.4volts.</p>
<p>I tried with an 18v 2A spare laptop PSU but it made no difference so it was time for something a bit more adventurous.</p>
<p>Some people have had a lot of luck using disposable camera flash electronics to zap their NiCads.  <a href="http://www.instructables.com/id/Bring_Dead_Ni_Cad_Batteries_Back_To_Life">Here&#8217;s an instructable</a>. Others have used welders&#8230;</p>
<p>Just so happens I had a disposable camera that I had saved for a project just like this.  It&#8217;s a Kodak, not sure what model it is as they don&#8217;t print much on the outside. They&#8217;re easy to open, especially as I&#8217;m not bothered with re-using it, at least not as a camera.</p>
<div id="attachment_304" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-304" title="pict0022" src="http://catmacey.files.wordpress.com/2009/03/pict0022.jpg?w=500" alt="Kodak disposable camera."   /><p class="wp-caption-text">Kodak disposable camera.</p></div>
<p>After ripping it apart the I had the circuit out and made a note of the polarity of the AAA battery (positive end is the spring on the circuit board).  After a quick test to make sure it still worked, using a wooden chopstick to press the buttons, I de-soldered the flash bulb and soldered in a couple of extension wires across the main capacitor terminals.</p>
<p style="text-align:center;">
<div id="attachment_302" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-302" title="pict0030" src="http://catmacey.files.wordpress.com/2009/03/pict0030.jpg?w=500" alt="Flash circuit extracted from camera."   /><p class="wp-caption-text">Flash circuit extracted from camera. Flash bulb disconnected. Extension cables soldered across capacitor.</p></div>
<p>Now I was ready to go.</p>
<p><span style="color:#ff0000;"><strong>Note</strong>:  This could be quite dangerous.  The capacitor is charged up to around 300V (measured) and when triggered the circuit boosts the voltage again to around 1000V (not that I measured it).  So be careful if you intend to try this. Do not short this across your body, it will hurt and might be life threatening.</span></p>
<p>Charge up the circuit, listen for the whine, then when the light comes on I disconnect the battery and short the extension wires across the terminals of the B&amp;D NiCad pack, positive to positive, negative to negative.<br />
It makes a loud crack and a small spark!</p>
<div id="attachment_330" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-330" title="pict00191" src="http://catmacey.files.wordpress.com/2009/03/pict00191.jpg?w=500" alt="pict00191"   /><p class="wp-caption-text">Battery terminals.  Temp sensor connection is not used in my new charger.</p></div>
<p style="text-align:center;">
<p>The voltage at the main capacitor is around 300V.  There&#8217;s no need to actually trigger the flash as such, and I think that it&#8217;s probably best not to as that would mean the output voltage would be much higher as it dumps the capacitor voltage into a coil to raise the voltage to around 1000V.</p>
<p>After two tries my battery voltage had risen to nearly 7 volts. So I plonked the battery on the new charger for 10 minutes and the pack voltage had risen to 12 volts.</p>
<p>One more zap and another ten minutes on the charger and the pack voltage had risen to 15V  Hurray!  After an hour on the charger the pack was fully charged and back to normal.  The light even went green when the pack was fully charged!</p>
<p>I&#8217;ve been using the drill quite a bit since, putting up curtain rails, and have recharged that pack a couple of times. It definitely seems to be back to normal.  The capacity seems to be up to the same level as before the problem.</p>
<p>Not bad for free and certainly better than 60 Euros for a new pack!</p>
<p><strong>Additional photos</strong></p>
<div id="attachment_337" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-337" title="PICT0003" src="http://catmacey.files.wordpress.com/2009/03/pict0003.jpg?w=500" alt="Battery pack opened up."   /><p class="wp-caption-text">Battery pack opened up.</p></div>
<div id="attachment_341" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-341" title="PICT0030-1" src="http://catmacey.files.wordpress.com/2009/03/pict0030-1.jpg?w=500" alt="Old charger (Now dead) with temperature monitoring"   /><p class="wp-caption-text">Old charger (Now dead) with temperature monitoring</p></div>
<div id="attachment_340" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-340" title="PICT0018-2" src="http://catmacey.files.wordpress.com/2009/03/pict0018-2.jpg?w=500" alt="New charger."   /><p class="wp-caption-text">New charger.</p></div>
<div id="attachment_342" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-342" title="PICT0006-2" src="http://catmacey.files.wordpress.com/2009/03/pict0006-2.jpg?w=500" alt="Bottom of drill."   /><p class="wp-caption-text">Bottom of drill.</p></div>
<br />Posted in Electronics Tagged: black and decker, charger, disposable camera, drill, NiCad <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/catmacey.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/catmacey.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/catmacey.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/catmacey.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/catmacey.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/catmacey.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/catmacey.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/catmacey.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/catmacey.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/catmacey.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/catmacey.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/catmacey.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/catmacey.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/catmacey.wordpress.com/300/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=300&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://catmacey.wordpress.com/2009/03/28/reviving-a-dead-nicad-battery/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c43ab8b5c4b72304a1c452a0f04d23be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Catmacey</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0027.jpg" medium="image">
			<media:title type="html">pict0027</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0019.jpg" medium="image">
			<media:title type="html">pict0019</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0022.jpg" medium="image">
			<media:title type="html">pict0022</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0030.jpg" medium="image">
			<media:title type="html">pict0030</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict00191.jpg" medium="image">
			<media:title type="html">pict00191</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0003.jpg" medium="image">
			<media:title type="html">PICT0003</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0030-1.jpg" medium="image">
			<media:title type="html">PICT0030-1</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0018-2.jpg" medium="image">
			<media:title type="html">PICT0018-2</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0006-2.jpg" medium="image">
			<media:title type="html">PICT0006-2</media:title>
		</media:content>
	</item>
		<item>
		<title>It&#8217;s been a while. New bits and bobs.</title>
		<link>http://catmacey.wordpress.com/2009/03/22/its-been-a-while-new-bits-and-bobs/</link>
		<comments>http://catmacey.wordpress.com/2009/03/22/its-been-a-while-new-bits-and-bobs/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 16:37:10 +0000</pubDate>
		<dc:creator>catmacey</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[oscilloscope]]></category>
		<category><![CDATA[shopping]]></category>

		<guid isPermaLink="false">http://catmacey.wordpress.com/?p=310</guid>
		<description><![CDATA[Life does get rather busy sometimes.  For us it was having a baby and moving house in the same week.  Subsequently I&#8217;ve been rather preoccupied. But that was nearly 6 months ago and things are getting a little more sorted out now, plus it was my birthday recently so I thought it was about time [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=310&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_324" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-324" src="http://catmacey.files.wordpress.com/2009/03/gizmos.jpg?w=500" alt="Various gizmos"   /><p class="wp-caption-text">Various gizmos</p></div>
<p>Life does get rather busy sometimes.  For us it was having a baby and moving house in the same week.  Subsequently I&#8217;ve been rather preoccupied.</p>
<p>But that was nearly 6 months ago and things are getting a little more sorted out now, plus it was my birthday recently so I thought it was about time to get back in to electronics and also to add some new posts to this blog.</p>
<p><span id="more-310"></span>So to start with I ordered some gizmos from Deal Extreme, most notable was a bunch of tweazers to make working with SMD components easier.  There&#8217;s nothing like getting new shiny tools!  And for the price these are excellent value. The Bamboo ones are really nice.</p>
<div id="attachment_313" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-313" title="pict0039" src="http://catmacey.files.wordpress.com/2009/03/pict0039.jpg?w=500" alt="Assorted tweezers from Deal Extreme"   /><p class="wp-caption-text">Assorted tweezers from Deal Extreme</p></div>
<p>I also bought a bunch of stuff from a shop I&#8217;ve not used before called <a href="http://www.seeedstudio.com/depot/">Seeedstudio</a> they had some really nice SMD switches as well as lots of other nice things.  Their prices are great and the delivery cost was very reasonable.  Speedy too, I&#8217;ll definitely be using them again.</p>
<p>Here&#8217;s some of the things I bought.</p>
<div id="attachment_317" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-317" title="pict0005" src="http://catmacey.files.wordpress.com/2009/03/pict0005.jpg?w=500" alt="Tiny surface mount momentary action buttons."   /><p class="wp-caption-text">Tiny surface mount momentary action buttons.</p></div>
<p>These were just 15 US cents each. <a href="http://www.seeedstudio.com/depot/2-pin-mini-steel-shell-button-p-134.html" target="_blank">Product info here.</a></p>
<div id="attachment_314" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-314" title="pict0007" src="http://catmacey.files.wordpress.com/2009/03/pict0007.jpg?w=500" alt="Surface mount SPDT switch."   /><p class="wp-caption-text">Surface mount SPDT switch.</p></div>
<p>These were just 20 US cents a pop. <a href="http://www.seeedstudio.com/depot/spdt-switch-black-lite-p-133.html">More info here.</a></p>
<p>I&#8217;m a sucker for tiny switches, I seem to stockpile them.  I bought some lovely tiny smd momentary action switches with built in LED&#8217;s last year and I can&#8217;t actually bring myself to use them up as they&#8217;re so nice.  That&#8217;s sad right&#8230;</p>
<p>I also got these&#8230;</p>
<div id="attachment_316" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-316" title="pict0016" src="http://catmacey.files.wordpress.com/2009/03/pict0016.jpg?w=500" alt="6V 60 RPM geared motors for the Robot that will happen one day."   /><p class="wp-caption-text">6V 60 RPM geared motors for the Robot that will happen one day.</p></div>
<div id="attachment_315" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-315" title="pict0013" src="http://catmacey.files.wordpress.com/2009/03/pict0013.jpg?w=500" alt="PSP style variable resistor joystick with push switch."   /><p class="wp-caption-text">PSP style variable resistor joystick with push switch.</p></div>
<p>But best of all, to get myself back into electronics, but without having to break out all my kit which is still packed away in the spare room, I bought this great Oscilloscope kit.</p>
<div id="attachment_319" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-319" title="pict0052" src="http://catmacey.files.wordpress.com/2009/03/pict0052.jpg?w=500" alt="Digital Storage Oscilloscope Kit"   /><p class="wp-caption-text">Digital Storage Oscilloscope Kit</p></div>
<p>I&#8217;ve started on it already, but I&#8217;ll write up a full post later on when I&#8217;m done.</p>
<p>So, there you go.  After a long blog drought I&#8217;m back at it.  Hope you enjoyed reading.</p>
<br />Posted in Electronics Tagged: components, oscilloscope, shopping <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/catmacey.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/catmacey.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/catmacey.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/catmacey.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/catmacey.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/catmacey.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/catmacey.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/catmacey.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/catmacey.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/catmacey.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/catmacey.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/catmacey.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/catmacey.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/catmacey.wordpress.com/310/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=catmacey.wordpress.com&amp;blog=2795477&amp;post=310&amp;subd=catmacey&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://catmacey.wordpress.com/2009/03/22/its-been-a-while-new-bits-and-bobs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c43ab8b5c4b72304a1c452a0f04d23be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Catmacey</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/gizmos.jpg" medium="image">
			<media:title type="html">Various gizmos</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0039.jpg" medium="image">
			<media:title type="html">pict0039</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0005.jpg" medium="image">
			<media:title type="html">pict0005</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0007.jpg" medium="image">
			<media:title type="html">pict0007</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0016.jpg" medium="image">
			<media:title type="html">pict0016</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0013.jpg" medium="image">
			<media:title type="html">pict0013</media:title>
		</media:content>

		<media:content url="http://catmacey.files.wordpress.com/2009/03/pict0052.jpg" medium="image">
			<media:title type="html">pict0052</media:title>
		</media:content>
	</item>
	</channel>
</rss>
