<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Project  Blog</title>
	
	<link>http://brettbeauregard.com/blog</link>
	<description>Project updates and... um...</description>
	<lastBuildDate>Sun, 22 Apr 2012 23:41:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/brettbeauregard/vayj" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="brettbeauregard/vayj" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Ladder Golf Construction Tricks</title>
		<link>http://brettbeauregard.com/blog/2012/04/ladder-golf-construction-tricks/</link>
		<comments>http://brettbeauregard.com/blog/2012/04/ladder-golf-construction-tricks/#comments</comments>
		<pubDate>Sun, 22 Apr 2012 23:34:10 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brettbeauregard.com/blog/?p=2082</guid>
		<description><![CDATA[

Spring is here, and that means it's time to prepare for summer parties.  If you're me, that means making a ladder golf set.  It seems like every year I'm making another one, the previous-year's set having been gifted or left somewhere.

Over the years I've picked up a few tricks, and this time ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/both.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/both.png" alt="" title="both" width="450" height="275" class="aligncenter size-full wp-image-2084" /></a></p>
<p>Spring is here, and that means it&#8217;s time to prepare for summer parties.  If you&#8217;re me, that means making a <a href="http://www.missouriscenicrivers.com/Laddergolfplans.html">ladder golf</a> set.  It seems like every year I&#8217;m making another one, the previous-year&#8217;s set having been gifted or left somewhere.</p>
<p>Over the years I&#8217;ve picked up a few tricks, and this time around I finally remembered to document them.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/holes.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/holes.png" alt="" title="holes" width="450" height="337" class="aligncenter size-full wp-image-2089" /></a></p>
<p>When making the bolas, I&#8217;ve found the <a href="http://www.missouriscenicrivers.com/Laddergolfplans.html">through-hole</a> method to be rock-solid and maintenance free. It took me a little while to find a painless way to crank these out.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/rope-prep.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/rope-prep.png" alt="" title="rope prep" width="450" height="337" class="aligncenter size-full wp-image-2092" /></a><br />
I like to use a 1/4&#8243; nylon rope and a 1/4&#8243; hole, so stringing the rope can be difficult.  My first trick is to taper the rope at the tip and tape it to something thin and rigid.  Here I&#8217;m using a skewer, but I&#8217;ve used a piece of wire in the past.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/strung.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/strung.png" alt="" title="strung" width="450" height="337" class="aligncenter size-full wp-image-2096" /></a><br />
The second trick is to put all the golf balls on the rope first, before double-knotting and cutting each bola.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/melty.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/melty.png" alt="" title="melty" width="450" height="285" class="aligncenter size-full wp-image-2098" /></a></p>
<p>The last thing I do on each bola is melt the end of the rope with an open flame, permanently locking the knot in place.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/done.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/done.png" alt="" title="done" width="450" height="337" class="aligncenter size-full wp-image-2100" /></a></p>
<p>Making the ladder is straight-forward, so I won&#8217;t bother explaining that in detail.  Two things I&#8217;ve learned though:</p>
<ul>
<li>You don&#8217;t need to use the purple pvc primer.  This doesn&#8217;t have to be water tight, and the primer tends to run all over and makes things ugly</li>
<li>A <a href="http://www.amazon.com/Wolverine-PST002-Hose-Ratcheting-Cutter/dp/B000HSAPR8">ratcheting tube cutter</a> is worth every penny.  It turns a long, messy job into a quick, clean one</li>
</ul>
<p>I also tried something new this year.  One of the things that bothered me about my previous ladders was the number of pieces.  Each ladder breaks down into 3 pieces, which makes storage and transport a little annoying.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/ropes.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/ropes-1024x342.png" alt="" title="ropes" width="450" height="150" class="aligncenter size-large wp-image-2086" /></a></p>
<p>Using some of the left-over bola rope, I turned each ladder into a single unit with a shoulder strap.  I&#8217;m pretty happy with how they came out, and with my design improvements.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/both.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/both.png" alt="" title="both" width="450" height="275" class="aligncenter size-full wp-image-2084" /></a></p>
<p class="wp-flattr-button"></p> <p><a href="http://brettbeauregard.com/blog/?flattrss_redirect&amp;id=2082&amp;md5=3ffac583f16ad728075516bad9089367" title="Flattr" target="_blank"><img src="http://brettbeauregard.com/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/brettbeauregard/vayj/~4/jz5iuTPjoCk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettbeauregard.com/blog/2012/04/ladder-golf-construction-tricks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>DIY Custom Heating Element</title>
		<link>http://brettbeauregard.com/blog/2012/04/diy-custom-heating-element/</link>
		<comments>http://brettbeauregard.com/blog/2012/04/diy-custom-heating-element/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 11:38:17 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Mechanical]]></category>

		<guid isPermaLink="false">http://brettbeauregard.com/blog/?p=2056</guid>
		<description><![CDATA[
A few years ago I made a BBQ smoke generator.  I was fairly happy with the design, but felt that for the "next time" I would make a few changes.  

One of my main issues was the size.  I really wanted to make it smaller, but I didn't want to pay ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-21.33.26.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-21.33.26.jpg" alt="" title="SAMSUNG" width="450" height="337" class="aligncenter size-full wp-image-2063" /></a><br />
A few years ago I made a <a href="http://brettbeauregard.com/blog/2009/10/success/">BBQ smoke generator</a>.  I was fairly happy with the design, but felt that for the &#8220;next time&#8221; I would make a few changes.  </p>
<p>One of my main issues was the size.  I really wanted to make it smaller, but I didn&#8217;t want to pay for a small cartridge heater.</p>
<p>It occurred to me a couple of days ago that I might be able to modify a stock toaster-oven heating element to make a smaller heater.  If I cut out a small section and drove it at a proportionally smaller voltage, I wondered, could I get a small heater with the same temperature as the big boy?  It turns out that the answer is yes.</p>
<p>I went through a few fits and starts getting this thing to work.  My main issue is that I&#8217;m still learning to weld, and welding wire requires a lot of finesse.  I&#8217;m not going to bother with the trials and tribulations though. Here&#8217;s how I made a custom heating element:</p>
<h2>Cut to Length</h2>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-19.50.44.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-19.50.44.jpg" alt="" title="SAMSUNG" width="450" height="337" class="aligncenter size-full wp-image-2064" /></a><br />
A heating element is a nichrome coil embedded in a steel tube using ceramic.  In a toaster-oven they wire 2 in series, so each element is designed to see 60V.  I had a 12V power supply, so I wanted to use 1/5 of the total element length.  A pipe cutter made quick work of the cuts.</p>
<h2>Ream</h2>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-19.59.08.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-19.59.08.jpg" alt="" title="SAMSUNG" width="450" height="337" class="aligncenter size-full wp-image-2057" /></a><br />
I needed to attach metal contacts to the wire.  To give myself enough wire for a bond, and to have room to support the contact, some free space would be required.  A metal file and some elbow grease left me with a 1/4&#8243; cavity at each end of my cut section.</p>
<h2>Weld</h2>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-20.23.46.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-20.23.46.jpg" alt="" title="SAMSUNG" width="450" height="337" class="aligncenter size-full wp-image-2058" /></a></p>
<p>Attaching things to nichrome is a tricky proposition.  Because it gets so hot you can&#8217;t use solder, and mechanical connections are unreliable.  I decided TIG welding was the way to go.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-20.26.25.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-20.26.25.jpg" alt="" title="SAMSUNG" width="450" height="337" class="aligncenter size-full wp-image-2059" /></a><br />
Easy in theory, blindingly difficult (for me) in practice.  In the end though, welding for 250mS at the lowest setting created a permanent bond bond between contact and wire.</p>
<h2>Insulate</h2>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-20.53.42.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-20.53.42.jpg" alt="" title="SAMSUNG" width="450" height="337" class="aligncenter size-full wp-image-2060" /></a><br />
To keep this welded bond electrically isolated, and to give the contact some rigidity, I filled the previously-created cavity with furnace cement.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-20.57.16.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-20.57.16.jpg" alt="" title="SAMSUNG" width="450" height="337" class="aligncenter size-full wp-image-2061" /></a><br />
Next time around I might do this in several small additions rather than all at once.  I think that would give me a more solid fill.</p>
<h2>Burn Baby Burn</h2>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-21.17.05.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/04/2012-04-03-21.17.05.jpg" alt="" title="SAMSUNG" width="450" height="337" class="aligncenter size-full wp-image-2062" /></a><br />
It actually works!  I applied 12V to the element and was easily able to make some wood smoke.  It didn&#8217;t get red-hot, but I suspect this is because my cut section was a bit long.  At any rate, I&#8217;m really excited at the prospect of making inexpensive small heaters for use in my projects.  I should probably get some more welding practice first though.</p>
<p class="wp-flattr-button"></p> <p><a href="http://brettbeauregard.com/blog/?flattrss_redirect&amp;id=2056&amp;md5=e4af392c657c38631e29f72453fe8ead" title="Flattr" target="_blank"><img src="http://brettbeauregard.com/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/brettbeauregard/vayj/~4/R-yR9OK-LHo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettbeauregard.com/blog/2012/04/diy-custom-heating-element/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Knitting</title>
		<link>http://brettbeauregard.com/blog/2012/03/knitting/</link>
		<comments>http://brettbeauregard.com/blog/2012/03/knitting/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 16:33:20 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Craft]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[knitting]]></category>

		<guid isPermaLink="false">http://brettbeauregard.com/blog/?p=2010</guid>
		<description><![CDATA[
It's been a busy few months.  Between the osPID and my day job, it's been pretty hectic.  Somehow, in the middle of it all, I decided to learn how to knit.

I needed a new scarf, and what I wanted I couldn't buy. With a borrowed set of needles and some helpful internet videos, I ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/head-cropped.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/head-cropped1.jpg" alt="" title="on head" width="418" height="269" class="aligncenter size-full wp-image-2013" /></a><br />
It&#8217;s been a busy few months.  Between the <a href="http://www.ospid.com/blog/">osPID</a> and my day job, it&#8217;s been pretty hectic.  Somehow, in the middle of it all, I decided to learn how to knit.</p>
<p>I needed a new scarf, and what I wanted I couldn&#8217;t buy. With a borrowed set of needles and some <a href="http://www.theknittingsite.com/knit-stitch/">helpful</a> <a href="http://www.theknittingsite.com/purl-stitch/">internet</a> <a href="http://www.theknittingsite.com/knitting-ribbing-2x2/">videos</a>, I cranked out a scarf in a couple of weeks.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/13258000709111.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/13258000709111-1024x768.jpg" alt="" title="1325800070911" width="450" height="337" class="aligncenter size-large wp-image-2037" /></a></p>
<p>Then something awful happened:  I enjoyed it.  For me, that means that I would have to keep doing it at least until I felt proficient.</p>
<p>This part of my personality can be really annoying sometimes, but I&#8217;ve learned it&#8217;s impossible to fight.  The quickest way to get stuff out of my system is to challenge the hell out of myself to quickly get to that proficient feeling.</p>
<p>So I decided I would make a hat. A difficult hat.  One that I definitely couldn&#8217;t buy.  It would be a multi-color hat with a custom pattern, allowing me to show off my love of <a href="http://en.wikipedia.org/wiki/Open-source_hardware">oshw</a> during the winter months.</p>
<h2>Fair-isle</h2>
<p>My first attempt at multi-color was using the fair-isle technique, whereby the unused colors are carried behind the knitting and occasionally wrapped in place.</p>
<p>I was ambitious, and went for a 3-color test pattern:</p>
<p> <a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/together.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/together-1024x345.jpg" alt="" title="together" width="450" height="151" class="aligncenter size-large wp-image-2027" /></a> </p>
<p>It turned out pretty well for a first try, but I didn&#8217;t particularly like the process or the end result.  Keeping track of 3 colors and wrapping was not enjoyable, and the final product felt pretty stiff.</p>
<h2>Double knitting, Attempt #1</h2>
<p>For the actual hat, I dropped my pattern down to two colors to improve the readibility of the image.  I also settled on a different, <a href="http://www.knittinghelp.com/video/play/double-knitting">double-knitting</a>, technique. One of the benefits of double knitting is that it produces a reversible fabric, which you don&#8217;t see all that often.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/oshw-gear-pattern.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/oshw-gear-pattern.png" alt="" title="oshw-gear-pattern" width="450" height="405" class="aligncenter size-full wp-image-2017" /></a></p>
<p>Armed with my pattern and a 16&#8243; circular needle, I got to work.  Once I got past the pattern I switched to double-pointed needles and reduced the hat by 6 stiches/row.  I was really happy with how everything turned out:</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/together.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/together-1024x567.png" alt="" title="together" width="450" height="250" class="aligncenter size-large wp-image-2015" /></a></p>
<p>&#8230;until I tried it on.  It was too small, both in diameter and height.  I was able to make it fit on the dog though.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/dunk1.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/dunk1.jpg" alt="" title="dunk" width="450" height="253" class="aligncenter size-full wp-image-2020" /></a></p>
<h2>Double Knitting, Attempt #2</h2>
<p>God I was pissed.  I added some length and width to my pattern.  To make sure I didn&#8217;t screw up the size on my second try I also got a 40&#8243; circular needle.  I still used a 16&#8243; for the main part of the hat, but I periodically threaded in the 40&#8243; so that I could test-fit.</p>
<p>On the reduction section, a 40&#8243; <a href="http://www.youtube.com/watch?v=IdSpc0EZpnk">magic loop</a> proved vastly superior to the double-ended needles.  I started by reducing 3 stitches a row, testing the fit every few rows.</p>
<p>Once I was near the top of my head I switched to 6 sticthes a row, closing off the hat.</p>
<p>I am very happy with the results:</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/hat-blue.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/hat-blue-1024x768.jpg" alt="" title="SAMSUNG" width="450" height="337" class="aligncenter size-large wp-image-2025" /></a><br />
<a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/hat-gray.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/03/hat-gray-1024x768.jpg" alt="" title="SAMSUNG" width="454" height="337" class="aligncenter size-large wp-image-2026" /></a></p>
<p>And the good news is I don&#8217;t feel like I have to knit anymore.  I&#8217;ve found it to be a great activity while flying or riding in the car, so I might still dabble.  That crazy urge to get decent, however, seems to have been satiated. </p>
<h2>A note about the pattern</h2>
<p>For the fair isle pattern I was all proud of using various tricks in mspaint to make it. Then I discovered this method by Becky Stern:</p>
<p><iframe src="http://blip.tv/play/gZIvq4wYAg.html?p=1" width="450" height="258" frameborder="0" allowfullscreen></iframe><embed type="application/x-shockwave-flash" src="http://a.blip.tv/api.swf#gZIvq4wYAg" style="display:none"></embed></p>
<p>It&#8217;s embarassingly better than my mspaint crap.  For the double-knit pattern I used her method.  One thing I did differently was to use 10&#215;6 pixel rectangles instead of squares.  I had found during a test swatch that my stitches were Wider than they were tall.  This modified grid ensured that the knit pattern would carry correctly.</p>
<p class="wp-flattr-button"></p> <p><a href="http://brettbeauregard.com/blog/?flattrss_redirect&amp;id=2010&amp;md5=e7d056dcc90561f15b5b1a4ee46811e3" title="Flattr" target="_blank"><img src="http://brettbeauregard.com/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/brettbeauregard/vayj/~4/6PokHT9oevQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettbeauregard.com/blog/2012/03/knitting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Arduino PID Autotune Library</title>
		<link>http://brettbeauregard.com/blog/2012/01/arduino-pid-autotune-library/</link>
		<comments>http://brettbeauregard.com/blog/2012/01/arduino-pid-autotune-library/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 18:41:56 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[PID]]></category>
		<category><![CDATA[Autotune]]></category>
		<category><![CDATA[osPID]]></category>

		<guid isPermaLink="false">http://brettbeauregard.com/blog/?p=1893</guid>
		<description><![CDATA[At long last, I've released an Autotune Library to compliment the Arduino PID Library. When I released the current version of the PID Library, I did an insanely extensive series of posts to get people comfortable with what was going on inside. 

While not nearly as in-depth, that's the goal of this post.  ...]]></description>
			<content:encoded><![CDATA[<p>At long last, I&#8217;ve released an <a href="http://arduino.cc/playground/Code/PIDAutotuneLibrary">Autotune Library</a> to compliment the <a href="http://arduino.cc/playground/Code/PIDLibrary">Arduino PID Library</a>. When I released the current version of the PID Library, I did an insanely extensive <a href="http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/">series of posts</a> to get people comfortable with what was going on inside. </p>
<p>While not nearly as in-depth, that&#8217;s the goal of this post.  I&#8217;ll explain what the Autotune Library is trying to accomplish, and how it goes about its business.</p>
<h3> Attribution </h3>
<p>For A couple years I&#8217;ve wanted to have an Autotune Library, but due to an agreement with my employer, I wasn&#8217;t able to write one.  BUT! when I found the <a href="http://www.mathworks.com/matlabcentral/fileexchange/4652-autotunerpid-toolkit">AutotunerPID Toolkit</a> by William Spinelli I was good to go; My company had no problem with me porting and augmenting and existing open source project. </p>
<p>I converted the code from matlab, made some tweaks to the peak identification code, and switched it from the Standard form (Kc, Ti, Td) to the Ideal form (Kp, Ki, Kd.)  Other than that, all credit goes to Mr. Spinelli.</p>
<h3>The Theory</h3>
<p>The best tuning parameters (Kp, Ki, Kd,) for a PID controller are going to depend on what that controller is driving.  The best tunings for a toaster oven are going to be different than the best tunings for a sous-vide cooker.</p>
<p>Autotuners attempt to figure out the nature of what the controller is driving, then back-calculate tuning parameters from that.  There are various methods of doing this, but most involve changing the PID Output in some way then observing how the Input responds.  </p>
<p>The method used in the library is known as the relay method. here&#8217;s how it works:</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/00-ideal.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/00-ideal.png" alt="" title="00-ideal" width="451" height="453" class="alignnone size-full wp-image-1964" /></a></p>
<p>Starting at steady state (both Input and Output are steady,) the Output is stepped in one direction by some distance D. When the Input crosses a trigger line, the output changes to the other direction by distance D.  </p>
<p>By analyzing how far apart the peaks are, and how big they are in relation to the output changes, the Autotuner can tell the difference between one type of process and another.  As a result, different systems will get custom tuning parameters:</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/01-Correlations.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/01-Correlations.png" alt="" title="01-Correlations" width="399" height="81" class="aligncenter size-full wp-image-1966" /></a></p>
<h2>The Implementation</h2>
<p>  This works well in theory, but real-world data isn&#8217;t very cooperative.  The input signal is usually noisy, which causes two main problems.</p>
<h3>Problem #1: When to step?</h3>
<p> Since a noisy signal is choppy, it&#8217;s likely that the trigger line will be crossed several times as the Input moves past it.  This can cause mild chatter in the output, or if severe, can completely destroy things:</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/02-noise.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/02-noise.png" alt="" title="02-noise" width="450" height="453" class="aligncenter size-full wp-image-1970" /></a><br />
The way I chose to side-step this issue was to have the user specify a noise band.  In effect, this creates two trigger lines.  Since the distance between them is equal to the noise (if properly set) it&#8217;s less likely that multiple crossings will occur due to signal chatter.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/03-noise-fixed.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/03-noise-fixed.png" alt="" title="03-noise fixed" width="451" height="453" class="aligncenter size-full wp-image-1971" /></a></p>
<h3> Problem #2: Peak Identification</h3>
<p>In a simulated world, identifying the peaks is easy: when the Input signal changes direction, that&#8217;s a minimum or a maximum (depending an which change occured.)  In a noisy world however,  this method fails:</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/04-peakID.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/04-peakID.png" alt="" title="04-peakID" width="451" height="289" class="aligncenter size-full wp-image-1978" /></a></p>
<p>Every noise blip is a direction change.  To deal with this issue I added a &#8220;look-back time&#8221; parameter.  It&#8217;s an awful name.  If you can think of something better let me know.</p>
<p>At any rate, the user defines some window, say 10 seconds.  The Library then compares the current point to the last ten seconds of data.  If it is a min or a max, it gets flagged as a possible peak.</p>
<p>When the flagged point switches from being a max to a min, or vice versa, the previously flagged point is confirmed as a peak.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/05-peakIDfixed.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/05-peakIDfixed.png" alt="" title="05-peakIDfixed" width="451" height="289" class="aligncenter size-full wp-image-1979" /></a></p>
<p>Another way of explaining the look-back time is that a point will be identified as a peak if it is the largest (or smallest) value within one look-back into the future or past. Like I said: awful name.</p>
<h2> You should also know&#8230; </h2>
<ul>
<li>The number of cycles performed will vary between 3 and 10.  The algorithm waits until the last 3 maxima have been within 5% of each other.  This is trying to ensure that we&#8217;ve reached a stable oscillation and there&#8217;s no external strangeness happening.  This leads me to&#8230;
</li>
<li>I&#8217;m not the biggest fan of Autotune.  I&#8217;ve often said, and still believe, that a moderately trained person will beat an Autotuner every day of the week.  There&#8217;s just so much that can go wrong without the algorithm knowing about it.  That being said, Autotune is a valuable tool to help the novice get into the ballpark.
</li>
</ul>
<p class="wp-flattr-button"></p> <p><a href="http://brettbeauregard.com/blog/?flattrss_redirect&amp;id=1893&amp;md5=26a154e2b209e4289ebb93e9e425e3a7" title="Flattr" target="_blank"><img src="http://brettbeauregard.com/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/brettbeauregard/vayj/~4/NQG_4yxAjUM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettbeauregard.com/blog/2012/01/arduino-pid-autotune-library/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Collapsible Knitting Needle</title>
		<link>http://brettbeauregard.com/blog/2012/01/collapsible-knitting-needle/</link>
		<comments>http://brettbeauregard.com/blog/2012/01/collapsible-knitting-needle/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 00:34:22 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Craft]]></category>
		<category><![CDATA[Mechanical]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[kntting]]></category>

		<guid isPermaLink="false">http://brettbeauregard.com/blog/?p=1895</guid>
		<description><![CDATA[I needed a break. I've been working hard on the osPID for several months, and I just needed to not look at code or control algorithms for a little bit. Nothing says "break" like an out-of-left-field project.


I only started knitting recently. Something that's been bothering me about it is the length of the needles. ...]]></description>
			<content:encoded><![CDATA[<p>I needed a break. I&#8217;ve been working hard on the <a href="http://www.ospid.com/blog/">osPID</a> for several months, and I just needed to not look at code or control algorithms for a little bit. Nothing says &#8220;break&#8221; like an out-of-left-field project.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/collapsed.png"><img class="alignnone size-full wp-image-1949" title="collapsed" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/collapsed.png" alt="" width="450" height="337" /></a><br />
I only started knitting recently. Something that&#8217;s been bothering me about it is the length of the needles. They&#8217;re 14&#8243; long, and I&#8217;ve been worried they&#8217;ll be bent while riding in my backpack.</p>
<p>It occurred to me that some sort of collapsible needle might be useful in this situation. Taking my inspiration from elastic tent poles, I got to work on my &#8220;not PID&#8221; project.</p>
<h2>construction</h2>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-11.10.211.jpg"><img title="Cutting" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-11.10.211-1024x768.jpg" alt="" width="225" height="169" /></a><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-11.16.33.jpg"><img title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-11.16.33-1024x768.jpg" alt="" width="225" height="169" /></a><br />
<a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-11.19.59.jpg"><img class="alignnone size-large wp-image-1925" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-11.19.59-1024x768.jpg" alt="" width="225" height="169" /></a><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-11.31.08.jpg"><img class="alignnone size-large wp-image-1926" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-11.31.08-1024x768.jpg" alt="" width="225" height="169" /></a><br />
The first thing to do was cut the needles in half. I used a pipe cutter for a nice clean cut, then cleaned up the seam with a drill.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.02.54.jpg"><img class="alignnone size-large wp-image-1932" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.02.54-1024x768.jpg" alt="" width="450" height="337" /></a><br />
With the needles prepped, I then used a lathe to make the supporting inserts.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.15.15.jpg"><img class="alignnone size-large wp-image-1931" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.15.15-1024x768.jpg" alt="" width="450" height="337" /></a><br />
I didn&#8217;t quite get the diameter of the inserts right, so I touched things up at the sanding station.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.27.05.jpg"><img class="alignnone size-large wp-image-1935" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.27.05-1024x768.jpg" alt="" width="225" height="168" /></a><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.29.14.jpg"><img class="alignnone size-large wp-image-1936" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.29.14-1024x768.jpg" alt="" width="225" height="168" /></a><br />
<a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.32.35.jpg"><img class="alignnone size-large wp-image-1937" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.32.35-1024x768.jpg" alt="" width="225" height="168" /></a><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.43.13.jpg"><img class="alignnone size-large wp-image-1938" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.43.13-1024x768.jpg" alt="" width="225" height="168" /></a><br />
To get some decent springiness, I looped 3 rubber bands together, then doubled that over. This was pulled through the insert and locked in place with a piece of paperclip. I then super-glued the insert into the pointed half of the needle.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.37.12.jpg"><img class="alignnone size-medium wp-image-1941" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.37.12-300x225.jpg" alt="" width="225" height="168" /></a><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.46.50.jpg"><img class="alignnone size-medium wp-image-1945" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.46.50-300x225.jpg" alt="" width="225" height="168" /></a><br />
<a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.49.13.jpg"><img class="alignnone size-medium wp-image-1944" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.49.13-300x225.jpg" alt="" width="225" height="168" /></a><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.50.17.jpg"><img class="alignnone size-medium wp-image-1942" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/2012-01-22-12.50.17-300x225.jpg" alt="" width="225" height="168" /></a><br />
The last thing to do was anchor the other end of the rubber bands in a hole drilled in the cap.</p>
<h2>Results</h2>
<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/kQLO0OnxC_w?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/kQLO0OnxC_w?version=3&amp;hl=en_US" allowFullScreen="true" allowscriptaccess="always" allowfullscreen="true" /></object><br />
<a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/summary.jpg"><img class="aligncenter size-large wp-image-1908" title="SAMSUNG" src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/summary-1024x255.jpg" alt="" width="450" height="112" /></a><br />
I&#8217;m really happy with how these turned out. The weight increase was negligible, and the seam is almost invisible. It puts a slight drag on the yarn, but nothing major, and I haven&#8217;t had any hangs yet.  Also, because the halves are connected, you can fold the needle with your knitting on it, without worrying that things are going to fall off.</p>
<p class="wp-flattr-button"></p> <p><a href="http://brettbeauregard.com/blog/?flattrss_redirect&amp;id=1895&amp;md5=9056d047d1e4227deba17e1a7d9d1c5a" title="Flattr" target="_blank"><img src="http://brettbeauregard.com/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/brettbeauregard/vayj/~4/AC4RpJl6jrM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettbeauregard.com/blog/2012/01/collapsible-knitting-needle/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>PID-Controlled Espresso Machine [PID Showcase]</title>
		<link>http://brettbeauregard.com/blog/2012/01/pid-controlled-espresso-machine-pid-showcase/</link>
		<comments>http://brettbeauregard.com/blog/2012/01/pid-controlled-espresso-machine-pid-showcase/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 02:50:10 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[PID]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://brettbeauregard.com/blog/?p=1896</guid>
		<description><![CDATA[It is to my great delight that I can confirm that this Kick-ass, Kickstarting, Open Source Espresso Machine is using the Arduino PID Library.



They seem to be using a stand-alone commercial pid controller for at least some of the control.  Perhaps this could be replaced with an osPID for a 100% open experience?]]></description>
			<content:encoded><![CDATA[<p>It is to my great delight that I can confirm that this Kick-ass, <a href="http://www.kickstarter.com/projects/zpmespresso/pid-controlled-espresso-machine?ref=live">Kickstarting</a>, Open Source Espresso Machine is using the Arduino PID Library.</p>
<p><iframe frameborder="0" height="410px" src="http://www.kickstarter.com/projects/zpmespresso/pid-controlled-espresso-machine/widget/video.html" width="480px"></iframe></p>
<p>They seem to be using a stand-alone commercial pid controller for at least some of the control.  Perhaps this could be replaced with an <a href="http://www.ospid.com/blog/">osPID</a> for a 100% open experience?</p>
<p class="wp-flattr-button"></p> <p><a href="http://brettbeauregard.com/blog/?flattrss_redirect&amp;id=1896&amp;md5=8604df3953a0569b4b3ba33059559ac4" title="Flattr" target="_blank"><img src="http://brettbeauregard.com/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/brettbeauregard/vayj/~4/4N6PQA6fKwU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettbeauregard.com/blog/2012/01/pid-controlled-espresso-machine-pid-showcase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing the osPID</title>
		<link>http://brettbeauregard.com/blog/2012/01/introducing-the-ospid/</link>
		<comments>http://brettbeauregard.com/blog/2012/01/introducing-the-ospid/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 21:23:08 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Electronic]]></category>
		<category><![CDATA[PID]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[osPID]]></category>

		<guid isPermaLink="false">http://brettbeauregard.com/blog/?p=1861</guid>
		<description><![CDATA[

About 5 months ago I sent an out-of-the-blue email to RocketScream electronics asking if they wanted to help me build an open source PID controller.  It's been far more challenging than I expected, but today I get to announce the release of my first open source hardware project: the osPID!

(pause for applause)

The goal ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/DEV-00042-ASSEMBLED-INPUT-SIDE.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2012/01/DEV-00042-ASSEMBLED-INPUT-SIDE.jpg" alt="" title="DEV-00042-ASSEMBLED-INPUT-SIDE" width="450" height="301" class="aligncenter size-full wp-image-1874" /></a></p>
<p>About 5 months ago I sent an out-of-the-blue email to RocketScream electronics asking if they wanted to help me build an open source PID controller.  It&#8217;s been far more challenging than I expected, but today I get to announce the release of my first open source hardware project: the osPID!</p>
<p>(pause for applause)</p>
<p>The goal was to make an open equivalent to the PID controllers you can currently buy.  To do this we combined the Arduino, my PID library, some open-source auto-tune code, and RocketScream&#8217;s <a href="http://www.rocketscream.com/shop/reflow-oven-controller-shield-arduino-compatible">Reflow Oven Controller Shield</a>.</p>
<p><strong>In some areas we fell short:</strong>  The case, for example, isn&#8217;t nema rated.  If this thing becomes popular however, there&#8217;s no reason we couldn&#8217;t fix that.</p>
<p><strong>In some areas we hit our mark:</strong> form factor, interchangable I/O cards, Autotune, onboard user interface.</p>
<p><strong>&#8230;And in some cases we hit out of the park:</strong> It has a java trending/configuration Application, and it costs&#8230; wait for it&#8230; <a href=" http://www.rocketscream.com/shop/ospid-kit">$85</a>.</p>
<p>I&#8217;m really proud of the work we&#8217;ve done, and there&#8217;s more to come.  Let me leave you with some videos I created to help introduce this release.</p>
<p>Beginner:<br />
<object width="450" height="253"><param name="movie" value="http://www.youtube.com/v/3UONZ0Q_B2k?version=3&amp;hl=en_US&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/3UONZ0Q_B2k?version=3&amp;hl=en_US&amp;hd=1" type="application/x-shockwave-flash" width="450" height="253" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Intermediate:<br />
<object width="450" height="253"><param name="movie" value="http://www.youtube.com/v/B2oPBSl4aSA?version=3&amp;hl=en_US&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/B2oPBSl4aSA?version=3&amp;hl=en_US&amp;hd=1" type="application/x-shockwave-flash" width="450" height="253" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Hacker:<br />
<object width="450" height="253"><param name="movie" value="http://www.youtube.com/v/n768MXEESUo?version=3&amp;hl=en_US&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/n768MXEESUo?version=3&amp;hl=en_US&amp;hd=1" type="application/x-shockwave-flash" width="450" height="253" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>For more information check out the (slightly rough) website we&#8217;ve created at <a href="http://www.ospid.com/blog/">osPID.com/blog</a>.</p>
<p>Enjoy!</p>
<p class="wp-flattr-button"></p> <p><a href="http://brettbeauregard.com/blog/?flattrss_redirect&amp;id=1861&amp;md5=46a0891666d5f5e29019d378b89a2be2" title="Flattr" target="_blank"><img src="http://brettbeauregard.com/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/brettbeauregard/vayj/~4/dFTJWH3bHb8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettbeauregard.com/blog/2012/01/introducing-the-ospid/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>PID Library moved to GitHub</title>
		<link>http://brettbeauregard.com/blog/2011/12/pid-library-moved-to-github/</link>
		<comments>http://brettbeauregard.com/blog/2011/12/pid-library-moved-to-github/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 12:53:38 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[PID]]></category>
		<category><![CDATA[Arduino]]></category>

		<guid isPermaLink="false">http://brettbeauregard.com/blog/?p=1854</guid>
		<description><![CDATA[

As per the request by the Arduino Team, I've moved the Arduino PID Library to GitHub.  I've also used this opportunity to:

	Make the Library Arduino 1.0 compliant
	Release the Library under a GPLv3 License


The google code site will still be there, but there will no longer be updates.]]></description>
			<content:encoded><![CDATA[<p><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/12/github-300x300.png" alt="" title="github" width="300" height="300" class="aligncenter size-medium wp-image-1855" /></p>
<p>As per the request by the Arduino Team, I&#8217;ve moved the Arduino PID Library to <a href="https://github.com/br3ttb/Arduino-PID-Library/">GitHub</a>.  I&#8217;ve also used this opportunity to:</p>
<ul>
<li>Make the Library Arduino 1.0 compliant</li>
<li>Release the Library under a GPLv3 License</li>
</ul>
<p>The <a href="http://code.google.com/p/arduino-pid-library/">google code site</a> will still be there, but there will no longer be updates.</p>
<p class="wp-flattr-button"></p> <p><a href="http://brettbeauregard.com/blog/?flattrss_redirect&amp;id=1854&amp;md5=46120f3754dc60da62c5e9aad890d1c5" title="Flattr" target="_blank"><img src="http://brettbeauregard.com/blog/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p><img src="http://feeds.feedburner.com/~r/brettbeauregard/vayj/~4/NJ6-bdBkJVM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettbeauregard.com/blog/2011/12/pid-library-moved-to-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Proper Multi-Color Print</title>
		<link>http://brettbeauregard.com/blog/2011/10/a-proper-multi-color-print/</link>
		<comments>http://brettbeauregard.com/blog/2011/10/a-proper-multi-color-print/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 20:35:18 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Mechanical]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Makerbot]]></category>

		<guid isPermaLink="false">http://brettbeauregard.com/blog/?p=1789</guid>
		<description><![CDATA[I've played around with printing multiple colors using a single extruder, but by and large all the multi-color action was restricted to a single layer.  There's a good reason for this:  every color change takes time, and having 2 or more colors run throughout the part would require a color change ON ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve <a href="http://brettbeauregard.com/blog/2011/09/three-color-3d-print/">played</a> <a href="http://www.thingiverse.com/thing:12182">around</a> with printing multiple colors using a single extruder, but by and large all the multi-color action was restricted to a single layer.  There&#8217;s a good reason for this:  every color change takes time, and having 2 or more colors run throughout the part would require a color change ON EVERY LAYER.</p>
<p>But I had to try.  I had a great idea: a fairly understated bottle opener with different color text embedded on each side.  To the uninitiated it&#8217;s a neat little thing, but to people who know 3D printing its a: &#8220;wait, what?  how did you do that?&#8221;</p>
<p>Well, here&#8217;s &#8220;how I did that.&#8221;  It took a LOT of time.  I didn&#8217;t call it &#8220;The Saturday Killer&#8221; for nothing.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/hell-expanded.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/hell-expanded.png" alt="" title="hell-expanded" width="450" height="369" class="aligncenter size-full wp-image-1792" /></a></p>
<h3>The Basic Idea:</h3>
<p>Create a bottle opener with some multi-color text on the side.  I chose a reference to the <a href="http://www.youtube.com/watch?v=hUVwR0rw5fk">classic Simpsons line</a>:  &#8220;Beer.  Cause Of.  Solution To. Problems.&#8221;  I knew it would be a complicated task, but it turned out to be even more complicated than I thought.</p>
<h3>Step 1:  Generate a separate STL for each color</h3>
<p>Having already <a href="http://www.thingiverse.com/thing:12348">created the opener</a> in OpenSCAD, this step was straight-forward.  Position text on the sides (more on the font later,) </p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/raw.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/raw.png" alt="" title="raw" width="450" height="320" class="alignright size-full wp-image-1797" /></a></p>
<p>&#8230;use the Difference Command to create an opener with word holes,</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/body.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/body.png" alt="" title="body" width="450" height="320" class="aligncenter size-full wp-image-1794" /></a></p>
<p>&#8230;and use the intersection command to get a text object to fill each of those holes.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/colors.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/colors.png" alt="" title="colors" width="450" height="320" class="aligncenter size-full wp-image-1795" /></a></p>
<h3>Step 2:  Split each STL into printable segments</h3>
<p>For the different colors to dovetail correctly, they can only be printed 2 layers at a time.  To split the objects from step 1 into two-layer slices I used the difference command to remove all but a 2 layer section.<br />
<a href="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/slice1.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/slice1.png" alt="" title="slice1" width="450" height="320" class="alignright size-full wp-image-1800" /></a><br />
<a href="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/slice2.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/slice2.png" alt="" title="slice2" width="450" height="320" class="alignright size-full wp-image-1801" /></a><br />
I then Generated an STL, moved the cubes, and repeated until I had all my slices.</p>
<h3>Step 3: !#@$%@#$:  Realize that this is way more complicated than you first thought.</h3>
<p>Because you&#8217;re interlacing two or more STLs, how things are skeined becomes really important.  If you&#8217;ve got a curve in the Z direction, or a transition that happens within a layer, things may skein one way for one color, but in a different way for the mating color.  </p>
<p>So I needed to do a LOT more work, mainly on the text.  I tried using a <a href="http://www.thingiverse.com/thing:6844">stock thingiverse font</a> at first, but all the rounded corners were a killer, and I couldn&#8217;t get it to size correctly to an even number of layers. So I rolled my own:<br />
<a href="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/textclose.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/textclose.png" alt="" title="textclose" width="450" height="320" class="alignright size-full wp-image-1803" /></a><br />
If you look closely you&#8217;ll see that the text is blocky.  This was done to confuse Skeinforge a little as possible.  There are no diagonals or curves anywhere, and all transitions and openings take into account the layer thickness, as well as the width of the extrusion. This way there&#8217;s less confusion about how much plastic goes where, and the different colors are more likely to dovetail correctly.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/textpath.png"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/textpath.png" alt="" title="textpath" width="357" height="177" class="aligncenter size-full wp-image-1804" /></a></p>
<p>Another thing that I added was a solid bar behind all the text.  This caused the tool path to be much more continuous, resulting in nice, smooth letters.</p>
<h3>Step 4: Actually Print</h3>
<p>Now that all these parts were created they just needed to be printed out sequentially, with the Z-offset being adjusted at the appropriate time.  My main aha moment during this process was that you need to turn off raft when skeining all but the first print, otherwise you get way too much plastic laid down.  </p>
<p>I -of course- learned this the hard way. I first tried printing 4 openers at a time, and by the time I got to the middle of the opener there was so much plastic that the extruder started to catch leading to misalignment.</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/failure.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/failure-1024x614.jpg" alt="" title="SAMSUNG" width="450" height="270" class="aligncenter size-large wp-image-1808" /></a></p>
<p>I scrapped that print and started printing a single opener, realizing the raft thing just after I started.  The results were much better:</p>
<p><object width="400" height="300"><param name="flashvars" value="offsite=true&#038;lang=en-us&#038;page_show_url=%2Fphotos%2F38917611%40N08%2Fsets%2F72157627783358031%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2F38917611%40N08%2Fsets%2F72157627783358031%2F&#038;set_id=72157627783358031&#038;jump_to="></param><param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=107931"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=107931" allowFullScreen="true" flashvars="offsite=true&#038;lang=en-us&#038;page_show_url=%2Fphotos%2F38917611%40N08%2Fsets%2F72157627783358031%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2F38917611%40N08%2Fsets%2F72157627783358031%2F&#038;set_id=72157627783358031&#038;jump_to=" width="400" height="300"></embed></object></p>
<h3>Step 5: Enjoy</h3>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/enjoy.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/10/enjoy-1024x614.jpg" alt="" title="SAMSUNG" width="450" height="269" class="aligncenter size-large wp-image-1823" /></a></p>
<p>I&#8217;m really proud of this thing, but I spent WAY too much time creating it.  Hopefully this quick post did a good-enough job of explaining the process.  I wanted to share this project, but for my sanity I just need to be DONE.</p>
<p>opener: <a href="http://www.thingiverse.com/thing:12592">http://www.thingiverse.com/thing:12592</a><br />
font: <a href="http://thingiverse.com/thing:12618">http://thingiverse.com/thing:12618</a></p>
<p class="wp-flattr-button"></p><img src="http://feeds.feedburner.com/~r/brettbeauregard/vayj/~4/9yhwmMw3B9U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettbeauregard.com/blog/2011/10/a-proper-multi-color-print/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Three-Color 3D Print</title>
		<link>http://brettbeauregard.com/blog/2011/09/three-color-3d-print/</link>
		<comments>http://brettbeauregard.com/blog/2011/09/three-color-3d-print/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 16:30:41 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Mechanical]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Makerbot]]></category>

		<guid isPermaLink="false">http://brettbeauregard.com/blog/?p=1763</guid>
		<description><![CDATA[I've been making bottle openers for friends, and I recently struck upon the perfect design for my friend Matt.  For some reason, he still pines for a hockey team that left our home state in 1997 (THEN won the Stanley Cup.) His opener got a Whalers Logo:



Up to this point, all my openers ...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been <a href="http://brettbeauregard.com/blog/2011/09/making-a-custom-bottle-opener/">making bottle openers</a> for friends, and I recently struck upon the perfect design for my friend Matt.  For some reason, he still pines for a hockey team that left our home state in 1997 (THEN won the Stanley Cup.) His opener got a Whalers Logo:</p>
<p><a href="http://brettbeauregard.com/blog/wp-content/uploads/2011/09/whalers.jpg"><img src="http://brettbeauregard.com/blog/wp-content/uploads/2011/09/whalers-1024x614.jpg" alt="" title="whalers" width="450" height="270" class="aligncenter size-large wp-image-1771" /></a></p>
<p>Up to this point, all my openers have been single color.  But combine the fact that I&#8217;m jealous of the new <a href="http://www.makerbot.com/blog/2011/09/20/the-possibilities-of-dual-extrusion/">dual extruder</a> with the fact that Matt was my <em>Best Man</em>, and I decided that this time I would go the extra mile.</p>
<p>The procedure was straight-forward, and a huge pain in the butt:</p>
<ul>
<li>First I printed a blank opener in the base color</li>
<li>Then I adjusted the Z-Height of the Thingomatic by 5.76mm (the height of the opener base)</li>
<li>When I switched the color to blue and printed the tail, the printer deposited the plastic on the white base as if it were the build platform</li>
<li>After switching colors AGAIN, I printed the W and the opener was done</li>
</ul>
<p>This was a fairly simple multi-color design, but by breaking up the model ahead of time, this technique could be used for any part.</p>
<p class="wp-flattr-button"></p><img src="http://feeds.feedburner.com/~r/brettbeauregard/vayj/~4/hmpTVmj7hPw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brettbeauregard.com/blog/2011/09/three-color-3d-print/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

