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

<channel>
	<title>Rick&#039;s Awesome Blog</title>
	<atom:link href="http://www.richardosgood.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richardosgood.com</link>
	<description>(Not) Just another WordPress weblog</description>
	<lastBuildDate>Fri, 17 Feb 2012 00:51:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Raja&#8217;s Day Out</title>
		<link>http://www.richardosgood.com/2012/02/16/rajas-day-out/</link>
		<comments>http://www.richardosgood.com/2012/02/16/rajas-day-out/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 17:26:38 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Project]]></category>

		<guid isPermaLink="false">http://www.richardosgood.com/?p=709</guid>
		<description><![CDATA[We recently started letting our cat go outside and we started wondering what she actually does out there.  She tends to wander off for an hour or so and we have no idea where she goes or what she is &#8230; <a href="http://www.richardosgood.com/2012/02/16/rajas-day-out/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_416" class="wp-caption aligncenter" style="width: 510px"><a href="http://richardosgood.com/wp-content/uploads/2012/01/2012-01-30_17-39-55_270.jpg"><img class="size-large wp-image-416" title="Raja!" src="http://richardosgood.com/wp-content/uploads/2012/01/2012-01-30_17-39-55_270-1024x577.jpg" alt="Raja!" width="500" height="281" /></a><p class="wp-caption-text">Raja!</p></div>
<div id="attachment_414" class="wp-caption aligncenter" style="width: 510px"><a href="http://richardosgood.com/wp-content/uploads/2012/01/2012-01-30_17-38-35_383.jpg"><img class="size-large wp-image-414" title="Camera collar" src="http://richardosgood.com/wp-content/uploads/2012/01/2012-01-30_17-38-35_383-1024x577.jpg" alt="Camera collar" width="500" height="281" /></a><p class="wp-caption-text">Camera collar</p></div>
<p>We recently started letting our cat go outside and we started wondering what she actually does out there.  She tends to wander off for an hour or so and we have no idea where she goes or what she is doing.  I borrowed a mini color video camera from Eugene Maker Space and and attached it to my cat&#8217;s collar.  I <a title="put up a blog post" href="http://www.richardosgood.com/2012/02/01/productive-sunday/">put up a blog post</a> about that a couple weeks ago.  I finally got some longer video uploaded to share.</p>
<p>The aspect ratio is weird because the video camera had to be mounted sideways in order to be securely fastened.  I had to rotate the video after it was uploaded to YouTube.  Also, the date and time are completely wrong because I haven&#8217;t figured out how to set them yet.</p>
<p><object width="420" height="315" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/Rwh5U-IsbRs?version=3&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed width="420" height="315" type="application/x-shockwave-flash" src="http://www.youtube.com/v/Rwh5U-IsbRs?version=3&amp;hl=en_US" allowFullScreen="true" allowscriptaccess="always" allowfullscreen="true" /></object></p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=216748751752592&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.richardosgood.com/2012/02/16/rajas-day-out/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.richardosgood.com/2012/02/16/rajas-day-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bacon Roses</title>
		<link>http://www.richardosgood.com/2012/02/15/bacon-roses/</link>
		<comments>http://www.richardosgood.com/2012/02/15/bacon-roses/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 18:13:37 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Food]]></category>

		<guid isPermaLink="false">http://www.richardosgood.com/?p=669</guid>
		<description><![CDATA[I decided to make my girlfriend some bacon roses for Valentine&#8217;s day this year.  I wanted to do something different and something she wouldn&#8217;t expect.  I had seen this idea on Instructables a few months before and I knew I &#8230; <a href="http://www.richardosgood.com/2012/02/15/bacon-roses/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_698" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_17-19-16_359.jpg"><img class="size-large wp-image-698" title="Bacon roses" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_17-19-16_359-1024x577.jpg" alt="Bacon roses" width="500" height="281" /></a><p class="wp-caption-text">Bacon roses</p></div>
<p>I decided to make my girlfriend some bacon roses for Valentine&#8217;s day this year.  I wanted to do something different and something she wouldn&#8217;t expect.  I had seen this idea on <a title="Instructables" href="http://www.instructables.com/id/Bacon-Roses/">Instructables</a> a few months before and I knew I would have to try it some day.  I did some things a bit differently though and I figured I might as well detail the process I took here.  Most of these photos aren&#8217;t very good.  That&#8217;s a result of me rushing to get these bacon roses completed before my girlfriend got home from work combined with the fact that my house has terrible lighting for photos.</p>
<p>First off, I had to get a cupcake pan and poke a hole in each spot.  The Instructable recommended using a mini muffin pan but I forgot that when I was at Walmart and I purchased a regular sized cupcake pan instead.</p>
<div id="attachment_673" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-13_17-29-04_863.jpg"><img class="size-large wp-image-673" title="Cupcake tin with holes" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-13_17-29-04_863-1024x577.jpg" alt="Cupcake tin with holes" width="500" height="281" /></a><p class="wp-caption-text">Cupcake tin with holes</p></div>
<p>The dots in the center of each spot are holes that I poked using a hammer and a large nail. The hole is supposed to allow the bacon grease to drain out of the pan while the bacon is baking.  The Instructable suggesting drilling out the holes, but a commenter suggested using a nail to avoid creating metal shavings that may get into the food.  I liked that idea better and thought it would be easier to pound a few holes in the metal rather than try to drill them out.</p>
<div id="attachment_676" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-13_17-29-37_940.jpg"><img class="size-large wp-image-676" title="Tools" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-13_17-29-37_940-1024x577.jpg" alt="Tools" width="500" height="281" /></a><p class="wp-caption-text">Tools</p></div>
<p>After washing out the pan, I had to prepare the bacon.  I followed the Instructable exactly for this part.  I just rolled up each strip of bacon individually starting at the wider end.  Once I rolled a strip of bacon, I pressed it into one of the muffin spots with the fat side down.  When you press them in the bottom flares out a bit and helps create the rosebud look as well as helps the bacon stand up.</p>
<div id="attachment_678" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-20-25_926.jpg"><img class="size-large wp-image-678" title="Raw bacon" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-20-25_926-1024x577.jpg" alt="Raw bacon" width="500" height="281" /></a><p class="wp-caption-text">Raw bacon</p></div>
<p>The Instructable recommended placing a broiling pan underneath the cupcake pan to both allow the grease to drain out and to also catch the grease from falling into the oven.  I don&#8217;t have a boiling pan so I used a cookie sheet covered in foil instead.  I then created two large rolls of foil to use as stands to hold the cupcake pan up above the cookie sheet.  Without those, there would be less room underneath the cupcake pan and the grease would have a harder time draining.</p>
<div id="attachment_679" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-20-38_602.jpg"><img class="size-large wp-image-679" title="Foil sheet with risers" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-20-38_602-1024x577.jpg" alt="Foil sheet with risers" width="500" height="281" /></a><p class="wp-caption-text">Foil sheet with risers</p></div>
<p>Once the bacon was prepared I stuck them in the oven for 40 minutes at 350 degrees.  While that was cooking, I prepared the rose stems.</p>
<p>I bought the same roses listed in the Instructable.  They cost me $0.97 at Walmart for one &#8220;bouquet&#8221; of seven roses.  I found them over near the crafts section where they had a selection of fake floral arrangements.  I bought two and ended up cutting off one rose from each bouquet because I only had 12 strips of bacon.</p>
<div id="attachment_682" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-22-25_665.jpg"><img class="size-large wp-image-682" title="Fake roses" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-22-25_665-1024x577.jpg" alt="Fake roses" width="500" height="281" /></a><p class="wp-caption-text">Fake roses</p></div>
<div id="attachment_684" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-22-42_361.jpg"><img class="size-large wp-image-684" title="Close up" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-22-42_361-1024x577.jpg" alt="Close up" width="500" height="281" /></a><p class="wp-caption-text">Close up</p></div>
<p>The first step was to remove all of the rosebuds from the stems.  They slide off pretty easily.</p>
<div id="attachment_685" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-23-42_902.jpg"><img class="size-large wp-image-685" title="Rosebuds removed" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-23-42_902-1024x577.jpg" alt="Rosebuds removed" width="500" height="281" /></a><p class="wp-caption-text">Rosebuds removed</p></div>
<p>Next I had to take apart each rosebud.  This part was pretty easy to figure out.  It was tougher to take apart but these plastic pieces are pretty strong so I really didn&#8217;t have to worry about breaking anything.</p>
<div id="attachment_687" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-25-43_497.jpg"><img class="size-large wp-image-687" title="Flower pieces separated" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-25-43_497-1024x577.jpg" alt="Flower pieces separated" width="500" height="281" /></a><p class="wp-caption-text">Flower pieces separated</p></div>
<p>Once all of the pieces were separated, I put all of the green pieces back together and stuck the empty rose leaves back onto the stems.</p>
<div id="attachment_688" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-31-07_648.jpg"><img class="size-large wp-image-688" title="Green pieces reassembled" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-31-07_648-1024x577.jpg" alt="Green pieces reassembled" width="500" height="281" /></a><p class="wp-caption-text">Green pieces reassembled</p></div>
<p>Here is a shot of all 14 rose stems waiting for the bacon to finish cooking.</p>
<div id="attachment_689" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-48-08_747.jpg"><img class="size-large wp-image-689" title="Ready for the bacon" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_16-48-08_747-1024x577.jpg" alt="Ready for the bacon" width="500" height="281" /></a><p class="wp-caption-text">Ready for the bacon</p></div>
<p>After 40 minutes I was worried that the bacon hadn&#8217;t cooked enough.  I had a problem where my holes weren&#8217;t big enough and the bacon grease didn&#8217;t drain.  This seemed to result in the fatty part of the bacon at the bottom of the pan not cooking as much as the top.  Unfortunately Shannon was going to be home in about 10 minutes so I really didn&#8217;t have time to cook these any longer.  Also, the tops of the rosebuds were already crispy so I was afraid I would burn them.  Also, about half of the buds fell over while cooking.  I was able to stand most of them back up halfway through but it became clear why a mini cupcake pan would have been a better choice.</p>
<div id="attachment_692" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_17-05-35_175.jpg"><img class="size-large wp-image-692" title="Bacon all cooked" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_17-05-35_175-1024x577.jpg" alt="Bacon all cooked" width="500" height="281" /></a><p class="wp-caption-text">Bacon all cooked</p></div>
<div id="attachment_693" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_17-06-47_755.jpg"><img class="size-large wp-image-693" title="Soaking up the grease" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_17-06-47_755-1024x577.jpg" alt="Soaking up the grease" width="500" height="281" /></a><p class="wp-caption-text">Soaking up the grease</p></div>
<p>Once the bacon rosebuds were dried off and cool enough to hold I just slid them onto the rose stems.  I underestimated how heavy these bacon flowers would be and I really needed some kind of gravel or sand or something in the vase to hold them in place.  I managed without it but it was tricky to move the arrangement around without the stems falling over and the bacon falling off.</p>
<div id="attachment_696" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_17-12-55_591.jpg"><img class="size-large wp-image-696" title="Fully assembled" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_17-12-55_591-1024x577.jpg" alt="Fully assembled" width="500" height="281" /></a><p class="wp-caption-text">Fully assembled</p></div>
<p>I had a few minutes to spare before Shannon got home so I decided to do a bit extra for the presentation.  I took those otherwise wasted fake roses and chopped all of the petals off into individual petals.  I then scattered a bunch of them around the arrangement so she wouldn&#8217;t be able to miss it when she got home from work.</p>
<div id="attachment_703" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_17-20-05_465.jpg"><img class="size-large wp-image-703" title="The presentation" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-14_17-20-05_465-1024x577.jpg" alt="The presentation" width="500" height="281" /></a><p class="wp-caption-text">The presentation</p></div>
<p>She seemed to really like the bacon roses and definitely didn&#8217;t expect them.  The bacon ended up being a bit under cooked, especially at the center of the rosebud.  Also, the fat was extra chewy since it wasn&#8217;t cooked enough and I tend to like my bacon a bit crispier.  Next time I might try cooking the bacon longer or perhaps on a higher temperature setting.  I&#8217;ll also have to make the holes bigger so the grease can drain out more easily.</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=216748751752592&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.richardosgood.com/2012/02/15/bacon-roses/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.richardosgood.com/2012/02/15/bacon-roses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Worst. Soldering iron holder. Ever.</title>
		<link>http://www.richardosgood.com/2012/02/13/worst-soldering-iron-holder-ever/</link>
		<comments>http://www.richardosgood.com/2012/02/13/worst-soldering-iron-holder-ever/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 17:39:15 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Failures]]></category>
		<category><![CDATA[Wood Working]]></category>

		<guid isPermaLink="false">http://www.richardosgood.com/?p=656</guid>
		<description><![CDATA[For the Eugene Maker Space grand opening, we purchased a few electronics kits so people can learn to solder.  Three of the kits came with soldering irons for a fantastic deal.  Unfortunately, I thought the soldering iron holders looked a &#8230; <a href="http://www.richardosgood.com/2012/02/13/worst-soldering-iron-holder-ever/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For the Eugene Maker Space grand opening, we purchased a few electronics kits so people can learn to solder.  Three of the kits came with soldering irons for a fantastic deal.  Unfortunately, I thought the soldering iron holders looked a bit flimsy for people just learning how to solder.  I didn&#8217;t want anyone to knock their iron over and burn themselves easily.  Because of this, I decided to try and make a simple soldering iron holder out of materials we had laying around at the shop.  I only made one attempt&#8230; and it didn&#8217;t turn out that great.  I decided to blog about it anyway because why not?</p>
<p>The soldering iron that came with the kit is a very basic &#8220;disposable&#8221; type.  I figured it would be a great tool to have at the shop though for whenever we do events like this.  I&#8217;d rather have people learn to solder on a junker iron than on a nice expensive one.</p>
<div id="attachment_658" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-12-59_998.jpg"><img class="size-large wp-image-658" title="Soldering Iron" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-12-59_998-1024x577.jpg" alt="Soldering Iron" width="500" height="281" /></a><p class="wp-caption-text">Soldering Iron</p></div>
<p>For the design, my original thought was to just use a block of wood and stick a piece of strong wire into it and bend the wire into a curly shape to hold the iron.  We didn&#8217;t have strong enough wire at the shop so I decided to try and make something completely out of wood.  Therefore, my materials consisted of one chunk of 2&#8243;x4&#8243; board and some screws.</p>
<div id="attachment_659" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-13-07_657.jpg"><img class="size-large wp-image-659" title="Materials" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-13-07_657-1024x577.jpg" alt="Materials" width="500" height="281" /></a><p class="wp-caption-text">Materials</p></div>
<p>I first cut a piece of wood about the length of the iron.  I think cut a second piece of wood that was about 1/2 of the length of the first.  I cut a 45 degree angle into the second piece of wood with the miter saw.</p>
<div id="attachment_660" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-32-00_352.jpg"><img class="size-large wp-image-660" title="Wood chunks" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-32-00_352-1024x577.jpg" alt="Wood chunks" width="500" height="281" /></a><p class="wp-caption-text">Wood pieces</p></div>
<p>Then I used the drill press to drill a 5/16&#8243; hole in the shorter piece of wood.  This hole was just big enough for the soldering iron to slide through it and stop where the handle of the iron starts.</p>
<div id="attachment_662" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-35-03_595.jpg"><img class="size-large wp-image-662" title="Drilling a hole" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-35-03_595-1024x577.jpg" alt="Drilling a hole" width="500" height="281" /></a><p class="wp-caption-text">Drilling a hole</p></div>
<div id="attachment_663" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-38-01_251.jpg"><img class="size-large wp-image-663" title="Hole drilled out" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-38-01_251-1024x577.jpg" alt="Hole drilled out" width="500" height="281" /></a><p class="wp-caption-text">Hole drilled out</p></div>
<p>The final step was to attach the two pieces together.  This part was a pain because of the angles.  I didn&#8217;t want to use glue because I hate waiting for glue to dry.  I opted to try screwing them together.  There was really no good way for me to clamp the work down to the bench with the tools I had on hand.  Also, I was feeling lazy so I did not pre-drill the holes which made the whole thing more difficult.</p>
<div id="attachment_664" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-42-50_564.jpg"><img class="size-large wp-image-664" title="Attaching the pieces" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-42-50_564-1024x577.jpg" alt="Attaching the pieces" width="500" height="281" /></a><p class="wp-caption-text">Attaching the pieces</p></div>
<p>The final piece works but since the screws are not countersunk, it is wobbly on the table.  Also, since I didn&#8217;t have a good way to hold the pieces together while I was attaching them, there is a small gap between the pieces of wood that looks horrible.  The smaller piece also ended up rotating a bit and is obviously crooked when looking at it in person.</p>
<div id="attachment_665" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-49-43_312.jpg"><img class="size-large wp-image-665" title="Final piece" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-49-43_312-1024x577.jpg" alt="Final piece" width="500" height="281" /></a><p class="wp-caption-text">Final piece</p></div>
<p>The end result was something that works, but not well enough that I am actually going to use it.  In fact, I already threw this thing away.  I wasn&#8217;t even going to document this but I figured that 1) it is funny and 2) it&#8217;s important to keep track of our failures because we learn more from our failures than we do from our successes.  I learned that I need more practice working with wood and that I need to be less lazy when building things.</p>
<div id="attachment_666" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-50-13_10.jpg"><img class="size-large wp-image-666" title="Tada!" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-50-13_10-1024x577.jpg" alt="Tada!" width="500" height="281" /></a><p class="wp-caption-text">Tada!</p></div>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=216748751752592&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.richardosgood.com/2012/02/13/worst-soldering-iron-holder-ever/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.richardosgood.com/2012/02/13/worst-soldering-iron-holder-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Makerbot at Eugene Maker Space</title>
		<link>http://www.richardosgood.com/2012/02/12/makerbot-at-eugene-maker-space/</link>
		<comments>http://www.richardosgood.com/2012/02/12/makerbot-at-eugene-maker-space/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 00:41:22 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[3D Printer]]></category>
		<category><![CDATA[Hackerspaces]]></category>

		<guid isPermaLink="false">http://www.richardosgood.com/?p=651</guid>
		<description><![CDATA[I spent some time at Eugene Maker Space&#8217;s open house last Friday getting my Makerbot Thing-o-matic up and running.  I had it wokring at home for about a year but I really wanted to get ReplicatorG up and running on &#8230; <a href="http://www.richardosgood.com/2012/02/12/makerbot-at-eugene-maker-space/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_652" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-09-31_212.jpg"><img class="size-large wp-image-652" title="Makerbot" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-10_19-09-31_212-1024x577.jpg" alt="Makerbot!" width="500" height="281" /></a><p class="wp-caption-text">Makerbot!</p></div>
<p>I spent some time at Eugene Maker Space&#8217;s open house last Friday getting my Makerbot Thing-o-matic up and running.  I had it wokring at home for about a year but I really wanted to get ReplicatorG up and running on one of the shop&#8217;s computers so I could leave the bot there for others to use.  Bob spent some time last week getting the latest version of Ubuntu installed on our PC at the shop along with the same version of ReplicatorG that I had been using at home.</p>
<p>I was able to copy my ~/.replicatorg directory off of my home system and onto the EMS system with no problems.  I also copied my thingomatic.xml file from my old system to the new one as well because I had tweaked some settings in there in order to make my prints come out closer to the proper sizes.  With these in place, the Makerbot prints just as well as it did at home.</p>
<p>It definitely needs more fine tuning.  I&#8217;m hoping I will find some time next week to spend a few hours at the shop just tuning the Makerbot to get the best prints possible.  Up to this point it has only been me using the thing, so I didn&#8217;t mind if things were a bit finicky.  But now that others will be learning to use the bot, I want it to run as smoothly as possible with minimal operator knowledge.  If anyone wants to use the Makerbot at the shop, just shoot me an email and I will find a time to meet with you and teach you how to use it.</p>
<p>&nbsp;</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=216748751752592&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.richardosgood.com/2012/02/12/makerbot-at-eugene-maker-space/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.richardosgood.com/2012/02/12/makerbot-at-eugene-maker-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NW Tech Show Interview</title>
		<link>http://www.richardosgood.com/2012/02/09/nw-tech-show-interview/</link>
		<comments>http://www.richardosgood.com/2012/02/09/nw-tech-show-interview/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 22:49:23 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Hackerspaces]]></category>

		<guid isPermaLink="false">http://www.richardosgood.com/?p=646</guid>
		<description><![CDATA[David of the NW Tech Show radio show contacted the Eugene Maker Space board last week to see if anyone would be available for an interview to talk about hackerspaces.  On Wednesday afternoon I got to speak with David and &#8230; <a href="http://www.richardosgood.com/2012/02/09/nw-tech-show-interview/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>David of the <a title="NW Tech Show" href="http://nwtechshow.com/">NW Tech Show</a> radio show contacted the <a title="Eugene Maker Space" href="http://eugenemakerspace.com">Eugene Maker Space</a> board last week to see if anyone would be available for an interview to talk about hackerspaces.  On Wednesday afternoon I got to speak with David and his co-host Jim about several things including how I became interested in hackerspaces, how <a title="HeatSync Labs" href="http://heatsynclabs.org">HeatSync Labs</a> got started, and how Eugene Maker Space got started.  We also got to talk a bit about our <a title="grand opening" href="http://eugenemakerspace.com/grandopening">grand opening</a> and how we run things at EMS.  It was a lot of fun and hopefully I will get to meet those guys some day.  I also found out that Jim graduated from the same university as me which was pretty awesome.  He&#8217;s the first person I&#8217;ve ever met in the wild that went to the same school as me.  It sounds like Dave and Jim want to start a hackerspace up in Salem so I look forward to seeing their progress.</p>
<p>For anyone interested, the episode of the show is available on <a title="their website" href="http://nwtechshow.com/media/NWTechShow-054-20120208-Makerspace.mp3">their website</a> as a free MP3 download.</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=216748751752592&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.richardosgood.com/2012/02/09/nw-tech-show-interview/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.richardosgood.com/2012/02/09/nw-tech-show-interview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://nwtechshow.com/media/NWTechShow-054-20120208-Makerspace.mp3" length="26580476" type="audio/mpeg" />
		</item>
		<item>
		<title>Color Sensor Improvements</title>
		<link>http://www.richardosgood.com/2012/02/08/color-sensor-improvements/</link>
		<comments>http://www.richardosgood.com/2012/02/08/color-sensor-improvements/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 17:38:41 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[DIY Color Sensor]]></category>

		<guid isPermaLink="false">http://www.richardosgood.com/?p=636</guid>
		<description><![CDATA[I decided to make a simple change to my code based on a suggestion left in this comment by Kristof.  His suggestion was to stop manually doing all the math for the RGB value conversion and just use two simple &#8230; <a href="http://www.richardosgood.com/2012/02/08/color-sensor-improvements/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I decided to make a simple change to my code based on a suggestion left in <a title="this comment" href="http://www.richardosgood.com/2012/02/06/home-built-color-sensor/comment-page-1/#comment-16755">this comment</a> by Kristof.  His suggestion was to stop manually doing all the math for the RGB value conversion and just use two simple Arduino functions to do it instead.  Here is the altered function:</p>
<pre>int getRGBValue(int blackColor, int whiteColor, int readColor) {
 //scale the perceived color so it is somewhere between 0 and 255
 int x = map(readColor, blackColor, whiteColor, 0, 255);
 //make sure that X can't ever go above 255 or below 0
 x = constrain(x, 0, 255);

 return x;
}</pre>
<p>This is so much simpler.  I had actually used the map function a couple years back but completely forgot about it, and I had never even seen the constrain function before.  This makes the code much more readable and removes some complexity that would be more difficult to debug.  Thank you, Kristof, for the suggestions.</p>
<p>Also, cinezaster left <a title="this comment" href="http://hackaday.com/2012/02/07/color-sensor-gives-the-rgb-values-of-anything/comment-page-1/#comment-577692">this comment</a> on the Hackaday forums suggesting that I take a general brightness reading of the color I am sensing with white light and use that to further calibrate my sensor.  I didn&#8217;t have a white LED but I figured if I just turned on the red, green, and blue leds at the same time it should be close enough.  I took his idea and ran with it.  Here is the latest code.</p>
<pre>/*
 ColorSensorWithBrightnessCheck

 This sketch determines the color of an object by flashing a red, green, and blue LED.

 This version "white balances" each color individually like version 2, but this version
 will also check each color with "white" light to see how bright in general the color is.
 That way if it is really bright we can scale things down to see if it will reach bright
 colors better.

 This sketch uses the Adafruit TSL2561 digital luminosity sensor as the light sensor

 By Rick Osgood

 : connect TSL2561 SCL to analog 5
 : connect TSL2561 SDA to analog 4
 : connect VCC to 3.3V DC (MUST NOT BE GREATER HTAN 3.3V!!!)
 : connect GROUND to common ground
 */

#include &lt;Wire.h&gt;
#include "TSL2561.h"
#include "LPD8806.h"
#include "SPI.h"

#define redLed 10
#define greenLed 11
#define blueLed 12
TSL2561 tsl(TSL2561_ADDR_FLOAT);
//for balancing colors to themselves
int redRed = 0;
int greenGreen = 0;
int blueBlue = 0;
//for white balancing
int whiteRed = 0;
int whiteGreen = 0;
int whiteBlue = 0;
int whiteBrightness = 0; // How much light reflected with all leds lit at once
//for black balancing
int blackRed = 0;
int blackGreen = 0;
int blackBlue = 0;
int blackBrightness = 0; // How much light reflected with all leds lit at once

//jsut initializing
int redRead2 = 0;
int greenRead2 = 0;
int blueRead2 = 0;
void setup() {
Serial.begin(9600);
// initialize the digital pins as outputs.
 pinMode(redLed, OUTPUT);
 pinMode(greenLed, OUTPUT);
 pinMode(blueLed, OUTPUT);
// turn off all the outputs by default
 digitalWrite(redLed, LOW);
 digitalWrite(greenLed, LOW);
 digitalWrite(blueLed, LOW);// Collection time. Longer the time, the more light it collects
 tsl.setTiming(TSL2561_INTEGRATIONTIME_13MS);
 // Set gain of sensor
 tsl.setGain(TSL2561_GAIN_16X);
//setup the while and black balancing
 whiteBlackBalance();
}
void loop() {

 //Figure out how bright this color is
 int brightness = readAll();

 //Take a sensor reading of all three colors
 int redRead = readColor(redLed);
 int greenRead = readColor(greenLed);
 int blueRead = readColor(blueLed);

 // Convert color readings to 0-255 RGB values
 if (brightness &lt; 500) {
 redRead2 = getRGBValue(blackRed, redRed, redRead);
 greenRead2 = getRGBValue(blackGreen, greenGreen, greenRead);
 blueRead2 = getRGBValue(blackBlue, blueBlue, blueRead);
 } else {
 redRead2 = getRGBValue(blackRed, whiteRed, redRead);
 greenRead2 = getRGBValue(blackGreen, whiteGreen, greenRead);
 blueRead2 = getRGBValue(blackBlue, whiteBlue, blueRead);
 }
//Output RGB Values
 Serial.print("R: ");
 Serial.println(redRead2);
 Serial.print("G: ");
 Serial.println(greenRead2);
 Serial.print("B:");
 Serial.println(blueRead2);
 Serial.println();
// Serial.print("Brightness: ");
// Serial.println(brightness);
}
//takes a sensed color value (readColor) and returns an int representing the scaled value from 0-255
int getRGBValue(int blackColor, int whiteColor, int readColor) {
 //scale the perceived color so it is somewhere between 0 and 255
 int x = map(readColor, blackColor, whiteColor, 0, 255);
 //make sure that X can't ever go above 255 or below 0
 x = constrain(x, 0, 255);

 return x;
}
void whiteBlackBalance() {
 delay(1000);
 whiteBalance();
 delay(1000);
 colorBalance();
 delay(3000);
 blackBalance();
 delay(1000);
 blackBalance();
 delay(1000);
 blackBalance();
}
// Balance colors to pure white
void whiteBalance() {
 delay(1000);
 whiteBrightness = readAll();
 whiteRed = readColor(redLed);
 delay(2000);
 whiteGreen = readColor(greenLed);
 delay(2000);
 whiteBlue = readColor(blueLed);
 delay(2000);
}
// balance colors to their pure colors
void colorBalance() {
 redRed = readColor(redLed);
 delay(2000);
 greenGreen = readColor(greenLed);
 delay(2000);
 blueBlue = readColor(blueLed);
 delay(2000);
}
// Balance colors to black
void blackBalance() {
 blackBrightness = readAll();
 blackRed = readColor(redLed);
 blackGreen = readColor(greenLed);
 blackBlue = readColor(blueLed);
}
// pass this function the pin number of the led of the color you want to measure
int readColor(int ledPin) {
 digitalWrite(ledPin, HIGH);
 uint16_t x = tsl.getLuminosity(TSL2561_VISIBLE);
 delay(300);
 digitalWrite(ledPin, LOW);
 return x;
}
// Turn on all LEDs ("white" light) and measure the light intensity
int readAll() {
 // Turn on all 3 leds
 digitalWrite(redLed, HIGH);
 digitalWrite(greenLed, HIGH);
 digitalWrite(blueLed, HIGH);
 // sense light levels
 uint16_t x = tsl.getLuminosity(TSL2561_VISIBLE);
 delay(300);
 // turn off all leds
 digitalWrite(redLed, LOW);
 digitalWrite(greenLed, LOW);
 digitalWrite(blueLed, LOW);

 return x;
}</pre>
<p>I&#8217;m not sure I&#8217;m in love with this implementation but it does seem to be more effective.  Now I take a white balance reading against a pure white color for each led.  Then I balance the red, green, and blue to their own respective colors.  I still take a black balance the same way I did before.  Each time I sense a color the sensor first takes a brightness reading.  If that brightness is less than 500 then it uses the &#8220;white balance&#8221; variables that were balanced to each individual color (redRed, greenGreen, or blueBlue) because those seem to work better for darker colors.  If the brightness is greater than or equal to 500 then the sensor uses the white balance variables that were balanced to an actual white object (whiteRed, etc) because it seems to work better for brighter colors (like light pink).</p>
<p>The value 500 came from some experimentation.  I wrote some test code that would just sense the brightness of a color and output it to my computer.  I noticed that pure white was showing about 900 units of brightness whereas pure red was 178, green was 262, and blue was 336.  Pink showed up at 597.  I noticed that brighter colors tended to be above the 500 unit mark so I chose the number 500 based on that observation.  This may need some tweaking as I try sensing new colors.</p>
<p>This system feels a bit cludgy but it actually does seem to work the best so far.  Here are the results of my testing:</p>
<p><strong>Red:</strong> R: 255 G: 59 B: 50<br />
Looks great.</p>
<p><strong>Green:</strong> R: 28 G: 255 B: 74<br />
It looks more like lime green on the monitor and a bit darker on paper.</p>
<p><strong>Blue:</strong> R: 23 G: 130 B: 255<br />
Very close.  A bit lighter on screen.</p>
<p><strong>Yellow:</strong> R: 255 G: 255 B: 79<br />
Looks perfect.</p>
<p><strong>Cyan:</strong> R: 24 G: 141 B: 208<br />
This is really close but a bit darker on screen.</p>
<p><strong>Magenta:</strong> R: 203 G: 49 B: 129<br />
Looks great.</p>
<p><strong>Pink:</strong> R: 255 G: 137 B: 169<br />
This is has a bit more purple in it than the actual paper does but it is very close.</p>
<p><strong>White:</strong> R: 255 G: 255 B: 255<br />
Works fine.</p>
<p><strong>Black:</strong> R: 0 G: 0 B: 0<br />
Also looks as it should.</p>
<p>Based on these results, this new version of the code works better than any of the old versions.  I still want to try printing out a few lighter colors and some darker colors to make sure the sensor is close enough but I&#8217;m pretty confident I will be pleased with the results.  More updates to follow after further testing.</p>
<p>&nbsp;</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=216748751752592&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.richardosgood.com/2012/02/08/color-sensor-improvements/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.richardosgood.com/2012/02/08/color-sensor-improvements/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Tweaked the color sensor code</title>
		<link>http://www.richardosgood.com/2012/02/07/tweaked-the-color-sensor-code/</link>
		<comments>http://www.richardosgood.com/2012/02/07/tweaked-the-color-sensor-code/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 14:03:08 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[DIY Color Sensor]]></category>

		<guid isPermaLink="false">http://www.richardosgood.com/?p=515</guid>
		<description><![CDATA[I decided to try tweaking the color sensor code. I wanted to try changing it up so that instead of&#8221;white&#8221; balancing I would balance the brightness of each color by calibrating the color to the actual color instead of white. &#8230; <a href="http://www.richardosgood.com/2012/02/07/tweaked-the-color-sensor-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I decided to try tweaking the color sensor code. I wanted to try changing it up so that instead of&#8221;white&#8221; balancing I would balance the brightness of each color by calibrating the color to the actual color instead of white. So for example instead of shining the green light on white paper and taking the white balance reading I would shine the green light at something as close to pure green as possible. I wanted to try this because the green and blue readings always seemed too low unless I was sensing something white.  These are the changes I made to the code:</p>
<pre>void whiteBlackBalance() {
 delay(1000);
 whiteBalance();
 delay(3000);
 blackBalance();
 delay(1000);
 blackBalance();
 delay(1000);
 blackBalance();
}

void whiteBalance() {
 whiteRed = readColor(redLed);
 delay(2000);
 whiteGreen = readColor(greenLed);
 delay(2000);
 whiteBlue = readColor(blueLed);
 delay(2000);
}</pre>
<p>This code just makes a two second delay between the white balancing of each color so I have time to point the sensor at the different colors between readings. I never actually use the color white for balancing with this code. Once I had the code loaded up I calibrated the sensor and tried reading my color chart again. This time the colors were much more accurate. The green and blue are now much more sensitive to colors as I hoped they would be.  Here are the results I got from each color:</p>
<p><strong>Red:</strong> R: 255 G: 59 B: 45<br />
While it&#8217;s not 255, 255, 255, it looks really close to the actual color and therefore I am happy with the result</p>
<p><strong>Green:</strong> R: 28 G: 255 B: 70<br />
This is more of a lime green than the actual color printed on the paper but it&#8217;s close enough that I consider it accurate for my purposes for now.</p>
<p><strong>Blue:</strong> R: 23 G: 131 B: 251<br />
This should have been a bit darker like a navy blue, but again it&#8217;s close enough that it should work for me.</p>
<p><strong>Yellow:</strong> R: 255 G: 255 B: 255<br />
This looks dead on now.  It was orange with the previous code but now it looks almost identical to the print out.</p>
<p><strong>Cyan:</strong> R: 42 G: 255 B: 255<br />
This color looks a bit lighter than what is printed on the paper but still close enough for now.</p>
<p><strong>Magenta:</strong> R: 245 G: 49 B: 130<br />
This isn&#8217;t really that close to the 255, 0, 255 that I hoped for but it actually looks surprisingly close to the print out.  So this is a win.</p>
<p>Everything seemed great until I tried reading a sheet of light pink paper. The sensor picked up all colors as being 255, so basically it thought the paper was white. I guess it must be because the paper its such a lighter color than the blue and green colors and therefore is more reflective than colored paper. Pink worked great with the old code but not with the new code. It seems like my new code works great with darker colors but the old code works better with lighter colors. I&#8217;m not entirely sure how to fix this problem. I&#8217;m wondering if it would help to turn down the brightness of the leds when sending colors. Or perhaps turning down the sensor gain would help. It seems that a pure green color returns less light than white. This is really the source of my problem. I&#8217;ll have to think about this for a while and see if I can come up with a workable solution.</p>
<p>I&#8217;m also curious if maybe my computer screen is not calibrated properly. So when I plug in the numbers from my readings the screen might be showing me colors that are not actually accurate. I&#8217;m not sure how to fix that problem.</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=216748751752592&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.richardosgood.com/2012/02/07/tweaked-the-color-sensor-code/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.richardosgood.com/2012/02/07/tweaked-the-color-sensor-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Home Built Color Sensor</title>
		<link>http://www.richardosgood.com/2012/02/06/home-built-color-sensor/</link>
		<comments>http://www.richardosgood.com/2012/02/06/home-built-color-sensor/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 18:49:21 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[DIY Color Sensor]]></category>

		<guid isPermaLink="false">http://www.richardosgood.com/?p=486</guid>
		<description><![CDATA[A few years ago I wanted to build a home made color sensor for a project.  I never got it working exactly right and ended up dropping the idea until last December.  I had an idea for a different project &#8230; <a href="http://www.richardosgood.com/2012/02/06/home-built-color-sensor/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_501" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_21-20-29_593.jpg"><img class="size-large wp-image-501" title="Color Sensor" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_21-20-29_593-1024x577.jpg" alt="Color Sensor" width="500" height="281" /></a><p class="wp-caption-text">Color Sensor</p></div>
<p>A few years ago I wanted to build a home made color sensor for a project.  I never got it working exactly right and ended up dropping the idea until last December.  I had an idea for a different project that would require a color sensor and after analyzing my last attempt, I thought I might have known what was wrong with my last prototype.  So I started planning.</p>
<p>The basic idea to this color sensor is that you  can represent almost any color if you know how much red, green, and blue is in the color.  The way this sensor will work, is I will have three LEDs.  A red, a green, and a blue LED.  There will also be a light sensor.  The entire thing will need to be surrounded by some kind of dark shield to prevent external light from getting in.  The sensor will be pressed against a colored object and first, the red light will turn on.  The sensor will take a reading.  Then the green light, and then the blue light.  This way I can get readings of how much red, green, and blue light is reflected back to the sensor.  With this information I should be able to roughly determine the color of the object.</p>
<p>When I last tried to build this sensor I tried using a photoresistor but it didn&#8217;t seem to work reliably.  I also tried using a light to frequency counter but that didn&#8217;t seem to work well either.  After some research I found <a title="this digital luminosity sensor" href="http://www.adafruit.com/products/439">this digital luminosity sensor</a> on Adafruit&#8217;s website.  This sensor can give readings of all light, or only infrared light.  With those two readings you can determine only visible light.  That is what I wanted.  I thought maybe the other sensors were also reading infrared light and skewing my color values the last time I tried this, so this sensor might give better results.  I also decided to buy the super bright red, green, and blue LED&#8217;s from Adafruit as well since they have similar brightness ratings.  The green and red are both rated at 8000 mcd typical brightness and the blue is rated at 6000 mcd.</p>
<p><a title="Red LEDs" href="http://www.adafruit.com/products/297">Red LEDs</a><br />
<a title="Green LEDs" href="http://www.adafruit.com/products/300">Green LEDs</a><br />
<a title="Blue LEDs" href="http://www.adafruit.com/products/301">Blue LEDs</a></p>
<p>Once I knew what LEDs I was going to use I could figure out what size resistors I would need.  I found an <a title="online resistor calculator" href="http://led.linear1.org/1led.wiz">online resistor calculator</a> that made it simple to figure out what size resistors I would need to power the LEDs at close to their maximum brightness.</p>
<p>Once all the components arrived, I soldered them all to a small round prototyping board I bought at RadioShack.</p>
<div id="attachment_487" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-33-03_325.jpg"><img class="size-large wp-image-487" title="Prototype board" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-33-03_325-1024x577.jpg" alt="Prototype board" width="500" height="281" /></a><p class="wp-caption-text">Prototype board</p></div>
<p>I put some heat shrink tubing on each of the LEDs.  The idea is that the tubing will prevent any of the LED light from reaching the sensor directly form the LED.  It forces the light to bounce off of the colored object first.</p>
<div id="attachment_489" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-33-27_363.jpg"><img class="size-large wp-image-489" title="Under side of the board" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-33-27_363-1024x577.jpg" alt="Under side of the board" width="500" height="281" /></a><p class="wp-caption-text">Under side of the board</p></div>
<p>Each LED has its corresponding resistor attached to its anode.  The other side of each resistor will have a wire attached that will eventually plug into digital IO pins on the Arduino.  The cathode side of the LEDs all get tied to each other and to the ground pin of the sensor module.  The sensor module is just soldered into the board.  It will have a wire attached to each pin.</p>
<p>Next I decided to figure out what I would use for an enclosure for this board.  I thought back to the last time I tried this and I had the old board taped inside of a black ABS fitting. I think that maybe the tape was too loose and the sensor could have wiggled around inside of the housing.  If that was the case, it would explain why it would fall out of calibration sometimes when I moved it.  I knew that I had to avoid that problem this time.  Now that I have my own 3D printer, I decided to design a custom enclosure for this board.  The enclosure will fit the board nice and snug, and also have screw holes so I can mount the board inside securely.  It should also prevent outside light from reaching the sensor, and have a hole in the back so the sensor wires can leave the enclosure and attach to the Arduino.</p>
<div id="attachment_490" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-35-42_955.jpg"><img class="size-large wp-image-490" title="3D Printed enclosure" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-35-42_955-1024x577.jpg" alt="3D Printed enclosure" width="500" height="281" /></a><p class="wp-caption-text">3D Printed enclosure</p></div>
<p>That&#8217;s what I came up with.  There are standoffs printed on the inside to hold the board up about halfway inside of the enclosure.  Two of the standoffs have screw holes so I can mount the board in place.</p>
<div id="attachment_499" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_21-20-23_428.jpg"><img class="size-large wp-image-499" title="Board mounted inside the enclosure" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_21-20-23_428-1024x577.jpg" alt="Board mounted inside the enclosure" width="500" height="281" /></a><p class="wp-caption-text">Board mounted inside the enclosure</p></div>
<p>Next I attached the wires for the LEDs and for the sensor.  I separated out the LED wires from the sensor wires so it would be easier to figure out which wire was which later one.</p>
<div id="attachment_498" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-53-42_929.jpg"><img class="size-large wp-image-498" title="Wires attached" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-53-42_929-1024x577.jpg" alt="Wires attached" width="500" height="281" /></a><p class="wp-caption-text">Wires attached</p></div>
<p>Next I hooked up the LED wires and the ground wire to the Arduino board so I could figure out which wire went to which LED.  I also needed to test and ensure that the LEDs functioned properly.  I ran some test code to cycle through flashing each LED.</p>
<div id="attachment_502" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_21-53-17_662.jpg"><img class="size-large wp-image-502" title="Red LED" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_21-53-17_662-1024x577.jpg" alt="Red LED" width="500" height="281" /></a><p class="wp-caption-text">Red LED</p></div>
<div id="attachment_503" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_21-53-20_950.jpg"><img class="size-large wp-image-503" title="Green LED" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_21-53-20_950-1024x577.jpg" alt="Green LED" width="500" height="281" /></a><p class="wp-caption-text">Green LED</p></div>
<div id="attachment_506" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_21-53-33_45.jpg"><img class="size-large wp-image-506" title="Blue LED" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_21-53-33_45-1024x577.jpg" alt="Blue LED" width="500" height="281" /></a><p class="wp-caption-text">Blue LED</p></div>
<p>All of the LEDs worked.  I labeled each of the wires so they would be easy to reconnect later on.  Next I had to hook up all of the sensor wires and get the sensor working.  I used the sample code that came with the Adafruit Arduino library for this sensor.  Once I had the wires going to the right Arduino pins, it worked fine.</p>
<div id="attachment_507" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_22-00-44_551.jpg"><img class="size-large wp-image-507" title="Sensor fully connected" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_22-00-44_551-1024x577.jpg" alt="Sensor fully connected" width="500" height="281" /></a><p class="wp-caption-text">Sensor fully connected</p></div>
<p>The rest of this project was really just code, test, repeat.  After much trial and error, I finally got this sensor working pretty well.  I will paste my color sensor code below and then explain how it works afterwards.</p>
<pre>#include &lt;Wire.h&gt;
#include "TSL2561.h"
#include "LPD8806.h"
#include "SPI.h"

/*
ColorSensor
This sketch determines the color of an object by flashing a red, green, and blue LED.

This sketch uses the Adafruit TSL2561 digital luminosity sensor as the light sensor

By Rick Osgood

: connect TSL2561 SCL to analog 5
: connect TSL2561 SDA to analog 4
: connect VCC to 3.3V DC (MUST NOT BE GREATER THAN 3.3V!!!)
: connect GROUND to common ground
*/

#define redLed 10
#define greenLed 11
#define blueLed 12

TSL2561 tsl(TSL2561_ADDR_FLOAT);

//for white balancing
int whiteRed = 0;
int whiteGreen = 0;
int whiteBlue = 0;
//for black balancing
int blackRed = 0;
int blackGreen = 0;
int blackBlue = 0;

void setup() {
Serial.begin(9600);

// initialize the digital pins as outputs.
pinMode(redLed, OUTPUT);
pinMode(greenLed, OUTPUT);
pinMode(blueLed, OUTPUT);

// turn off all the outputs by default
digitalWrite(redLed, LOW);
digitalWrite(greenLed, LOW);
digitalWrite(blueLed, LOW);

// Collection time. Longer the time, the more light it collects
tsl.setTiming(TSL2561_INTEGRATIONTIME_13MS);
// Set gain of sensor
tsl.setGain(TSL2561_GAIN_16X);

//setup the while and black balancing
whiteBlackBalance();
}

void loop() {
//Take a sensor reading of all three colors
int redRead = readColor(redLed);
int greenRead = readColor(greenLed);
int blueRead = readColor(blueLed);

// Convert color readings to 0-255 RGB values
int redRead2 = getRGBValue(blackRed, whiteRed, redRead);
int greenRead2 = getRGBValue(blackGreen, whiteGreen, greenRead);
int blueRead2 = getRGBValue(blackBlue, whiteBlue, blueRead);

//Output RGB Values
Serial.print("R: ");
Serial.println(redRead2);
Serial.print("G: ");
Serial.println(greenRead2);
Serial.print("B:");
Serial.println(blueRead2);
Serial.println();

}

//takes a sensed color value (readColor) and returns an int representing the scaled value from 0-255
int getRGBValue(int blackColor, int whiteColor, int readColor) {
//since the black balance might not be zero, we subtract the black value to shift the range so it starts at 0
int maxColor = whiteColor - blackColor;
long x = readColor - blackColor;
x = x * 255;
x = x / maxColor;

if (x &lt; 0) {
x = 0;
}
else if (x &gt; 255) {
x = 255;
}

return x;
}

void whiteBlackBalance() {
delay(1000);
whiteBalance();
delay(1000);
whiteBalance();
delay(1000);
whiteBalance();
delay(3000);
blackBalance();
delay(1000);
blackBalance();
delay(1000);
blackBalance();
}

void whiteBalance() {
whiteRed = readColor(redLed);
whiteGreen = readColor(greenLed);
whiteBlue = readColor(blueLed);
}

void blackBalance() {
blackRed = readColor(redLed);
blackGreen = readColor(greenLed);
blackBlue = readColor(blueLed);
}

// pass this function the pin number of the led of the color you want to measure
int readColor(int ledPin) {
digitalWrite(ledPin, HIGH);
uint16_t x = tsl.getLuminosity(TSL2561_VISIBLE);
delay(300);
digitalWrite(ledPin, LOW);
return x;
}</pre>
<p>This sensor only works if it calibrates itself to known black and white values.  The sensor first goes through a white and black balancing process.  It first takes three readings of &#8220;white&#8221;.  While this is happening, you have to press the sensor against something white and preferably non glossy.  It takes three readings because I noticed that it seems to &#8220;settle&#8221; into a more accurate reading after a few readings of the same color.  Then it pauses three seconds and takes three readings of a black object.</p>
<p>These values get stored in the blackRed, whiteRed, etc variables.  When it takes a reading of another color after calibration, it uses those black and white balancing variables to figure out where in the spectrum between black and white the values reside.  The getRGBValue function takes care of this:</p>
<pre>int maxColor = whiteColor - blackColor;
long x = readColor - blackColor;
x = x * 255;
x = x / maxColor;</pre>
<p>It first shifts the scale of minimum color to maximum color.  For example, lets say the blackRed reading is 50 and the whiteRed reading is 500.  This means that when the sensor reads a black object, it will still read 50 units of red.  No object should show less than that because black is the darkest it should get.  White will always show about 500 units and no other object (other than true red) should show 500 units of red because white is the brightest it should ever get.  We need to shift the scale from 50 &#8211; 500 so it starts at zero.  So the function first subtracts 50 (blackColor) from the whiteColor variable and also from the readColor variable. (readColor is how much of that color was just sensed on an object).</p>
<p>Next, I wanted to scale the sensed value so it was between 0 and 255.  This would make it easy for me to plug into a computer paint program to see if the RGB values were correct. So the software takes the perceived value (now shifted down) and multiplies it by 255 and then divides it by the maxColor variable (whiteColor scaled down).  It really is difficult to explain this in words.  It makes much more sense if you just plug in sample values and see how the math works out.</p>
<p>The main loop of the program just takes the red, green, and blue readings, converts them to RGB values and then prints them out via the serial port:</p>
<pre>//Output RGB Values
Serial.print("R: ");
Serial.println(redRead2);
Serial.print("G: ");
Serial.println(greenRead2);
Serial.print("B:");
Serial.println(blueRead2);
Serial.println();</pre>
<p>I can just open up the Arduino serial terminal to view the RGB values.  It spits the values out about every 500 milliseconds.  Once I calibrate the sensor to black and white, I can just hold it up to any object and it gives me the RGB values between 0 and 255.  I then take those values and plug them into MS Paint&#8217;s &#8220;custom colors&#8221; tool to see what color those values actually are.</p>
<p>I printed out this color chart below so I could see how well the color sensor works.  I put the RGB values on each square for documentation purposes but they were not actually printed on the sheet of paper.</p>
<div id="attachment_513" class="wp-caption aligncenter" style="width: 615px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/ColorChart.png"><img class=" wp-image-513  " title="Color chart" src="http://www.richardosgood.com/wp-content/uploads/2012/02/ColorChart.png" alt="Color chart" width="605" height="371" /></a><p class="wp-caption-text">Color chart</p></div>
<p>And here are the results:</p>
<p><strong>Red: </strong>R: 209 G: 22 B: 20<strong><br />
</strong>Red looked really good.  It wasn&#8217;t as bright as I expected but the color matched pretty closely.</p>
<p><strong>Green:</strong> R: 22 G: 98 B: 31<br />
Green looked alright but it was a bit dark.</p>
<p><strong>Blue:</strong> R: 22 G: 50 B: 114<br />
Blue was also pretty close but a bit darker than the real image.</p>
<p><strong>Yellow</strong>: R: 239 G: 156 B: 34<br />
This is the worst so far.  It comes out more like a light orange.  For some reason the green is not as sensitive as it needs to be.</p>
<p><strong>Cyan:</strong> R: 22 G: 135 B: 197<br />
This one is kind of close, but there&#8217;s a bit too much blue and not enough green</p>
<p><strong>Magenta:</strong> R: 201 G: 17 B: 57<br />
This is not very accurate.  It shows up as a dark red.  There is not enough blue in it to look like magenta.</p>
<p>I would say this first test was a success.  The sensor definitely works but the colors are not all quite right.  The red sensor seems to be working fine, but the blue and especially the green are not sensitive enough.  I would expect that when I sense a 100% green color, the green sensor would sense somewhere over the 200 value for green.  But it doesn&#8217;t.  I wonder if the White balance is just too bright.  Perhaps if I balance the red green and blue separately rather than just using white I would get more accurate readings.  Time to tweak my code and find out!</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=216748751752592&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.richardosgood.com/2012/02/06/home-built-color-sensor/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.richardosgood.com/2012/02/06/home-built-color-sensor/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Check Signing Machine Tear-down and LCD Interfacing</title>
		<link>http://www.richardosgood.com/2012/02/04/check-signing-machine-tear-down-and-lcd-interfacing/</link>
		<comments>http://www.richardosgood.com/2012/02/04/check-signing-machine-tear-down-and-lcd-interfacing/#comments</comments>
		<pubDate>Sat, 04 Feb 2012 19:13:20 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Tear-down]]></category>
		<category><![CDATA[Rocket Launch Controller]]></category>

		<guid isPermaLink="false">http://www.richardosgood.com/?p=425</guid>
		<description><![CDATA[&#160; I was able to procure some old check signing devices yesterday.  I&#8217;m not entirely sure how these devices work, but it appears that they hook up between a computer and a laser printer.  Somehow they tell the printer how &#8230; <a href="http://www.richardosgood.com/2012/02/04/check-signing-machine-tear-down-and-lcd-interfacing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<div id="attachment_427" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-04-06_399.jpg"><img class="size-large wp-image-427" title="Check Signing Machine" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-04-06_399-1024x577.jpg" alt="Check Signing Machine" width="500" height="281" /></a><p class="wp-caption-text">Check Signing Machine</p></div>
<p>I was able to procure some old check signing devices yesterday.  I&#8217;m not entirely sure how these devices work, but it appears that they hook up between a computer and a laser printer.  Somehow they tell the printer how to print signatures on checks I guess.  I was not interested in the intended functions of this device.  I noticed it had two key switches and a nice 4&#215;40 character LCD display.  It also had various switches and plugs that I thought may be useful.  After talking with Kevin at work, I decided it would be awesome if I could turn this device into a rocket control station for my air rocket launcher.  I could use the key switches as arming and launch switches and I could use the LCD screen to display a count down or launch codes or something.  The device also has a ps/2 port on the back so it&#8217;s possible I might be able to hook that up to an Arduino to accept keyboard input so it requires you to type in launch codes before it will launch.</p>
<p>I brought one of these machines down to the shop for our open house night last night and tore it apart.</p>
<div id="attachment_429" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-07-07_231.jpg"><img class="size-large wp-image-429" title="Back side" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-07-07_231-1024x577.jpg" alt="Back side" width="500" height="281" /></a><p class="wp-caption-text">Back side</p></div>
<div id="attachment_430" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-07-16_677.jpg"><img class="size-large wp-image-430" title="Ports" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-07-16_677-1024x577.jpg" alt="Ports" width="500" height="281" /></a><p class="wp-caption-text">Ports</p></div>
<div id="attachment_431" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-07-28_705.jpg"><img class="size-large wp-image-431" title="Bottom" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-07-28_705-1024x577.jpg" alt="Bottom" width="500" height="281" /></a><p class="wp-caption-text">Bottom</p></div>
<p>I started out by opening the small hatch on the bottom of the device.</p>
<div id="attachment_466" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-30-38_540.jpg"><img class="size-large wp-image-466" title="Hatch opened" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-30-38_540-1024x577.jpg" alt="Hatch opened" width="500" height="281" /></a><p class="wp-caption-text">Hatch opened</p></div>
<p>Inside is a large eeprom chip and three sets of DIP switches.  I have covered the eeprom in blue tape because it had a label that identified the company this device was being used by before I got a hold of it.  Next I removed the entire bottom panel.</p>
<div id="attachment_434" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-10-00_808.jpg"><img class="size-large wp-image-434" title="Bottom removed" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-10-00_808-1024x577.jpg" alt="Bottom removed" width="500" height="281" /></a><p class="wp-caption-text">Bottom removed</p></div>
<p>On the right side there is a really large plug that wasn&#8217;t attached to anything.  I wonder if it was used for programming or debugging or something.  It might also be used for an extra peripheral or perhaps for a more advanced model of this same machine.  Here you can also see the two key switches on the bottom left of the image and the LCD board towards the bottom of the image.</p>
<div id="attachment_436" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-10-14_791.jpg"><img class="size-large wp-image-436" title="Some identifying information" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-10-14_791-1024x577.jpg" alt="Some identifying information" width="500" height="281" /></a><p class="wp-caption-text">Some identifying information</p></div>
<div id="attachment_440" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-10-45_374.jpg"><img class="size-large wp-image-440" title="Connection points and LCD board" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-10-45_374-1024x577.jpg" alt="Connection points and LCD board" width="500" height="281" /></a><p class="wp-caption-text">Connection points and LCD board</p></div>
<div id="attachment_442" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-14-04_293.jpg"><img class="size-large wp-image-442" title="Switch and LCD connections" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-14-04_293-1024x577.jpg" alt="Switch and LCD connections" width="500" height="281" /></a><p class="wp-caption-text">Switch and LCD connections</p></div>
<div id="attachment_444" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-16-54_643.jpg"><img class="size-large wp-image-444" title="Main board removed" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-16-54_643-1024x577.jpg" alt="Main board removed" width="500" height="281" /></a><p class="wp-caption-text">Main board removed</p></div>
<p>After I removed the main board, I decided to remove the key switches.</p>
<div id="attachment_448" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-20-05_569.jpg"><img class="size-large wp-image-448" title="10 position key switch" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-20-05_569-e1328379804139-1024x577.jpg" alt="10 position key switch" width="500" height="281" /></a><p class="wp-caption-text">10 position key switch</p></div>
<div id="attachment_451" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-20-23_425.jpg"><img class="size-large wp-image-451" title="10 position key switch serial numbers" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-20-23_425-e1328379901635-1024x577.jpg" alt="10 position key switch serial numbers" width="500" height="281" /></a><p class="wp-caption-text">10 position key switch serial numbers</p></div>
<div id="attachment_465" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-26-31_999.jpg"><img class="size-large wp-image-465" title="8 Position key switch" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-26-31_999-1024x577.jpg" alt="8 Position key switch" width="500" height="281" /></a><p class="wp-caption-text">8 Position key switch</p></div>
<div id="attachment_463" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-26-24_523.jpg"><img class="size-large wp-image-463" title="8 Position switch serial numbers" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-26-24_523-1024x577.jpg" alt="8 Position switch serial numbers" width="500" height="281" /></a><p class="wp-caption-text">8 Position switch serial numbers</p></div>
<p>Once the key switches were removed and documented I went for the LCD.</p>
<div id="attachment_456" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-23-59_261.jpg"><img class="size-large wp-image-456" title="LCD Board" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-23-59_261-e1328380170694-1024x577.jpg" alt="LCD Board" width="500" height="281" /></a><p class="wp-caption-text">LCD Board</p></div>
<p>The upper left side of the board has the model number of the LCD module.  It appears to be a Powertip PC4004A-P1 A model LCD.</p>
<div id="attachment_458" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-24-14_317.jpg"><img class="size-large wp-image-458" title="LCD Model Number" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-24-14_317-e1328380255721-1024x577.jpg" alt="LCD Model Number" width="500" height="281" /></a><p class="wp-caption-text">LCD Model Number</p></div>
<p>Now that I had the key switches and the LCD module, I decided to put the rest of the unit back together.  Those were the primary components I wanted to remove so that I could try to interface them with an Arduino.</p>
<div id="attachment_468" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-31-46_578.jpg"><img class="size-large wp-image-468" title="Reassembled" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_18-31-46_578-1024x577.jpg" alt="Reassembled" width="500" height="281" /></a><p class="wp-caption-text">Reassembled</p></div>
<p>Next I decided to try and interface with the LCD module.  I did some Googling for the model number of the LCD and Arduino and hit the jackpot pretty much right away.  I found <a title="this forum thread" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1264823411/all">this forum thread</a> where someone was trying to interface this exact same LCD module with an Arduino.  They linked to the <a title="datasheet" href="http://www.datasheetarchive.com/PC4004-A-datasheet.html">datasheet</a>, figured out the pinouts and pasted sample code all in that thread.  It looked like the LCD ran on 5 Volts so I should be in business.</p>
<p>Here is a copy of his sample code he provided in the forum post in case the forum is ever unavailable.  The sample code requires the LiquidCrystal440 library which can be found <a title="here" href="http://code.google.com/p/liquidcrystal440/downloads/detail?name=LiquidCrystal440.zip&amp;can=2&amp;q=">here</a>. Pinouts are in the comments at the top of the code.  His pinouts include backlight pins but my LCD does not appear to have a backlight.</p>
<pre>// WH4004A Test Program: WinStar 40x4 LCD
// using Enhanced LiquidCrystal440.h
// Since the pinouts are different from Forum sample 40x4 LCDs
// Available nkcelectronics.com. Data sheet WH4004A-YYH-JT.pdf
// To adjust contrast, 10K pot between GND and +5V, wiper W to lcd 12
// LCD Func Arduino Desc pins               Dan Magorian 10/19/2010
// 1    DB7  12    Data bus line
// 2    DB6  11    Data bus line
// 3    DB5  10    Data bus line
// 4    DB4   9    Data bus line
// 5    DB3        Data bus line
// 6    DB2        Data bus line
// 7    DB1        Data bus line
// 8    DB0        Data bus line
// 9    E1   4     Chip enable signal, lcd lines 1 &amp; 2
// 10   RW   3     H: Read L: Write
// 11   RS   2     H: DATA, L: Instruction code
// 12   V0   W     Contrast, gnd = full, too dark
// 13   VSS GND    Ground for logic
// 14   VDD +5V    Supply Voltage for logic
// 15   E2   5     Chip enable signal, lcd lines 3 &amp; 4
// 16    NC
// 17    LED+      Ext +5V Supply for fluor LED+ optional turn fluor on
// 18    LED-      Ext GND Supply for fluor LED- optional turn fluor on
//
// If char blocks show black but nothing prints, adjust contrast pot,
// and check lcd pins 13 and 14: display may not be initialized.  
// If alternate blocks and blank lines show, then neither of the controllers
// is properly initialized, check RW, E1, E2, or any of the connections

#include &lt;LiquidCrystal440.h&gt;
// LiquidCrystal lcd(rs,rw,enable1,enable2,d4,d5,d6,d7);
// Note: some Forum examples using LiquidCrystal440.h have wrong DB pins,
// eg DB0-DB3, or in wrong order.  The top 4 work, in this order.

LiquidCrystal lcd(2, 3, 4, 5, 9, 10, 11, 12);
void setup(){
  lcd.begin (40, 4);
  lcd.clear();
    for (int j=18; j&lt;129; j++) {
      lcd.write(j);
  } // print English chars in rom lower 4 bits, upper 4 bits Japanese
}
void loop() {}</pre>
<p>Once I had the sample code and pinouts, it was obvious I had to try to wire up the LCD according to his pinouts and give this a try.</p>
<div id="attachment_470" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_19-33-02_830.jpg"><img class="size-large wp-image-470" title="First attempt" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_19-33-02_830-1024x577.jpg" alt="First attempt" width="500" height="281" /></a><p class="wp-caption-text">First attempt</p></div>
<p>My first attempt didn&#8217;t work so well.  I chopped off one end of the ribbon cable so that I could splice out the individual wires.  I thought that if I spliced them apart and stripped each one, I could just stick the wire into the proper Arduino port.  Well the wires were actually thin stranded wire, not solid core as I thought so that didn&#8217;t work out.</p>
<p>I realized that if I had not chopped off the plug to the ribbon cable, I could have just stuck some jumper wires in the end of it and jumped them over to the Arduino board.  I ended up opening a second check signing machine so I could steal its unaltered ribbon cable.</p>
<div id="attachment_471" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-19-52_343.jpg"><img class="size-large wp-image-471" title="Jumper wires" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-19-52_343-1024x577.jpg" alt="Jumper wires" width="500" height="281" /></a><p class="wp-caption-text">Jumper wires</p></div>
<p>It took me a while to get the LCD hooked up properly.  It was really easy to plug wires into the wrong ports.  When I finally thought I had it plugged in properly and had the code running on the Arduino, it seemed at first like the LCD wasn&#8217;t working properly.  When I moved certain wires around, the screen would light up with underlines or garbled characters but nothing that made me think it was working properly.  Finally I took a closer look and noticed that there were in fact letters being printed on the LCD screen.  They were just so faint that I could barely see them.  It was really hard to get a photo of this, but if you look really closely at the image below, you can make out some of the faded letters.</p>
<div id="attachment_472" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-19-58_912.jpg"><img class="size-large wp-image-472" title="Faint letters" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-19-58_912-e1328381610974-1024x577.jpg" alt="Faint letters" width="500" height="281" /></a><p class="wp-caption-text">Faint letters</p></div>
<p>I tried messing around with the contrast pin a bit and nothing I did seemed to work to fix this problem.  All the wires seemed to be plugged into the right place.  Finally, I thought that maybe the LCD wasn&#8217;t getting enough power.  I had the LCD VCC pin going to the Arduino&#8217;s VCC pin, so it should have been getting 5 Volts.  Maybe it wasn&#8217;t getting enough current?</p>
<p>If I remember correctly, the VIN pin just takes the raw power from your power supply and pipes it through.  So if you plug in a 12 Volt 2 Amp power supply, you will see 12 Volts on that pin and be able to draw up to 2 Amps.  The VCC pin is 5 Volts of power that gets regulated by circuitry on the Arduino board.  So even if you plug in a 12 Volt power supply, you will only see 5 Volts on that pin.  I thought that maybe the VCC pin was limiting the current to the LCD and preventing it from lighting up properly.  Since my Arduino power supply was 5 Volts as well, I decided to just plug the LCD into the VIN pin on the Arduino.</p>
<div id="attachment_475" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-26-43_323.jpg"><img class="size-large wp-image-475" title="LCD fully functioning" src="http://www.richardosgood.com/wp-content/uploads/2012/02/2012-02-03_20-26-43_323-e1328382139396-1024x577.jpg" alt="LCD fully functioning" width="500" height="281" /></a><p class="wp-caption-text">LCD fully functioning</p></div>
<p>That obviously did the trick.  Now I know that I can successfully interface these LCD modules to an Arduino.  I should be able to use this in my air rocket launch control project. Next I will have to test out those key switches to make sure they function the way I expect them too.  Expect more updates once I test out those other components and start more detailed planning out the launcher project.</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=216748751752592&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.richardosgood.com/2012/02/04/check-signing-machine-tear-down-and-lcd-interfacing/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.richardosgood.com/2012/02/04/check-signing-machine-tear-down-and-lcd-interfacing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Productive Sunday</title>
		<link>http://www.richardosgood.com/2012/02/01/productive-sunday/</link>
		<comments>http://www.richardosgood.com/2012/02/01/productive-sunday/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 17:19:02 +0000</pubDate>
		<dc:creator>Rick</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Wood Working]]></category>

		<guid isPermaLink="false">http://www.richardosgood.com/?p=411</guid>
		<description><![CDATA[I had a really productive day last Sunday.  I finally got to build a lock pick training box for Eugene Maker Space.  Ellery and I started the box on Saturday and finished it on Sunday.  You can find details about &#8230; <a href="http://www.richardosgood.com/2012/02/01/productive-sunday/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I had a really productive day last Sunday.  I finally got to build a lock pick training box for Eugene Maker Space.  Ellery and I started the box on Saturday and finished it on Sunday.  You can find details about the Mystery box in the <a title="mystery box" href="http://www.richardosgood.com/projects/mystery-box/">projects section</a>.</p>
<div id="attachment_406" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/01/IMG_20120129_170606.jpg"><img class="size-large wp-image-406" title="Mystery Box" src="http://www.richardosgood.com/wp-content/uploads/2012/01/IMG_20120129_170606-1024x768.jpg" alt="Mystery Box" width="500" height="375" /></a><p class="wp-caption-text">Mystery Box</p></div>
<p>A little over a week ago Shannon and I went to Portland to see the Mythbusters tour.  We stayed overnight and the next day we went to check out OMSI.  I bought the catapult kit while I was there and finally was able to put it together on Sunday after we completed the mystery box.  It works surprisingly well.</p>
<div id="attachment_413" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/01/2012-01-30_14-05-57_336.jpg"><img class="size-large wp-image-413" title="Catapult ready to fire" src="http://www.richardosgood.com/wp-content/uploads/2012/01/2012-01-30_14-05-57_336-1024x577.jpg" alt="Catapult ready to fire" width="500" height="281" /></a><p class="wp-caption-text">Catapult ready to fire</p></div>
<div id="attachment_412" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/01/2012-01-30_14-05-35_977.jpg"><img class="size-large wp-image-412" title="Catapult up close" src="http://www.richardosgood.com/wp-content/uploads/2012/01/2012-01-30_14-05-35_977-1024x577.jpg" alt="Catapult up close" width="500" height="281" /></a><p class="wp-caption-text">Catapult up close</p></div>
<p>Finally, Shannon and I recently started letting our cat outside and we thought it would be really fun to find a way to attach a camera to her so we could see what she does out there.  I remembered that we had a tiny video camera at the shop for our nearspace project that we weren&#8217;t using yet.  This camera takes a micro SD card and has a built in rechargeable battery.  The entire package is very small and very light so I figured it would be perfect.  I brought it home and started trying to design a 3d printable bracket to hold the camera onto my cat&#8217;s collar.  Then I realized there might be an easier way and I just zip tied it on.</p>
<div id="attachment_414" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/01/2012-01-30_17-38-35_383.jpg"><img class="size-large wp-image-414" title="Camera collar" src="http://www.richardosgood.com/wp-content/uploads/2012/01/2012-01-30_17-38-35_383-1024x577.jpg" alt="Camera collar" width="500" height="281" /></a><p class="wp-caption-text">Camera collar</p></div>
<div id="attachment_416" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/01/2012-01-30_17-39-55_270.jpg"><img class="size-large wp-image-416" title="Raja!" src="http://www.richardosgood.com/wp-content/uploads/2012/01/2012-01-30_17-39-55_270-1024x577.jpg" alt="Raja!" width="500" height="281" /></a><p class="wp-caption-text">Raja!</p></div>
<div id="attachment_415" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.richardosgood.com/wp-content/uploads/2012/01/2012-01-30_17-39-50_803.jpg"><img class="size-large wp-image-415" title="Another cat picture for good measure" src="http://www.richardosgood.com/wp-content/uploads/2012/01/2012-01-30_17-39-50_803-1024x577.jpg" alt="Another cat picture for good measure" width="500" height="281" /></a><p class="wp-caption-text">Another cat picture for good measure</p></div>
<p>The zip ties worked really well.  My cat didn&#8217;t seem to be bothered by the camera at first, although after a little while she started trying to bite at it.  I only have footage of her roaming around the inside of the house for now because it was dark out when I tested this. I will probably have to wait until the weekend to let her out during the day since that&#8217;s the only time I&#8217;m home while the sun is still up.  If I get any good video I&#8217;ll put it up here.  I also have a small wireless camera that I would like to try this with.  It would be really fun to get live video from the cat but I need to find a 9V battery small enough that it won&#8217;t weigh her down.</p>
<div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=216748751752592&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://www.richardosgood.com/2012/02/01/productive-sunday/" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://www.richardosgood.com/2012/02/01/productive-sunday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

