<?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>Ben J Scott.com</title>
	<atom:link href="http://www.benjscott.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benjscott.com</link>
	<description>... Prototyping A Better Tomorrow</description>
	<lastBuildDate>Wed, 20 Jul 2011 23:22:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Be Your Own Souvenir &#8211; Hey, I had that idea!</title>
		<link>http://www.benjscott.com/2011/05/be-your-own-souvenir-hey-i-had-that-idea/</link>
		<comments>http://www.benjscott.com/2011/05/be-your-own-souvenir-hey-i-had-that-idea/#comments</comments>
		<pubDate>Sat, 21 May 2011 02:46:16 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benjscott.com/?p=526</guid>
		<description><![CDATA[
A while ago I had an idea that goes roughly like this: you open a shop in some location with lots of tourists &#8211; maybe in the Mall of America or in a place like Estes Park, CO &#8211; the type of place where people are in a spending mood and have those cheesey &#8220;Old-Timey [...]]]></description>
			<content:encoded><![CDATA[<div style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; font: normal normal normal 13px/19px Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-family: 'Times New Roman'; line-height: normal; font-size: medium; padding: 0.6em; margin: 0px;">
<p>A while ago I had an idea that goes roughly like this: you open a shop in some location with lots of tourists &#8211; maybe in the Mall of America or in a place like Estes Park, CO &#8211; the type of place where people are in a spending mood and have those cheesey &#8220;Old-Timey Photos&#8221; taken.  In this shop visitors could pose to have a statue of them made. You&#8217;d scan them with some sort of 3D scanner and then a custom 3D CNC mill would carve a wooden statue of them while they watch (behind some safety glass). Your setup might even have software that allows them to puff-up their muscles like a super hero, maybe make their belly look a bit more six-pack-ish, make balds spots disappear and so on.   You might sell the small statues fairly cheap, but charge a lot more for large, living room fixture-type statues.  What mother wouldn&#8217;t want some little wood-carved statues of her children for the mantle?  It&#8217;s a slam dunk.</p>
<p><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/05/statue-crop1.png"><img class="alignnone size-medium wp-image-534" title="statue-crop1" src="http://www.benjscott.com/wp/wp-content/uploads/2011/05/statue-crop1-293x300.png" alt="statue-crop1" width="293" height="300" /></a><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/05/statue-crop2.png"><img class="alignnone size-medium wp-image-535" title="statue-crop2" src="http://www.benjscott.com/wp/wp-content/uploads/2011/05/statue-crop2-300x194.png" alt="statue-crop2" width="300" height="194" /></a><br />
<span id="more-526"></span></p>
<p>I first documented this idea back in late 2009.  I did some research into off-the-shelf 3D scanning technologies(expensive!), 3D printing (expensive!), and 3D CNC technologies (expensive!).   I looked at a few college projects for simple 3D scanners that had been posted online, I developed plans for pseudo-3D by combining DIY CNC with a lathe.  Because most of this stuff is so far outside my areas of expertise (and also because most of the people I told the idea to seemed to think it was kind of lame) I gave the idea a fairly low priority &#8211; so far all I&#8217;ve done with it is bookmark a lot of web pages and make a lot of sketches.</p>
<p>Then the other day I stumbled on this video. Basically it&#8217;s my idea brought to life.<br />
<iframe src="http://player.vimeo.com/video/21676294?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0"></iframe>
<p><a href="http://vimeo.com/21676294" onclick="pageTracker._trackPageview('/outgoing/vimeo.com/21676294?referer=');">Be Your Own Souvenir!</a> from <a href="http://vimeo.com/user1363263" onclick="pageTracker._trackPageview('/outgoing/vimeo.com/user1363263?referer=');">blablabLAB</a> on <a href="http://vimeo.com" onclick="pageTracker._trackPageview('/outgoing/vimeo.com?referer=');">Vimeo</a>.</p>
<p>So here&#8217;s the thing about ideas. Everyone has ideas. With billions of people on the planet it&#8217;s inevitable that for any half-way decent idea, thousands of people will come up with it independently.  But for some reason that&#8217;s not the way we prefer to think about ideas &#8211; Edison alone invented the lightbulb (not really true), Bell alone invented the telephone (also not true), only one person can have an idea and everyone else is a copycat.  </p>
<p>The funny thing is, the truly difficult part of any idea is making it happen.  An idea doesn&#8217;t just turn into a prototype, it takes a lot of time, perseverance, and hard work.  So my hat is off to the guys at blablabLAB for making this idea happen.  But not so much for the idea itself, any jackass could have come up with that.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.benjscott.com/2011/05/be-your-own-souvenir-hey-i-had-that-idea/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Artscii 0.3.0 Released</title>
		<link>http://www.benjscott.com/2011/05/artscii-0-3-0-released/</link>
		<comments>http://www.benjscott.com/2011/05/artscii-0-3-0-released/#comments</comments>
		<pubDate>Mon, 09 May 2011 22:04:37 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benjscott.com/?p=489</guid>
		<description><![CDATA[I&#8217;ve updated artscii &#8211; now faster, with fewer bugs and more features.  Get the new version here.


New features:

Much faster.
Color!
You can select multiple font sizes, up to 500 pt &#8211; which is crazy (note that larger fonts take longer to analyze)
Artscii can convert images to black + white on the fly.
Option to invert &#8211; white [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated artscii &#8211; now faster, with fewer bugs and more features.  Get the new version <a href="http://www.benjscott.com/artscii/">here</a>.</p>
<div id="attachment_490" class="wp-caption aligncenter" style="width: 222px"><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/05/scream-alphabet-Alba.png"><img class="size-medium wp-image-490" title="scream-alphabet-Alba" src="http://www.benjscott.com/wp/wp-content/uploads/2011/05/scream-alphabet-Alba-212x300.png" alt="scream-alphabet-Alba" width="212" height="300" /></a><p class="wp-caption-text">OMG! A new version of Artscii already!</p></div>
<p style="text-align: center;">
<p><span id="more-489"></span><br />
New features:</p>
<ul>
<li>Much faster.</li>
<li>Color!</li>
<li>You can select multiple font sizes, up to 500 pt &#8211; which is crazy (note that larger fonts take longer to analyze)</li>
<li>Artscii can convert images to black + white on the fly.</li>
<li>Option to invert &#8211; white fonts on a black background instead of black on white (see starry night below)</li>
<li>Dithering!  It only *kind of* works at this point, but it&#8217;s in there.</li>
<li>Tool Tips &#8211; hold mouse over confusing features for a (still probably confusing) explanation of what they do.</li>
<li>A Replay Button &#8211; Mildly pointless but fun to watch, it plays back the placing of letters at high speed.
<li>Run artscii from the command-line.  This feature is very limited and possibly even a little buggy, but just run artscii with the path of an image and it will process it with some default settings, save the result as [filename].artscii.png, and exit automatically.  I used this with some scripting to create the video below</li>
</ul>
<p>Some new eye-candy:</p>
<div id="attachment_491" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/05/starry-night-inverse-RMS.png"><img class="size-medium wp-image-491" title="starry-night-inverse-RMS" src="http://www.benjscott.com/wp/wp-content/uploads/2011/05/starry-night-inverse-RMS-300x245.png" alt="Inverted - white letters on black background" width="300" height="245" /></a><p class="wp-caption-text">Starry Night Inverted - white letters on black background</p></div>
<div id="attachment_504" class="wp-caption aligncenter" style="width: 209px"><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/05/wedding-hearts.png"><img class="size-medium wp-image-504" title="wedding-hearts" src="http://www.benjscott.com/wp/wp-content/uploads/2011/05/wedding-hearts-199x300.png" alt="wedding-hearts" width="199" height="300" /></a><p class="wp-caption-text">Barely even seems like ASCII art.</p></div>
<div align="center"<br />
<iframe width="425" height="349" src="http://www.youtube.com/embed/RHnUYNYd0h0" frameborder="0" allowfullscreen></iframe>
</div>
<p><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/05/wedding-hearts.png"></a>Some features still to come (maybe).</p>
<ul>
<li>words and phrases</li>
<li>overlapping letters</li>
<li>More control &#8211; advanced options for selecting which letters in which fonts in which sizes.</li>
<li>option for letters to go outside the frame (hard to explain&#8230; you&#8217;ll see what I mean)</li>
<li>Better dithering</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.benjscott.com/2011/05/artscii-0-3-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ARTSCII &#8211; A Completely Different Take on ASCII Art</title>
		<link>http://www.benjscott.com/2011/04/artscii/</link>
		<comments>http://www.benjscott.com/2011/04/artscii/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 16:41:33 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benjscott.com/?p=416</guid>
		<description><![CDATA[A picture is worth a thousand letters:

Here&#8217;s a little something I&#8217;ve been working on, a program I call &#8220;ARTSCII&#8221;.
You can download ARTSCII here. (Windows only for now, sorry)
It&#8217;s different from normal ASCII art in a similar way to how my collage software is different from regular photo mosaics.   I went at the problem from a completely different [...]]]></description>
			<content:encoded><![CDATA[<p>A picture is worth a thousand letters:</p>
<p><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/ben-bike-artscii-artistic.png"><img style="display: block; margin-left: auto; margin-right: auto; border: 0px initial initial;" title="ben-bike-artscii-artistic" src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/ben-bike-artscii-artistic-300x284.png" alt="ben-bike-artscii-artistic" width="300" height="284" /></a></p>
<div>Here&#8217;s a little something I&#8217;ve been working on, a program I call &#8220;ARTSCII&#8221;.</p>
<p>You can download <a href="http://www.benjscott.com/artscii/">ARTSCII here</a>. (Windows only for now, sorry)</div>
<div>It&#8217;s different from <a href="http://www.google.com/search?q=ascii+art&amp;hl=en&amp;prmd=ivns&amp;source=lnms&amp;tbm=isch&amp;ei=jcmwTdz0EcO2tgfy9aSHDA&amp;sa=X&amp;oi=mode_link&amp;ct=mode&amp;cd=2&amp;ved=0CBYQ_AUoAQ&amp;biw=1376&amp;bih=1010" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?q=ascii+art_amp_hl=en_amp_prmd=ivns_amp_source=lnms_amp_tbm=isch_amp_ei=jcmwTdz0EcO2tgfy9aSHDA_amp_sa=X_amp_oi=mode_link_amp_ct=mode_amp_cd=2_amp_ved=0CBYQ_AUoAQ_amp_biw=1376_amp_bih=1010&amp;referer=');">normal ASCII art</a> in a similar way to how <a href="http://www.benjscott.com/2011/03/collages/" target="_blank">my</a> <a href="http://www.benandalonna.com/2009/12/europe-collages/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.benandalonna.com/2009/12/europe-collages/?referer=');">collage</a> <a href="http://www.benjscott.com/photo-collages/">software</a> is different from regular <a href="http://www.google.com/search?hl=en&amp;biw=1920&amp;bih=1055&amp;site=search&amp;tbm=isch&amp;sa=1&amp;q=photomosaics&amp;aq=f&amp;aqi=g7&amp;aql=&amp;oq=" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_biw=1920_amp_bih=1055_amp_site=search_amp_tbm=isch_amp_sa=1_amp_q=photomosaics_amp_aq=f_amp_aqi=g7_amp_aql=_amp_oq=&amp;referer=');">photo mosaics</a>.   I went at the problem from a completely different angle.  Instead of dividing the picture into equal-sized boxes and finding the letter that is perfect for each box, I piece the whole thing together like a puzzle.  This is still very early code, but the results are cool so far.  Especially when you combine the original target image and the ASCII art version with a bit of Photoshop wizardry as seen above.</div>
<div>
<div><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/Ben-b+w.png"><img class="alignnone size-medium wp-image-419" title="Ben-b+w" src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/Ben-b+w-300x284.png" alt="Ben-b+w" width="300" height="284" /></a> <a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/ben-bike-artscii2.png"><img class="alignnone size-medium wp-image-440" title="ben-bike-artscii2" src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/ben-bike-artscii2-300x284.png" alt="ben-bike-artscii2" width="300" height="284" /></a></div>
</div>
<p><span id="more-416"></span></p>
<p>Just running it on a single letter generates kick-ass results.  I think this would make a pretty sweet type-face</p>
<div class="wp-caption aligncenter" style="width: 310px"><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/LetterA.png"><img title="LetterA" src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/LetterA-300x300.png" alt="LetterA" width="300" height="300" /></a><p class="wp-caption-text">Brought to you by the Letter A</p></div>
<div class="wp-caption aligncenter" style="width: 310px"><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/Number8.png"><img title="Number8" src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/Number8-300x300.png" alt="Number8" width="300" height="300" /></a><p class="wp-caption-text">And the Number 8</p></div>
<p>You can limit it to specific letters (though it tends to have &#8220;favorite&#8221; letters for filling in dark areas, like lower case b):</p>
<p style="text-align: center;"><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/ben-bike-overhead2.png"><img class="aligncenter size-medium wp-image-434" title="ben-bike-overhead2" src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/ben-bike-overhead2-190x300.png" alt="ben-bike-overhead2" width="190" height="300" /></a></p>
<p>Also useful for generating cliched tripe like this (favorite letter here is obviously &#8216;O&#8217;):</p>
<p><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/heart-love.png"><img class="aligncenter size-medium wp-image-432" title="heart-love" src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/heart-love-300x270.png" alt="heart-love" width="300" height="270" /></a></p>
<p>Even cool with just one character.</p>
<p><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/MonaLisaStars.png"><img class="aligncenter size-medium wp-image-474" title="MonaLisaStars" src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/MonaLisaStars-193x300.png" alt="MonaLisaStars" width="193" height="300" /></a><br />
Here&#8217;s the program for anyone who wants to play with it.  This is just a prototype &#8211; it&#8217;s SLOW, the user interface is crap, you can&#8217;t change the font sizes, it&#8217;s buggy, etc.  Requires .NET, which is probably on your system already.</p>
<ul>
<li><a href="http://www.benjscott.com/artscii/">Artscii</a></li>
</ul>
<p>A few tips:</p>
<ul>
<li>Start with <strong>small</strong> images.  800 pixels max on the longest side.</li>
<li>For best results convert your image to black and white first &#8211; not grayscale, black and white.</li>
<li>Times New Roman always seems to look great.  Other fonts are hit-or-miss.  &#8221;Funky&#8221; fonts don&#8217;t usually turn out so great.</li>
<li>Results often look better when run with only lower-case letters.  Upper-case is kind of jarring.  LIKE BEING YELLED AT.</li>
<li>This program will rail your CPU.  Open your task manager, select the processes tab, right-click on artscii.exe and select Set Priority-&gt;Below Normal to be able to use your computer while it runs.</li>
<li>Using a single character and lots of different fonts can yield interesting results.</li>
<li>Some characters like lowercase L render as just a single fat line in some fonts and the result doesn&#8217;t look much like ASCII art.</li>
</ul>
<p>Potential future improvements:</p>
<ul>
<li>Faster</li>
<li>More intelligent about fitting letters together, by using branch-and-bound game-AI algorithm.</li>
<li>Ability to add words and phrases</li>
<li>Minor tweaking so it doesn&#8217;t over-use certain letters and patterns of letters</li>
<li>Dithering algorithm of some sort so that it can handle gray-scale images intelligently</li>
<li>HTML output / vectorized output</li>
<li>Color?</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.benjscott.com/2011/04/artscii/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A Toy Train that Records Its Own Tracks</title>
		<link>http://www.benjscott.com/2011/04/a-toy-train-that-records-its-own-tracks/</link>
		<comments>http://www.benjscott.com/2011/04/a-toy-train-that-records-its-own-tracks/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 03:43:49 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benjscott.com/?p=328</guid>
		<description><![CDATA[I had this idea about 5 years ago, from watching a kid assembling train tracks for a toy train.  I thought, what if the train could just &#8220;record&#8221; the tracks?  You put the train in record-mode, move it around a bit, then it plays that loop back over and over again.
Normally what you should do [...]]]></description>
			<content:encoded><![CDATA[<p>I had this idea about 5 years ago, from watching a kid assembling train tracks for a toy train.  I thought, what if the train could just &#8220;record&#8221; the tracks?  You put the train in record-mode, move it around a bit, then it plays that loop back over and over again.</p>
<p>Normally what you should do at this point is patent the idea then wait for someone else to come up with the idea and actually make it and then sue them for $millions.  This is the guiding principle of our entire patent system.  But I don&#8217;t have $10,000 lying around to get a patent, so I decided to just go ahead and try to make it myself.</p>
<p>How do you make a train that records it&#8217;s own tracks?  Basically, you need a motorized vehicle of some sort that <em>knows where it is at any moment relative to where it started</em>.  And that can record that position and play it back.  It also needs to be able to complete a loop &#8211; the person using the toy will probably never be able to create a perfect loop, so the toy needs to be able to correct the loop so that it can be played back over and over again.  None of that is very simple, but the part in italics is really the key.  How can a toy know where it is?  I came up with dozens of ideas, but eventually boiled it down to these:</p>
<ul>
<li>Use a mouse sensor (or something similar) to track distance and turning</li>
<li>Count the rotations of each wheel on a car and use the differential to determine movement direction.</li>
</ul>
<p>There are probably hundreds of other ways of recording position &#8211; from echo location to GPS to using a cheap video camera and complex digital analysis.  There are also a lot of ways of &#8220;cheating&#8221; &#8211; waypoints that the toy could move between, <a href="http://www.google.com/search?q=line-following+robots" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?q=line-following+robots&amp;referer=');">line-following robots</a>, etc.  But I decided to stick to original idea and to approaches that I could actually prototype cheaply.</p>
<p>I&#8217;ve created two prototypes so far.  While neither of these look anything like a &#8220;train&#8221;, keep in mind it&#8217;s not that hard to put a train shell over a motorized toy.  Each prototype represents hours of bread-boarding, soldering, coding, and testing.<span id="more-328"></span></p>
<p><strong>Mouse-Bot</strong></p>
<div id="attachment_352" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/mousebot.jpg"><img class="size-medium wp-image-352" title="mouse-bot" src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/mousebot-300x225.jpg" alt="mouse-bot" width="300" height="225" /></a><p class="wp-caption-text">I was born a computer mouse, but I am oh so much more than that now...</p></div>
<p>The basic ideas is this &#8211; when you move this monstrous franken-toy forward, the microcontroller receives y (as in vertical on an x-y axis) signals from the mouse.  When you turn the toy, it receives x signals.  Using a lot of trigonometry, it should always know where it is.  It actually works quite well.  You can watch a video of it following a pre-programmed path <a href="http://www.youtube.com/watch?v=RwtYZcWcaV0" onclick="pageTracker._trackPageview('/outgoing/www.youtube.com/watch?v=RwtYZcWcaV0&amp;referer=');">here</a>.</p>
<p><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/mouse-alignment.jpg"><img src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/mouse-alignment-300x229.jpg" alt="mouse-alignment" title="mouse-alignment" width="300" height="229" class="aligncenter size-medium wp-image-375" /></a></p>
<p>Here&#8217;s the problem, though.  If the mouse is not perfectly aligned and perfectly centered between the two wheels, crazy-complex calculations are required to compensate &#8211; and it&#8217;s nearly impossible to perfectly align and center the mouse.  The calculations are too complex for the microcontroller to do on-the-fly, but without the calculations, the mouse-bot tends to always pull toward the left or the right (depending).  Even the slightest misalignment leads to massive failure.</p>
<p>So I gave up on the mouse approach.</p>
<p><strong>Zoomerang</strong></p>
<div id="attachment_353" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/zoomerang.jpg"><img class="size-medium wp-image-353" title="zoomerang" src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/zoomerang-300x225.jpg" alt="zoomerang" width="300" height="225" /></a><p class="wp-caption-text">I think I can, I think I can...</p></div>
<p>Approach number two, keep track of the differential turning of two wheels.  With a great deal of tweaking, this approach <em>mostly</em> works.</p>
<p>As the video demonstrates, the main problem seems to be recording &#8211; it can fairly successfully play back the same loop every time.</p>
<div align="center"><iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/zaF32X_fxAs" frameborder="0" allowfullscreen></iframe></div>
<p>I had a lot of trouble finding practical encoders to count the wheel turns, and there&#8217;s also a huge problem in that the motors are always &#8220;engaged&#8221;, so the wheels don&#8217;t want to turn during record mode.  The system I use for counting wheel turns is ring magnets with alternating poles combined with <a href="http://en.wikipedia.org/wiki/Hall_effect_sensor" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Hall_effect_sensor?referer=');">Hall sensors</a>.  I get 8 &#8220;pulses&#8221; per wheel turn which is not very precise.</p>
<div id="attachment_354" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/04/magnet.jpg"><img class="size-medium wp-image-354" title="magnet" src="http://www.benjscott.com/wp/wp-content/uploads/2011/04/magnet-300x224.jpg" alt="magnet" width="300" height="224" /></a><p class="wp-caption-text">The shiny ring is actually a magnet with alternating north and south poles</p></div>
<p>There are a number of ways I could improve this design &#8211; much more precise encoders, adding a digital compass so that I know which way the toy is pointed (any extra data helps), some sort of method of disengaging the motors in record mode.  But I&#8217;m starting to get the feeling that this dog won&#8217;t hunt.  </p>
<p><strong>Insert Coin To Continue</strong></p>
<p>I&#8217;m going to shelve this project for a while.  If I pick it up again it will probably be to create a &#8220;waypoint&#8221; version.  It would work like this: put down two or more (solar-powered?) beacons and a toy will loop between them.  But for now I&#8217;m on to other projects&#8230;</p>
<p><strong>Circuits and Such</strong></p>
<p>Some notes on the circuit design(s) I used</p>
<ul>
<li>The microcontroller and sensors are powered by a 3.3V boost circuit &#8211; which doubles as a voltage regulator.  The motors are powered directly from the batteries.  Without the boost circuit, the sensors and even the microcontroller can get confused by voltage spikes and drops when the motors are turned on and off.</li>
<li>I used a single MOSFET to drive each motor.  With this setup the vehicle can only drive forward.</li>
<li>Also note that most MOSFETs have a rather high gate threshold, and some of them have a surprisingly high on-resistance.  When using MOSFETs to drive low voltage motors, look for low values for both of these attributes &#8211; i.e. gate threshold around 2V and on-resistance in the milliOhms or (even better) microOhms.</li>
<li>For the mouse-bot version, I directly soldered connections to the mouse&#8217;s internal circuit board, rather than fool around with USB or PS/2 communication.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.benjscott.com/2011/04/a-toy-train-that-records-its-own-tracks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Collages</title>
		<link>http://www.benjscott.com/2011/03/collages/</link>
		<comments>http://www.benjscott.com/2011/03/collages/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 02:36:54 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benjscott.com/?p=333</guid>
		<description><![CDATA[I managed to get second place in a Gizmodo mosaic photo contest.  My entry seems to be pretty popular with the commenters too.  As I mentioned with my submission, I wrote the software that created the mosaic.  Also note that the target photo is one of the component photos, so you can search for it [...]]]></description>
			<content:encoded><![CDATA[<p>I managed to get second place in a <a href="http://gizmodo.com/#!5786735" target="_blank" onclick="pageTracker._trackPageview('/outgoing/gizmodo.com/_5786735?referer=');">Gizmodo mosaic photo contest</a>.  My entry seems to be pretty popular with the commenters too.  As I mentioned with my submission, I wrote the software that created the mosaic.  Also note that the target photo is one of the component photos, so you can search for it Where&#8217;s Waldo-style if you&#8217;re up for a challenge.</p>
<p><a href="http://www.benjscott.com/wp/wp-content/uploads/2011/03/IMG_6093.JPG"><img class="aligncenter size-medium wp-image-337" title="Bike Target" src="http://www.benjscott.com/wp/wp-content/uploads/2011/03/IMG_6093-300x200.jpg" alt="Bike Target" width="300" height="200" /></a><br />
<a href="http://www.benjscott.com/wp/wp-content/uploads/2011/03/bike_3500_v2-2011.03.28_complete.jpg"><img class="aligncenter size-medium wp-image-334" title="Bike Collage" src="http://www.benjscott.com/wp/wp-content/uploads/2011/03/bike_3500_v2-2011.03.28_complete-300x248.jpg" alt="Bike Collage" width="300" height="248" /></a></p>
<p>The software I wrote to make the mosaics only works on Linux, and is very confusing to use, but I plan to port it to windows and add a GUI to make it more usable, and then release it.  Maybe as freeware, maybe as shareware, maybe as open source &#8211; haven&#8217;t decided.  I&#8217;ll start on it pretty soon, but at the moment I&#8217;m working on some ASCII art stuff and a microcontroller project.  I get enough requests from people who have seen my collages that I think it&#8217;s finally time to put it out there.</p>
<p><a href="http://www.benandalonna.com/tag/photo-collage/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.benandalonna.com/tag/photo-collage/?referer=');">Here&#8217;s a link</a> to some more collages/mosaics that my wife Alonna has made with the same software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjscott.com/2011/03/collages/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Back in the Saddle</title>
		<link>http://www.benjscott.com/2011/02/back-in-the-saddle/</link>
		<comments>http://www.benjscott.com/2011/02/back-in-the-saddle/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 04:55:01 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benjscott.com/?p=316</guid>
		<description><![CDATA[I haven&#8217;t posted anything here for over a year and a half.  During that time I&#8217;ve:

Traveled the world, visiting Holland, France, Spain, Austria, Switzerland, Germany, Czech Republic, Hungary, Italy, Greece, Ecuador (including the Galapagos Islands), Argentina, Chile (I was there for the 8.3 earthquake), England, Turkey,  Egypt (pre-revolution), South Africa, New Zealand, and Australia.  Before you [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted anything here for over a year and a half.  During that time I&#8217;ve:</p>
<ul>
<li>Traveled the world, visiting Holland, France, Spain, Austria, Switzerland, Germany, Czech Republic, Hungary, Italy, Greece, Ecuador (including the Galapagos Islands), Argentina, Chile (I was there for the 8.3 earthquake), England, Turkey,  Egypt (pre-revolution), South Africa, New Zealand, and Australia.  Before you ask, they&#8217;re all my favorite.</li>
<li>Fixed up and sold our house in Boise, packed up everything and moved to Colorado (actually had to drive the trip 3 times &#8211; long story)</li>
<li>Put in hundreds of hours mountain biking all over the world, including my favorite spots, Moab and Fruita</li>
<li>Got in amazing shape.</li>
<li>Modded the Rock Band drums for recording and playing back.  Also known as &#8220;cheating&#8221;.</li>
<li>Worked really hard on a new project that I&#8217;ll talk about here soon if I can ever get the thing working.  I&#8217;ll probably post something here about it even if I can&#8217;t get it working because it has consumed so much of my time.</li>
</ul>
<p>To mark my return,  I thought I&#8217;d share what I&#8217;m certain is the most extensive collection of horse metaphors (meataphors?) that can be found anywhere on the Galactic Interweb.   I encountered situations for which each of these colloquialisms were uniquely useful while waiting in airports, climbing mountains, lost in strange and dangerous cities, and even once while riding horseback to the rim of an active volcano.</p>
<p>Horses are obsolete as a mode of transportation, are (unfortunately) taboo to eat because of their big sad eyes (unlike cows?), and generally just serve as a rich-people pet that drops steaming piles of shit all over my favorite trails.  But they are still very useful as a source of colorful meataphors.</p>
<ul>
<li>I&#8217;m so hungry I could eat a horse</li>
<li>Don&#8217;t look a gift horse in the teeth</li>
<li>Heard it straight from the horse&#8217;s mouth</li>
<li>To &#8220;have a horse in the race&#8221;</li>
<li>You can lead a horse to water but you can&#8217;t make him drink</li>
<li>Get down off your high horse</li>
<li>Piss like a race horse</li>
<li>Putting the cart in front of the horse</li>
<li>Hold your horses</li>
<li>Horsing around</li>
<li>Dark horse candidate</li>
<li>Every horse thinks his own pack is heaviest</li>
<li>Beating a dead horse</li>
<li>One horse town</li>
<li>Need to see a man about a horse (have to use the bathroom)</li>
<li>Riding your hobby horse</li>
<li>F&#8212; you and the horse you rode in on</li>
<li>Hung like a horse</li>
<li>Back that horse up</li>
<li>If dreams were horses, beggars would ride</li>
<li>That&#8217;s a horse of a different color</li>
<li>Stalking horse / stalking horse offer</li>
</ul>
<p>Meta-horse expressions:</p>
<ul>
<li>Getting a little long in the tooth</li>
<li>Chomping at the bit</li>
<li>Given free rein</li>
<li>Back in the saddle</li>
</ul>
<p>Ponies!:</p>
<ul>
<li>Dog and pony show</li>
<li>One trick pony</li>
</ul>
<p>Try to use two or three in every conversation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjscott.com/2011/02/back-in-the-saddle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>555 Timer Based Boost Converter (Spoiler: Not Very Useful)</title>
		<link>http://www.benjscott.com/2009/07/555-boost-converter/</link>
		<comments>http://www.benjscott.com/2009/07/555-boost-converter/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 00:22:30 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benjscott.com/?p=285</guid>
		<description><![CDATA[Boost circuits are an awesome way to power microcontrollers.  Instead of 4AA batteries or a 9V (usually regulated down to 5V or 3.3V), you just boost one or two AA&#8217;s up to your desired voltage.   The only problems are that boost ICs (like these two) are a little expensive once you decide to [...]]]></description>
			<content:encoded><![CDATA[<p>Boost circuits are an awesome way to power microcontrollers.  Instead of 4AA batteries or a 9V (usually regulated down to 5V or 3.3V), you just boost one or two AA&#8217;s up to your desired voltage.   The only problems are that boost ICs (like <a href="http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=MAX756CPA%2B-ND" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=MAX756CPA_2B-ND&amp;referer=');">these</a> <a href="http://www.linear.com/pc/productPurchase.do?navId=H0,C1,C1003,C1042,C1031,C1060,P1029&amp;partNumber=LT1302" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.linear.com/pc/productPurchase.do?navId=H0_C1_C1003_C1042_C1031_C1060_P1029_amp_partNumber=LT1302&amp;referer=');">two</a>) are a little expensive once you decide to make more than 2 or 3 of something, and the <a href="http://mouser.com/Search/ProductDetail.aspx?qs=Gse6rAGbi7%2fpAkWUQ6FrTA%3d%3d" target="_blank" onclick="pageTracker._trackPageview('/outgoing/mouser.com/Search/ProductDetail.aspx?qs=Gse6rAGbi7_2fpAkWUQ6FrTA_3d_3d&amp;referer=');">cheaper</a> <a href="http://mouser.com/Search/ProductDetail.aspx?R=AP1603WL-7virtualkey62110000virtualkey621-AP1603WL-7" target="_blank" onclick="pageTracker._trackPageview('/outgoing/mouser.com/Search/ProductDetail.aspx?R=AP1603WL-7virtualkey62110000virtualkey621-AP1603WL-7&amp;referer=');">ones</a> are hard to find in packages that can be hand soldered easily.</p>
<p>I stumbled upon one great solution <a href="http://spritesmods.com/?art=ucboost&amp;page=2" target="_blank" onclick="pageTracker._trackPageview('/outgoing/spritesmods.com/?art=ucboost_amp_page=2&amp;referer=');">here</a> &#8211; use PWM from a microcontroller.  And Atmel recently introduced the <a href="http://atmel.com/products/avr/attiny43u.asp?family_id=607" target="_blank" onclick="pageTracker._trackPageview('/outgoing/atmel.com/products/avr/attiny43u.asp?family_id=607&amp;referer=');">ATtiny43U</a> with a built-in boost converter &#8211; hopefully this will become a trend and all microcontrollers will come with built-in boost converters, the same way they (mostly) all support serial, I2C, and SPI.</p>
<p>But in the meantime I wondered if a simpler solution might be possible, a boost converter using a <a href="http://en.wikipedia.org/wiki/555_timer" target="_blank" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/555_timer?referer=');">555 timer</a>.  The 555 timer is a very common <a href="http://mouser.com/Search/ProductDetail.aspx?qs=AFLC8Sm4xaX0SxPz974UPA%3d%3d" target="_blank" onclick="pageTracker._trackPageview('/outgoing/mouser.com/Search/ProductDetail.aspx?qs=AFLC8Sm4xaX0SxPz974UPA_3d_3d&amp;referer=');">$0.20</a> chip that can generate a PWM at a given frequency and duty cycle based on the charge time of some chosen resistors and a capacitor.  The circuit would need the same basic external components as a boost converter (inductor, diode, capacitor), but it would be a lot cheaper.   It wouldn&#8217;t be able to regulate the voltage, only multiply it using a calculated duty cycle, so the solution already starts off a bit limited since the voltage of a AA battery varies over it&#8217;s lifetime.  But despite this limitation, there are definitely applications where providing <em>roughly </em>5V from a single AA or AAA is very useful (powering servos in a kite aerial photography rig, for example)</p>
<p>The circuit looks like this:</p>
<p><a href="http://www.benjscott.com/wp/wp-content/uploads/2009/07/555-schematic.png"><img class="aligncenter size-full wp-image-289" title="555 schematic" src="http://www.benjscott.com/wp/wp-content/uploads/2009/07/555-schematic.png" alt="555 schematic" width="800" height="413" /></a><span id="more-285"></span></p>
<p>Wikipedia has a great <a href="http://en.wikipedia.org/wiki/Boost_converter" target="_blank" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Boost_converter?referer=');">explanation of how a boost converter works</a>.  The basic idea is that the source voltage is run through an inductor and alternately connected to ground through the transistor and disconnected so that it will charge the capacitor.  The ratio of how long it&#8217;s connected to ground and how long it&#8217;s disconnected is the duty cycle, which determines the boosted voltage.</p>
<p>The math is pretty simple: D = 1 &#8211; V<sub>i</sub>/(V<sub>o</sub>+0.5) gives you the duty cycle you&#8217;ll need (the +0.5 part is to compensate for the forward voltage of the diode).   555 timer <a href="http://www.daycounter.com/Calculators/NE555-Calculator.phtml" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.daycounter.com/Calculators/NE555-Calculator.phtml?referer=');">calculators</a> are available all over the Internet for choosing resistors and capacitor based on the duty cycle.  As long as the frequency is in the KHz it should work.</p>
<p style="text-align: center;"><a href="http://www.flickr.com/photos/72237776@N00/3714224615/" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/72237776_N00/3714224615/?referer=');"><img class="aligncenter size-medium wp-image-295" title="555-boost-crop" src="http://www.benjscott.com/wp/wp-content/uploads/2009/07/555-boost-crop-300x223.jpg" alt="555-boost-crop" width="300" height="223" /></a></p>
<p>And when wired up it does work great&#8230; until you attach a load, then the voltage drops precipitously.  Higher frequencies seem to help a bit, but not enough.   A higher duty cycle is needed to compensate for the load, which is how a boost converter handles the problem, but our simple 555 timer with its constant frequency and duty cycle is not up to the task.</p>
<p>If the load never varies &#8211; powering a string of LEDs, for example -  then you can play with the duty cycle to get the voltage you need under those conditions.  Other than that, the only thing it&#8217;s useful for is charging a capacitor.  If you wanted to boost a 1.5V AAA battery up to 12V or 50V and release it all at once, this circuit can get it done.  Use it to shock your cat.</p>
<p>So a 555 timer isn&#8217;t very useful for a boost converter because there&#8217;s no easy way to adjust the duty cycle on-the-fly.  But <a href="http://mouser.com/Search/Refine.aspx?N=6784976+1323043&amp;Ns=Pricing|0" target="_blank" onclick="pageTracker._trackPageview('/outgoing/mouser.com/Search/Refine.aspx?N=6784976+1323043_amp_Ns=Pricing_0&amp;referer=');">inexpensive PWM controllers</a> do exist&#8230; perhaps I&#8217;ll try that next.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjscott.com/2009/07/555-boost-converter/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Understanding the Guitar Hero Controller</title>
		<link>http://www.benjscott.com/2009/07/xplorer/</link>
		<comments>http://www.benjscott.com/2009/07/xplorer/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 23:06:50 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benjscott.com/?p=180</guid>
		<description><![CDATA[I&#8217;ve gotten to know the insides of the Xbox 360 Guitar Hero controller quite well, and I&#8217;ve decided to share what I know.  Modding these controllers to play songs automatically or do other interesting things seems to be a popular electronics project, and the information below should be helpful for anyone embarking on such an [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve gotten to know the insides of the Xbox 360 Guitar Hero controller <a href="http://www.benjscott.com/guitar-zero-xbox360/" target="_blank">quite</a> <a href="http://www.benjscott.com/ultimate-guitar-bot/" target="_blank">well</a>, and I&#8217;ve decided to share what I know.  Modding these controllers to play songs automatically or do other interesting things seems to be a popular electronics project, and the information below should be helpful for anyone embarking on such an adventure.</p>
<p>I&#8217;m going to focus on the X-Plorer, but the Guitar Hero World Tour controller and the Les Paul controller work almost identically, eventually I hope to do a post about the differences.  The RB and RB2 controllers are completely different&#8230;</p>
<p>Of course, modding your controller to play songs for you is cheating.  I would generally discourage you from using a modded controller on &#8220;Pro-Faceoff&#8221; mode or anything like that where your cheating will actually adversely affect someone else.  Use your powers for good instead of evil.</p>
<p><strong>Layout</strong></p>
<p>Below is the inside of an Xplorer.</p>
<div id="attachment_230" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.benjscott.com/wp/wp-content/uploads/2009/06/Xplorer-internals.jpg"><img class="size-medium wp-image-230" title="Xplorer-internals" src="http://www.benjscott.com/wp/wp-content/uploads/2009/06/Xplorer-internals-300x200.jpg" alt="Xplorer-internals" width="300" height="200" /></a><p class="wp-caption-text">Not a date you&#39;d bring home to mother</p></div>
<p style="text-align: left;"><span id="more-180"></span></p>
<p style="text-align: left;">Wires run from the main PCB in the upper right out to the fret buttons, strum bar, and whammy, as well as to the headset connection, and a connector for an effects pedal that was apparently never created.  The thick black wire is USB, which is broken out into 5 wires.  The most interesting are probably the top red wire &#8211; 5V Vcc &#8211; and the black wire second from the bottom &#8211; GND.  With these you can power LEDs, a microcontroller, etc.   As you can see there is plenty of empty space inside the controller.  The possibilities are endless.</p>
<p style="text-align: left;"><strong>Guitar Hero PCB</strong></p>
<div id="attachment_214" class="wp-caption alignright" style="width: 330px"><img class="size-full wp-image-214 " title="XplorerPCB-labeled" src="http://www.benjscott.com/wp/wp-content/uploads/2009/07/XplorerPCB-labeled.jpg" alt="XplorerPCB-labeled" width="320" height="435" /><p class="wp-caption-text">Xplorer PCB</p></div>
<p>Here is the main internal PCB (printed circuit board) of the XBox 360 Xplorer controller.  I&#8217;ve labeled a few items</p>
<ul>
<li>A &#8211; The microcontroller (uC).  This is the real brains of the guitar.  It accepts inputs, thinks about them, and passes them off to the XBox360.  Generally there shouldn&#8217;t be too much for a microcontroller in a device like this to think about, but this appears to be a powerful microcontroller, relatively speaking, based on the number of I/O pins and the fact that there appears to be a spot for optional external RAM. (this spot is populated in about half the Xplorers I&#8217;ve seen).  Since it&#8217;s labeled &#8220;Microsoft&#8221; and not &#8220;Atmel&#8221; or &#8220;Microchip&#8221; or something similar, my guess is that it&#8217;s probably an ARM based custom ASIC.  It might be possible to put custom firmware on it, which would be <em>awesome</em>, but extremely difficult.  Sometimes the Microsoft label is absent, but it still seems to be the same chip.  The microcontroller runs at 12 MHz.</li>
<li>B &#8211; XBox communication chip? &#8211; this chip probably handles encryption of some sort.  This is why 3rd party controllers have to be licensed from Microsoft in order to ensure greater profits.  The most likely format of this encryption is something like this:  &lt;Xbox&gt;: hello  &lt;Xplorer&gt;: hi &lt;Xbox&gt;Challenge with random number &lt;Xplorer&gt;Response based on private key and random number &lt;Xbox&gt;Tell me about yourself &lt;Xplorer&gt;String containing serial number and description (this is probably how games know the difference between drums, microphone, guitar, etc).  This is all just semi-educated speculation.</li>
<li>C &#8211; Accelerometer &#8211; this is how the controller knows if you lift the neck of guitar up for star power.   From the name you might think that the acceleration of lifting the neck is the key, but actually an accelerometer basically tells the microcontroller which way is down at any given moment.  It can also tell if you shake the controller or drop it, but probably doesn&#8217;t care.  In fact, it appears to me that this accelerometer is hard-wired to act just like a button &#8211; when you tip the neck of the guitar above a certain point it &#8220;presses&#8221; the Back button.  The accelerometer is a 3-axis <a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&amp;name=MMA7260QT-ND" target="_blank" onclick="pageTracker._trackPageview('/outgoing/search.digikey.com/scripts/DkSearch/dksus.dll?Detail_amp_name=MMA7260QT-ND&amp;referer=');">A7260</a>.</li>
</ul>
<p><strong>Buttons</strong></p>
<p>Normally in an embedded device, buttons are a very simple thing.    Each button is connected to an I/O pin on the microcontroller.   An internal <a href="http://en.wikipedia.org/wiki/Pull-up_resistor" target="_blank" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Pull-up_resistor?referer=');">pull-up resistor</a> causes this pin to always read a logic 1 when the button is not pressed.  When you press the button, the pin is connected directly to GND, and the I/O pin reads a logic 0.  This works very well, and it&#8217;s one of the first things you&#8217;ll learn if you start learning microntrollers.</p>
<div id="attachment_216" class="wp-caption aligncenter" style="width: 313px"><img class="size-full wp-image-216" title="button1s" src="http://www.benjscott.com/wp/wp-content/uploads/2009/06/button1s1.jpg" alt="button1s" width="303" height="237" /><p class="wp-caption-text">How a normal button works</p></div>
<p>For some reason the Xplorer works differently, it uses a sort of signal system.  The guitar microcontroller generates 6 or so &#8220;signals&#8221;, and pressing buttons connects one of these signals to an I/O pin.</p>
<div id="attachment_217" class="wp-caption aligncenter" style="width: 472px"><img class="size-full wp-image-217" title="button2s" src="http://www.benjscott.com/wp/wp-content/uploads/2009/06/button2s1.jpg" alt="button2s" width="462" height="269" /><p class="wp-caption-text">A strange way to handle buttons</p></div>
<p>I&#8217;ve heard that until recently regular XBox 360 controllers used the same system, so I suspect &#8211; especially given that the central microcontroller is labeled &#8220;Microsoft&#8221; &#8211; that the Xplorer is basically just a regular XBox 360 controller with the parts rearranged.</p>
<p><strong>Fret Buttons</strong></p>
<p>There are 8 wires going out to the fret buttons, and they are labeled 1 through 8 on the underside of the PCB.  Pressing fret buttons connects the wires like this (In each of these, the first wire is the signal, the second wire is the I/O pin.  I&#8217;ll be referring only to Xplorer Rev B):</p>
<table border="0">
<tbody>
<tr>
<th>Button</th>
<th>Xplorer Rev B</th>
<th>Xplorer Rev A</th>
<th>GHWT/Les Paul</th>
</tr>
<tr>
<td>Green</td>
<td>8+1</td>
<td>8+1</td>
<td>8+1</td>
</tr>
<tr>
<td>Red</td>
<td>7+3</td>
<td>7+2</td>
<td>7+2</td>
</tr>
<tr>
<td>Yellow</td>
<td>6+3</td>
<td>5+2</td>
<td>6+2</td>
</tr>
<tr>
<td>Blue</td>
<td>2+1</td>
<td>6+1</td>
<td>3+2</td>
</tr>
<tr>
<td>Orange</td>
<td>5+4</td>
<td>4+3</td>
<td>5+4</td>
</tr>
</tbody>
</table>
<p>Wires 2, 5, 6, 7, and 8 are signals, and wires 1, 3, and 4 are the inputs.  The signals must be different enough that the input pins can tell them apart, so if signal 7 and 6 are detected on input wire 3, the microcontroller knows that both red and yellow are pressed down.</p>
<p>Several of the signals are &#8220;duplicates&#8221;.  Signal 7 is the same as signal 8 &#8211; if you touch wire 8 or wire 7 to wire 1, the controller thinks you are pressing the green button.  Touch either one to wire 3 and it thinks you are pressing red.</p>
<p><strong>Understanding the Signals</strong></p>
<p>The signals themselves are 1 kHz reverse <a href="http://en.wikipedia.org/wiki/Sawtooth_wave" target="_blank" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Sawtooth_wave?referer=');">sawtooth</a> waves.</p>
<div id="attachment_212" class="wp-caption aligncenter" style="width: 330px"><img class="size-full wp-image-212" title="signals 2 and 8" src="http://www.benjscott.com/wp/wp-content/uploads/2009/06/signal-6+8.png" alt="signals 6 and 8" width="320" height="240" /> <p class="wp-caption-text">The signals on wires 2 and 8</p></div>
<div id="attachment_235" class="wp-caption aligncenter" style="width: 330px"><img class="size-full wp-image-235" title="signal 6+8 pressed" src="http://www.benjscott.com/wp/wp-content/uploads/2009/06/signal-6+8-pressed.png" alt="Signals 2 &amp; 8 when connected to I/O wire 1" width="320" height="240" /><p class="wp-caption-text">Signals 2 &amp; 8 when connected to I/O wire 1</p></div>
<p>What&#8217;s going on here is pretty clear, once every millisecond the microcontroller sets several signals high then checks the corresponding input wires to see if you are pressing the corresponding buttons, then sets those signals low and moves on to the next one.  In other words, it sets wires 8, 7, and 5 high, checks wires 1, 3, and 4, then sets those signals low again and sets 6 and 2 high and checks inputs 1 and 3.  The shape of the wave shown on top is caused by a capacitor &#8211; the spiked shape on the bottom when the button is actually pressed is because the capacitor discharges into the input pin.  The delay between setting one signal high and setting the next one high is about 10 microseconds, and the delay between setting one signal <em>low</em> and the next one high is less than 1 microsecond -  so synchronizing with these signals and mimicking them would be very difficult.  Maybe that&#8217;s the point, hacking these controllers would be a lot easier if you could just generate the appropriate signal on the appropriate wire.  I think it can be done, but haven&#8217;t tried.</p>
<p>The diodes shown here are to prevent current from flowing the wrong way if you press two buttons at the same time which are connected to the same input wire.</p>
<div id="attachment_220" class="wp-caption aligncenter" style="width: 426px"><img class="size-full wp-image-220" title="diodes" src="http://www.benjscott.com/wp/wp-content/uploads/2009/06/diodes.jpg" alt="diodes" width="416" height="262" /><p class="wp-caption-text">The signal traces pass through the diodes on the right</p></div>
<p>I could do a much more extensive analysis of these buttons and signals, but I don&#8217;t see any point, you can just simulate button presses by connecting the appropriate wires with optocouplers or analog switches and move on to more interesting challenges.</p>
<p><strong>How to Simulate Button Presses with a Microcontroller</strong></p>
<p>In my mods I have found <a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=RuhU64sK2%252bvS971zVpDJjA%3d%3d" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.mouser.com/Search/ProductDetail.aspx?qs=RuhU64sK2_252bvS971zVpDJjA_3d_3d&amp;referer=');">these</a> optocouplers to work well (make sure you use a 1K resistor too!  read the datasheet!), and I&#8217;ve also done some testing with <a href="http://www.mouser.com/Search/ProductDetail.aspx?qs=YhsVCygOPE1gsJI4/XFoTg%3d%3d" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.mouser.com/Search/ProductDetail.aspx?qs=YhsVCygOPE1gsJI4/XFoTg_3d_3d&amp;referer=');">these</a> analog switches, which are cheaper, smaller, and easier to use than optocouplers, and they seem to work great, but I only recently discovered them and have not made any mods with them yet.</p>
<p>With optocouplers you connect the desired signal to the collector pin of one of the photo transistors, and the corresponding input wire to the emitter.  When you trigger the photo coupler, the two are connected.  However if you wire it up the other direction (signal to emitter, input wire to collector), it won&#8217;t work because current can only flow one way through the photo transistor.  <a href="http://en.wikipedia.org/wiki/Opto-isolator" target="_blank" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Opto-isolator?referer=');">This Wikipedia article</a> explains how optocouplers work.</p>
<p>Analog switches on the other hand allow current to flow either way once the switch has been triggered.  Just send a logic 1 to the control pin and the button is pressed.</p>
<p>Regular transistors simply won&#8217;t work.  Or, more accurately, they won&#8217;t work simply &#8211; an analog switch is basically a collection of transistors and resistors.   But any simple combination of transistor and resistor to bypass the button will interfere with the signal.  A MOSFET transistor (as opposed to standard BJT) might work, but I haven&#8217;t verified this.</p>
<p>Below is the circuit board layout for my Guitar Zero mod, and you can see how I used optocouplers to simulate button presses if you stare long enough.  The optocouplers are the two chips on the right side, and 2 resistor arrays are located above and below them respectively.  The ASCII art is artfully distasteful, as befitting a mod of this nature.</p>
<p><a href="http://www.benjscott.com/wp/wp-content/uploads/2009/06/pcb11copperez0.jpg"><img class="alignnone size-medium wp-image-83" title="Guitar Zero PCB Copper" src="http://www.benjscott.com/wp/wp-content/uploads/2009/06/pcb11copperez0-300x222.jpg" alt="Guitar Zero PCB Copper" width="240" height="178" /></a><a href="http://www.benjscott.com/wp/wp-content/uploads/2009/06/pcb11labeledbw1.jpg"><img class="alignnone size-medium wp-image-82" title="Guitar Zero PCB" src="http://www.benjscott.com/wp/wp-content/uploads/2009/06/pcb11labeledbw1-300x189.jpg" alt="Guitar Zero PCB" width="270" height="170" /></a></p>
<p><strong>Strumming</strong></p>
<p>Strum is really just 2 buttons, and they work the same as the fret buttons, there are 2 signal wires (up strum and down strum), and one input wire.  You can tell which is which just from looking at the strum PCB.</p>
<div id="attachment_259" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.benjscott.com/wp/wp-content/uploads/2009/07/strumPCB.jpg"><img class="size-medium wp-image-259 " title="strumPCB" src="http://www.benjscott.com/wp/wp-content/uploads/2009/07/strumPCB-300x222.jpg" alt="Click on image to see labels." width="300" height="222" /></a><p class="wp-caption-text">strum connection wire desoldered in preparation for modding</p></div>
<p>Interestingly, if you strum up and down fast enough &#8211; and it doesn&#8217;t even have to be all that fast &#8211; both up and down strum can be pressed simultaneously.  Either the guitar or the game itself does some filtering so that this is handled intelligently.  In my experimenting I&#8217;ve found that just tapping the strum button really fast and releasing as fast as you can results in it registering as being pressed down for at least 100 milliseconds.  So in those really fast songs with close together notes, there is a limit to how fast you can hit those by only strumming in one direction.</p>
<p><strong>Back, Start, D-Pad, LEDs<br />
</strong></p>
<p>From what I can tell from following the traces on the Xplorer PCB, the up and down d-pad buttons are wired to the same input wires as up and down strum &#8211; the Guitar has no idea which one you press.  Not that there&#8217;s anything useful about knowing that.</p>
<p>The LEDs for the ring of light appear to be 0805 or possibly 0603 surface mount.  You should be able to easily swap them out for different colors&#8230; but I haven&#8217;t tried it.  <a href="http://www.mouser.com/Search/Refine.aspx?N=254249+4294649155+1323043&amp;Ns=Pricing|0" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.mouser.com/Search/Refine.aspx?N=254249+4294649155+1323043_amp_Ns=Pricing_0&amp;referer=');">This search</a> should turn up (probably) compatible LEDs.  Blinking and alternating color LEDs would be a perfect mod for these, but those are hard to find in surface mount form.  If you want to order 3000, try <a href="http://www.ledtronics.com/Products/ProductsDetails.aspx?WP=C544K549#1592" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.ledtronics.com/Products/ProductsDetails.aspx?WP=C544K549_1592&amp;referer=');">here</a>.</p>
<p><strong>Whammy</strong></p>
<p>If you&#8217;ve read about the Xplorer at all you probably know that the whammy bar uses a potentiometer.  It&#8217;s labeled a 10K potentiometer in some guitars, though I measured 9.5K, strangely (note that if you measure it while still connected to the guitar you&#8217;ll get a completely different &#8211; and inaccurate &#8211; value).  The voltage going into it is about 1.60V, and in its default position, the whammy potentiometer divides this to about 0.75V.  Pressing the whammy bar all the way down results in a voltage of 1.45V.  As you wail on the whammy bar, the voltage varies between these two levels, and this value is presumably read by an analog pin on the microcontroller.</p>
<div id="attachment_229" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-229" title="whammy-pot" src="http://www.benjscott.com/wp/wp-content/uploads/2009/06/whammy-pot-300x181.jpg" alt="whammy-pot" width="300" height="181" /><p class="wp-caption-text">Whammy Potentiometer outside its natural habitat</p></div>
<p>I&#8217;ve done some playing around with this (I&#8217;ve been working on a little hack to play Row Row Row Your Boat on the whammy bar on really long held notes.  Stay tuned), and I&#8217;ve found that just sending between 1.45 V and 0.75 V on the middle line is enough to &#8220;fool&#8221; the guitar.</p>
<p>I believe the input voltage to the whammy potentiometer registers as 1.6V because there is a 20K resistor between the 5V Vcc source of the microcontroller and the potentiometer.  I haven&#8217;t been able to verify this.</p>
<p>Also note that if the voltage goes higher the microcontroller appears to recalibrate.  So if you were to send 2V on the middle wire, the microcontroller will decide that this is the new high point.  You can probably use just about any voltage range that you want to hack the whammy, though I haven&#8217;t experimented with the limits of this&#8230;</p>
<p><strong>Effects Pedal</strong></p>
<p>The pedal connection is a phone jack of all things.  Internally, two wires run out to it &#8211; it&#8217;s really just a button with a signal and input wire just like the other buttons. If you short these wires together &#8211; &#8220;press&#8221; the button &#8211; the Xbox interprets it as a right shoulder button press (or possibly right D-pad).  The Guitar Hero games, however, seem to completely ignore it.  I tested &#8220;pressing&#8221; the effects pedal button during song playback and during star power activation in GH2, GH3, and GHWT and never got any noticeable response.  Whatever this pedal is meant to do, the functionality doesn&#8217;t appear to be built into the video games themselves yet.</p>
<p><strong>Voltage</strong></p>
<p>The guitar runs on 5V from USB.  In my experimentation I&#8217;ve found this to be a very stable source that can provide way more current than the guitar needs.  I wouldn&#8217;t run a blender off it, but it probably has 250 mA or more to spare.  USB is rated to provide up to 500 mA (though the long cable might limit that to something lower), and the guitar doesn&#8217;t need much of that.</p>
<p><strong>Tips</strong></p>
<p>A few (hopefully) helpful points to remember if you mod a Guitar Hero controller</p>
<ul>
<li>Most people who have modded the Guitar Hero controllers use a PC-based solution &#8211; the timing, etc, happens on the PC side, and whatever they embed in the controller just receives instructions and  presses the buttons.  This is a <em>much </em>easier approach than embedding the entire circuit in the guitar.  It&#8217;s kind of a sissy approach, but your mom will still be impressed.</li>
<li>If you do embed a microcontroller in the guitar, <em>use a crystal oscillator</em> to clock your microcontroller or it will all end in tears.</li>
<li>If you do embed a microcontroller, you have to store your songs somewhere.  I recommend an external EEPROM.  You&#8217;ll also need a way to get songs onto whatever external memory you use.</li>
<li>Optocouplers, analog switches, and possibly MOSFET transistors can be used to &#8220;press&#8221; buttons, as described above.</li>
<li>Timing is incredibly important.  If for some reason you &#8220;lose&#8221; 1/100th of a second every second, by the end of a song you&#8217;re 3 seconds off and missing every note.  Design around this fact from the very beginning.</li>
</ul>
<p><strong>Summary</strong></p>
<p>So that&#8217;s everything I&#8217;ve gathered from playing around inside the Xplorer.  If you find this information useful in making your own mod, or if you think I&#8217;ve missed something, please post a comment or <a href="mailto:ben@benjscott.com">e-mail me</a>.</p>
<p>Here&#8217;s some random GH controller mods I&#8217;ve stumbled on around the net.</p>
<ul>
<li><a href="http://www.benjscott.com/guitar-zero-xbox360/" target="_blank">Guitar Zero</a> &#8211; this is my mod, records at half speed in practice mode, plays back at full speed</li>
<li><a href="http://www.benjscott.com/ultimate-guitar-bot/" target="_blank">Ultimate Guitar Bot</a> &#8211; me again, a bot with every song from every game built into it</li>
<li><a href="http://www.flickr.com/photos/36366608@N06/sets/72157616598971021/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/36366608_N06/sets/72157616598971021/?referer=');">DaveyBot</a> &#8211; Arduino that works in conjunction with a PC and video camera to automatically hit notes</li>
<li><a href="http://blog.ohbowz.com/?tag=guitar-hero" target="_blank" onclick="pageTracker._trackPageview('/outgoing/blog.ohbowz.com/?tag=guitar-hero&amp;referer=');">Ambient Light Sensor GH Bot</a> &#8211; this one uses ambient light sensors set close to the television screen</li>
<li><a href="http://www.gogglemarks.net/article.php?story=20080125205513452" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.gogglemarks.net/article.php?story=20080125205513452&amp;referer=');">Guitar Hero Autowhammy</a> &#8211; this is for the PS2 controller, but the whammy works the same in the 360 Xplorer</li>
<li><a href="http://www.flickr.com/photos/thecase/3544188742/in/pool-make" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.flickr.com/photos/thecase/3544188742/in/pool-make?referer=');">Wireless GH controller in a Box</a> &#8211; apparently with plans to have it automatically play songs too&#8230;</li>
<li><a href="http://www.rock-bots.com/Default.aspx" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.rock-bots.com/Default.aspx?referer=');">RockBots</a> &#8211; controls all of the Rockband instruments simultaneously.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.benjscott.com/2009/07/xplorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>And So It Begins&#8230;</title>
		<link>http://www.benjscott.com/2009/06/hello-world/</link>
		<comments>http://www.benjscott.com/2009/06/hello-world/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 06:11:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.benjscott.com/wp/?p=1</guid>
		<description><![CDATA[This is the start of my project blog.
Mostly I intend for this to be a place I can just post about things I&#8217;m working on, so that I can say &#8220;well here, I wrote a little about it, I&#8217;ll send you a link&#8221;.
So the posts won&#8217;t necessarily follow a specific theme.  Some of it [...]]]></description>
			<content:encoded><![CDATA[<p>This is the start of my project blog.</p>
<p>Mostly I intend for this to be a place I can just post about things I&#8217;m working on, so that I can say &#8220;well here, I wrote a little about it, I&#8217;ll send you a link&#8221;.</p>
<p>So the posts won&#8217;t necessarily follow a specific theme.  Some of it might be very technical, some will probably just be pictures and videos.  All of it will be interesting to those of you who like to take things apart, put things together, and understand how the world works.  Hopefully.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benjscott.com/2009/06/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

