<?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>j4mie dot org &#187; Electronics + Robotics</title>
	<atom:link href="http://www.j4mie.org/category/electronics-robots/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.j4mie.org</link>
	<description></description>
	<lastBuildDate>Tue, 08 Jun 2010 22:10:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Cahors</title>
		<link>http://www.j4mie.org/2008/11/16/cahors/</link>
		<comments>http://www.j4mie.org/2008/11/16/cahors/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 00:07:41 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Design & Programming]]></category>
		<category><![CDATA[Electronics + Robotics]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.j4mie.org/?p=139</guid>
		<description><![CDATA[
A few months ago, I spent some time writing a MIDI sequencer for the Arduino. I finished the sequencer, wrote a couple of songs with it, and then got sucked into MSc thesis mode and had to abandon it. 
Well, I&#8217;ve finally got round to publishing it as an open source project on Google Code, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/cahors/"><img src="http://farm3.static.flickr.com/2140/2476034483_2ed50b8429_m.jpg" alt="Arduino MIDI shield" /></a></p>
<p>A few months ago, I spent some time writing a MIDI sequencer for the Arduino. I finished the sequencer, wrote a couple of songs with it, and then got sucked into MSc thesis mode and had to abandon it. </p>
<p>Well, I&#8217;ve finally got round to publishing it as an open source project on Google Code, so hopefully others will be able to have some fun with it. I&#8217;ve also written some documentation which will hopefully make it a little easier to get started creating music with it. I&#8217;ve named it ‘Cahors,’ which is a word I found in The Deeper Meaning of Liff. See the FAQ page on the Google Code side for a full explanation.</p>
<p><a href="http://code.google.com/p/cahors/">http://code.google.com/p/cahors/</a></p>
<p>You can hear the first full piece I wrote with Cahors on last.fm <a href="http://www.last.fm/music/hot+pink+brain">here</a>, or you can download the MP3 from the Google Code project page. I&#8217;ve not had a chance to go back and write and more music for it recently, but hopefully I&#8217;ll get back into that soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.j4mie.org/2008/11/16/cahors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make a Physical Gmail Notifier</title>
		<link>http://www.j4mie.org/2008/02/15/how-to-make-a-physical-gmail-notifier/</link>
		<comments>http://www.j4mie.org/2008/02/15/how-to-make-a-physical-gmail-notifier/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 00:00:15 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Electronics + Robotics]]></category>

		<guid isPermaLink="false">http://www.j4mie.org/2008/02/15/how-to-make-a-physical-gmail-notifier/</guid>
		<description><![CDATA[Or: how to turn this..

into this..

I was given a lovely glowing cube by the generous people at Linden Labs as a freebie at a job fair yesterday, and I decided that it was far too attractive to simply sit there on a shelf, pulsating forlornly until its batteries went flat.  How about making it [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Or:</strong> how to turn this..</p>
<p><img src="http://www.j4mie.org/wordpress/wp-content/uploads/2008/02/notifier.jpg" title="Google Notifier" alt="Google Notifier" height="21" width="43" /></p>
<p>into this..</p>
<p><img src="http://www.j4mie.org/wordpress/wp-content/uploads/2008/02/finishedcube.jpg" title="Physical Notifier" alt="Physical Notifier" width="300" /></p>
<p>I was given a lovely glowing cube by the generous people at <a href="http://lindenlab.com/">Linden Labs</a> as a freebie at a <a href="http://www.brightonjobfair.co.uk/">job fair</a> yesterday, and I decided that it was far too attractive to simply sit there on a shelf, pulsating forlornly until its batteries went flat.  How about making it <em>useful</em>, while maintaining its visual appeal?</p>
<p><span id="more-112"></span></p>
<p><img src="http://www.j4mie.org/wordpress/wp-content/uploads/2008/02/startswithacube.jpg" alt="It All Starts With A Cube" /></p>
<p>The following guide is deliberately fairly high-level, because the exact details will vary depending on your operating system and particular hardware setup.  I did this with my Mac, but hopefully there&#8217;ll be enough information here for you make it work on your system, perhaps with a little Googling.  </p>
<p>If you don&#8217;t happen to have a glowing cube lying around, you can modify this to work with almost any output device you could think of, from a simple LED, or a buzzer, to something far more clever like moving a servo (Gmail Notifier Robot, anyone?)</p>
<p>The basic system has three components: </p>
<ul>
<li>the software that runs on your computer,</li>
<li>the electronics hardware that sits between the computer and the output device,</li>
<li>and the software that runs on that hardware.  </li>
</ul>
<p>Every so often, the computer checks for new emails in your Gmail account, and then tells the electronics board whether any have arrived.  If they have, the board turns on the output device (the cube).  Simple.</p>
<p><strong>Hardware</strong></p>
<p>The hardware itself is the popular <a href="http://www.arduino.cc/">Arduino</a> board, the tinkerer&#8217;s dream device.  I&#8217;m actually using a <a href="http://www.ladyada.net/make/boarduino/">Boarduino</a>, but any variant should work (subject to a small but important detail, see below).  This might be particularly interesting with a Bluetooth Arduino..</p>
<p>The Arduino talks with your computer over a serial connection, which runs over the normal USB cable you use to communicate with your Arduino.</p>
<p style="font-size: 8pt">Here&#8217;s the first <strong>important note</strong>: the latest Arduino Diecimila has an &#8220;auto-reset&#8221; feature which allows you to upload programs to the board without manually pressing the Reset button every time.  This works by resetting the board whenever it receives any data over the serial port.  Because we are going to be sending serial data to the board regularly, this is not what we want.  Fortunately, this feature can be disabled on my Boarduino by simply removing a capacitor (C6), but it may be trickier on the official Arduino.  Any suggestions for how to get round this in software would be gladly received (leave a comment!).  One way is to simply keep the serial port open all the time (perhaps using the Serial Proxy, link at the bottom of <a href="http://www.arduino.cc/en/Main/Software">this</a> page).  This solution isn&#8217;t much use for me, as I&#8217;ll be unplugging the USB connection regularly and don&#8217;t want to have to disable anything first.  However this may be fine if your computer is a desktop and you can leave the Arduino plugged in all the time.  If you go this route, you&#8217;ll have to use a different script running on the computer, and make sure it runs continually rather than repeatedly.  I&#8217;ll leave this to you!</p>
<p>I connected up the cube using a PC fan extension cable from Maplin &#8211; simply because the connector on the end fits perfectly on the pins of my Boarduino.  Use your own method to connect your output device.</p>
<p><img src='http://www.j4mie.org/wordpress/wp-content/uploads/2008/02/fancable.jpg' alt='Fan Cable' /></p>
<p>I chopped off the &#8220;plug&#8221; end of the cable and soldered it onto the battery connectors on the cube, drilling a hole in the battery cover to allow the wires to pass through:</p>
<p><img src='http://www.j4mie.org/wordpress/wp-content/uploads/2008/02/batterycompartment.jpg' alt='Battery compartment' /></p>
<p><img src='http://www.j4mie.org/wordpress/wp-content/uploads/2008/02/cableexit.jpg' alt='Cable exit' /></p>
<p>Connected up to the Boarduino for testing:</p>
<p><img src='http://www.j4mie.org/wordpress/wp-content/uploads/2008/02/connectedup.jpg' alt='Connected up' /></p>
<p><strong>Software</strong></p>
<p>This project requires two bits of software: one running on the Arduino to receive serial data and toggle the output accordingly, and one running on the computer to check for new emails and send data out over the serial port.  To re-iterate, <strong>these code listings should only be used as a guide</strong>.  They work for me, but I don&#8217;t guarantee they&#8217;ll work for you, and I accept no responsibility for breaking things.  If you don&#8217;t understand what this code is doing, you probably shouldn&#8217;t be running it.</p>
<p>The Arduino software is fairly trivial.  It just loops round, watching for bytes coming in over the serial port, and sets a variable called &#8220;<strong>mail</strong>&#8221; to be <strong>true</strong> if the data is an &#8216;<strong>M</strong>&#8216;, and <strong>false</strong> if it&#8217;s an &#8216;<strong>N</strong>&#8216; (of course these characters are arbitrary).  It then updates the value of the output pin to be equal to this <strong>mail</strong> variable.  You can hack this and expand it or modify it however you like &#8211; perhaps you could make an LED blink when you have new email instead of just turn on?</p>
<ol class="codelist">
<li class="tab0 odd"><code>int outPin = 12; // Output connected to digital pin 12</code></li>
<li class="tab0 even"><code>int mail = LOW;    // Is there new mail?</code></li>
<li class="tab0 odd"><code>int val;         // Value read from the serial port</code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code>void setup()</code></li>
<li class="tab0 even"><code>{</code></li>
<li class="tab2 odd"><code>pinMode(outPin, OUTPUT);      // sets the digital pin as output</code></li>
<li class="tab2 even"><code>Serial.begin(9600);</code></li>
<li class="tab2 odd"><code>Serial.flush();</code></li>
<li class="tab0 even"><code>}</code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code>void loop()</code></li>
<li class="tab0 odd"><code>{</code></li>
<li class="tab2 even"><code>// Read from serial port</code></li>
<li class="tab2 odd"><code>if (Serial.available())</code></li>
<li class="tab2 even"><code>{</code></li>
<li class="tab4 odd"><code>val = Serial.read();</code></li>
<li class="tab4 even"><code>Serial.println(val);</code></li>
<li class="tab4 odd"><code>if (val == 'M') mail = HIGH;</code></li>
<li class="tab4 even"><code>else if (val == 'N') mail = LOW;</code></li>
<li class="tab2 odd"><code>}</code></li>
<li class="even">&nbsp;</li>
<li class="tab2 odd"><code>// Set the status of the output pin</code></li>
<li class="tab2 even"><code>digitalWrite(outPin, mail);</code></li>
<li class="tab0 odd"><code>}</code></li>
</ol>
<p>Upload this to your Arduino, and then connect your output device to pin 12.</p>
<p>The software for the computer takes the form of a Python script, and is slightly trickier.  First, it tries to open the serial port for communication with your Arduino.  If it can&#8217;t do this (say, if your USB cable is unplugged), it quits immediately.  If the serial port opens successfully, the script has to talk to Google&#8217;s servers to determine if you have any new email waiting for you.  It does this by authenticating with your Gmail username and password, and then requesting the Atom feed for your inbox (this part of the script is based on code from <a href="http://fahi.eu/blog/archives/1-GMail-atom-feed-and-Python.html">here</a>).  It then parses out the line containing the number of unread messages (the XML tag is called <code><fullcount></code>).  If the unread message count is zero, it sends an &#8216;<strong>N</strong>&#8216; over the serial connection.  If it&#8217;s greater than zero, it sends an &#8216;<strong>M</strong>&#8216;.</p>
<p>This requires the <a href="http://pyserial.sourceforge.net/">pySerial</a> library!</p>
<ol class="codelist">
<li class="tab0 odd"><code>import urllib2, re, serial, sys</code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code>#Settings - Change these to match your account details<br />
USERNAME=&quot;username@gmail.com&quot;<br />
PASSWORD=&quot;yourpassword&quot;</code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code>PROTO=&quot;https://&quot;<br />
SERVER=&quot;mail.google.com&quot;<br />
PATH=&quot;/gmail/feed/atom&quot;</code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code>SERIALPORT = &quot;/dev/tty.usbserial&quot; # Change this to your serial port!</code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code># Set up serial port</code></li>
<li class="tab0 even"><code>try:</code></li>
<li class="tab2 odd"><code>ser = serial.Serial(SERIALPORT, 9600)</code></li>
<li class="tab0 even"><code>except serial.SerialException:</code></li>
<li class="tab2 odd"><code>sys.exit()</code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code># Get Gmail Atom feed</code></li>
<li class="tab0 even"><code>passman = urllib2.HTTPPasswordMgrWithDefaultRealm()</code></li>
<li class="tab0 odd"><code>passman.add_password(None, SERVER, USERNAME, PASSWORD)</code></li>
<li class="tab0 even"><code>authhandler = urllib2.HTTPBasicAuthHandler(passman)</code></li>
<li class="tab0 odd"><code>opener = urllib2.build_opener(authhandler)</code></li>
<li class="tab0 even"><code>urllib2.install_opener(opener)</code></li>
<li class="tab0 odd"><code>page = urllib2.urlopen(PROTO + SERVER + PATH)</code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code># Find the mail count line</code></li>
<li class="tab0 even"><code>for line in page:</code></li>
<li class="tab2 odd"><code>count = line.find(&quot;fullcount&quot;)</code></li>
<li class="tab2 even"><code>if count &gt; 0: break</code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code># Extract the mail count as an integer</code></li>
<li class="tab0 odd"><code>newmails = int(re.search('\d+', line).group())</code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code># Output data to serial port</code></li>
<li class="tab0 even"><code>if newmails &gt; 0: ser.write('M')</code></li>
<li class="tab0 odd"><code>else: ser.write('N')</code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code># Close serial port</code></li>
<li class="tab0 even"><code>ser.close()</code></li>
</ol>
<p>UPDATE: See below for a nicer version of this script.</p>
<p>Now, this script needs to be run regularly (say, once a minute) so that when you get a new email, your notifier will light up promptly.  On Mac OS X, the <strong>launchd</strong> service handles, among other things, launching programs at set intervals (on other Unix systems liked Linux, you may need to use <strong>cron</strong>.  On Windows, I have no idea &#8211; but I&#8217;d imagine it&#8217;s possible somehow).</p>
<p>Put this code in a <strong>.plist</strong> file (mine&#8217;s called <strong>org.j4mie.check-gmail.plist</strong> &#8211; I have no idea if you have to follow the weird naming format, but it works for me) and save it in <strong>~/Library/LaunchAgents</strong> (create this folder if it doesn&#8217;t exist).  Don&#8217;t forget to change the second <strong>ProgramArguments</strong> string to the location of your Python script.</p>
<ol class="codelist">
<li class="tab0 odd"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
	  &lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;<br />
&lt;plist version=&quot;1.0&quot;&gt;<br />
	  &lt;dict&gt;<br />
		    &lt;key&gt;Label&lt;/key&gt;<br />
		    &lt;string&gt;org.j4mie.check-gmail&lt;/string&gt;<br />
		    &lt;key&gt;OnDemand&lt;/key&gt;<br />
		    &lt;true/&gt;<br />
		    &lt;key&gt;ProgramArguments&lt;/key&gt;<br />
		    &lt;array&gt;</code></li>
<li class="tab9 even"><code>&lt;string&gt;/usr/bin/python&lt;/string&gt;<br />
			      &lt;string&gt;/Users/yourusername/path/to/check-gmail.py&lt;/string&gt;<br />
		    &lt;/array&gt;<br />
		    &lt;key&gt;StartInterval&lt;/key&gt;<br />
		    &lt;integer&gt;60&lt;/integer&gt;<br />
	  &lt;/dict&gt;<br />
&lt;/plist&gt;</code></li>
</ol>
<p>UPDATE: As Jonas Stenberg <a href="#comment-98780">pointed out</a> in the comments, you may need to alter the <code>/usr/bin/python</code> string in this plist file to point to the location of the Python interpreter on your machine, for example <code>/usr/local/bin/python2.5</code>.</p>
<p>To load this plist file into launchd, type <code>launchctl load ~/Library/LaunchAgents/org.j4mie.check-gmail.plist</code> at the terminal (or reboot your computer).</p>
<p>And, with any luck, that should be it!  Once a minute, your Python script will execute, checking for any new emails in your inbox.  If any have arrived, your cube (or other output device) should spring into life!</p>
<p><img src="http://www.j4mie.org/wordpress/wp-content/uploads/2008/02/finishedcube.jpg" title="Physical Notifier" alt="Physical Notifier" /></p>
<p>UPDATE: Here&#8217;s a much nicer version of the Python script, using the Universal Feed Parser module from <a href="http://www.feedparser.org/">www.feedparser.org</a></p>
<ol class="codelist">
<li class="tab0 odd"><code>import serial, sys, feedparser</code></li>
<li class="even">&nbsp;</li>
<li class="tab0 odd"><code>#Settings - Change these to match your account details<br />
USERNAME=&quot;username@gmail.com&quot;<br />
PASSWORD=&quot;yourpassword&quot;</code></li>
<li class="tab1 even"><code>PROTO=&quot;https://&quot;<br />
SERVER=&quot;mail.google.com&quot;<br />
PATH=&quot;/gmail/feed/atom&quot;</code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code>SERIALPORT = &quot;/dev/tty.usbserial-FTDK0P3M&quot; # Change this to your serial port!</code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code># Set up serial port</code></li>
<li class="tab0 odd"><code>try:</code></li>
<li class="tab1 even"><code>ser = serial.Serial(SERIALPORT, 9600)</code></li>
<li class="tab0 odd"><code>except serial.SerialException:</code></li>
<li class="tab1 even"><code>sys.exit()</code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code>newmails = int(feedparser.parse(PROTO + USERNAME + &quot;:&quot; + PASSWORD + &quot;@&quot; + SERVER + PATH)[&quot;feed&quot;][&quot;fullcount&quot;])</code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code># Output data to serial port</code></li>
<li class="tab0 odd"><code>if newmails &gt; 0: ser.write('M')</code></li>
<li class="tab0 even"><code>else: ser.write('N')</code></li>
<li class="odd">&nbsp;</li>
<li class="tab0 even"><code># Close serial port</code></li>
<li class="tab0 odd"><code>ser.close()</code></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.j4mie.org/2008/02/15/how-to-make-a-physical-gmail-notifier/feed/</wfw:commentRss>
		<slash:comments>119</slash:comments>
		</item>
		<item>
		<title>How to hack Acoms AS-16 servos</title>
		<link>http://www.j4mie.org/2007/11/02/how-to-hack-acoms-as-16-servos/</link>
		<comments>http://www.j4mie.org/2007/11/02/how-to-hack-acoms-as-16-servos/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 16:57:16 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Electronics + Robotics]]></category>

		<guid isPermaLink="false">http://www.j4mie.org/2007/11/02/how-to-hack-acoms-as-16-servos/</guid>
		<description><![CDATA[Servos are small DC motors that come in a convenient package with a gearbox.  They incorporate a feedback loop &#8211; the output shaft of the servo is connected to a potentiometer which measures its current position.  This allows the shaft to be set to specific angles by sending the servo a coded signal. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Servomotor">Servos</a> are small DC motors that come in a convenient package with a gearbox.  They incorporate a feedback loop &#8211; the output shaft of the servo is connected to a potentiometer which measures its current position.  This allows the shaft to be set to specific angles by sending the servo a coded signal.  The downside is that the shaft can&#8217;t rotate through the full 360 degrees, making them useless as drive motors.<font size="-1"><br />
</font></p>
<p>It is possible to modify servos to rotate continuously.  There are several guides online about how to do this (<a href="http://www.seattlerobotics.org/guide/servohack.html">this one</a>, for example).  Each servo is slightly different, though, and I thought it might be useful to post a guide about how to hack the servo that I happened to buy &#8211; the extremely cheap Acoms AS-16 &#8211; in case any future Googlers happen to run into the same problems.</p>
<p><img src="http://farm3.static.flickr.com/2011/1827715408_ae8a127efa_m.jpg" title="Acoms AS-16" alt="Acoms AS-16" height="180" width="240" /></p>
<p><span id="more-92"></span></p>
<p><strong>You will need:</strong></p>
<p>Acoms AS-16 servo (may work with other servos too!)<br />
Two 2.2kΩ resistors<br />
Small Philips screwdriver<br />
Small flat head screwdriver<br />
Wire clippers or sharp knife<br />
Soldering iron<br />
Solder<br />
Heatshrink</p>
<p><strong>Click on each picture for a larger version. </strong> To see the Flickr set containing all the photos, click <a href="http://www.flickr.com/photos/j4mie/sets/72157602843322296/">here</a>.</p>
<p><strong>Step 1: </strong>Remove the four screws on the outside of the servo.</p>
<p><a href="http://farm3.static.flickr.com/2341/1827696214_d58396bef2_o.jpg"><img src="http://farm3.static.flickr.com/2341/1827696214_d376cd475a_m.jpg" title="Step 1" alt="Step 1" height="180" width="240" /></a></p>
<p><strong>Step 2: </strong>Remove the top of the servo case to reveal the gears inside.</p>
<p><a href="http://farm3.static.flickr.com/2123/1827697072_12fa80f244_o.jpg"><img src="http://farm3.static.flickr.com/2123/1827697072_8aad349e0f_m.jpg" title="Step 2" alt="Step 2" height="180" width="240" /></a></p>
<p><strong>Step 3:</strong> Remove the top three gears.  Try to keep as much of the grease on them as you can.</p>
<p><a href="http://farm3.static.flickr.com/2074/1826862765_2bfccae1c8_o.jpg"><img src="http://farm3.static.flickr.com/2074/1826862765_27aca2dee0_m.jpg" title="Step 3" alt="Step 3" height="180" width="240" /></a></p>
<p><strong>Step 4:</strong> Remove the two screws next to the remaining gear.</p>
<p><a href="http://farm3.static.flickr.com/2061/1826863741_0f65d0cc8b_o.jpg"><img src="http://farm3.static.flickr.com/2061/1826863741_4d3f3d28f6_m.jpg" title="Step 4" alt="Step 4" height="180" width="240" /></a></p>
<p><strong>Step 5:</strong> Lift the next part of the case.  The potentiometer is connected to the circuit board by three wires.</p>
<p><a href="http://farm3.static.flickr.com/2372/1826864901_8e72a1afb2_o.jpg"><img src="http://farm3.static.flickr.com/2372/1826864901_3380ac32eb_m.jpg" height="180" width="240" /></a></p>
<p>The potentiometer is held in place with a small amount of glue and two clips.</p>
<p><a href="http://farm3.static.flickr.com/2049/1826866079_ad1969829f_o.jpg"><img src="http://farm3.static.flickr.com/2049/1826866079_f7e1ec505a_m.jpg" title="Clips" alt="Clips" height="180" width="240" /></a></p>
<p><strong>Step 6:</strong> Scrape off the glue with a screwdriver.  Give it a good wiggle in the slot until all the glue is broken.</p>
<p><a href="http://farm3.static.flickr.com/2380/1826867177_176e862d5e_o.jpg"><img src="http://farm3.static.flickr.com/2380/1826867177_65e1d2058c_m.jpg" title="Scrape off glue" alt="Scrape off glue" height="180" width="240" /></a></p>
<p><strong>Step 7:</strong> Pull open the clips with your fingernail or a screwdriver.  Press on the shaft of the potentiometer until it slides out of the servo case.</p>
<p><a href="http://farm3.static.flickr.com/2411/1827703514_ea112d95e5_o.jpg"><img src="http://farm3.static.flickr.com/2411/1827703514_56bec8ab5a_m.jpg" title="Potentiometer" alt="Potentiometer" height="180" width="240" /></a></p>
<p><strong>Step 8:</strong> Heat up the solder on the potentiometer tags and pull off the wires.</p>
<p><a href="http://farm3.static.flickr.com/2258/1826869195_00ff80d171_o.jpg"><img src="http://farm3.static.flickr.com/2258/1826869195_96b6e2059c_m.jpg" title="Free wires" alt="Free wires" height="180" width="240" /></a></p>
<p><strong>Step 9: </strong>Cut three pieces of heatshrink, each approx 10mm long.  Slide them to the bottom of the three wires.</p>
<p><a href="http://farm3.static.flickr.com/2166/1826870133_bb401a87f2_o.jpg"><img src="http://farm3.static.flickr.com/2166/1826870133_9049fc2d3f_m.jpg" title="Heatshrink" alt="Heatshrink" height="180" width="240" /></a></p>
<p><strong>Step 10:</strong> Solder 2.2kΩ resistors to the <strong>white</strong> and <strong>grey</strong> wires.</p>
<p><a href="http://farm3.static.flickr.com/2111/1826870987_01198c6544_o.jpg"><img src="http://farm3.static.flickr.com/2111/1826870987_ab8d9e2b9d_m.jpg" title="Resistors" alt="Resistors" height="180" width="240" /></a></p>
<p><strong>Step 11:</strong> Twist the legs of the two resistors together, and solder the <strong>brown</strong> wire to them.</p>
<p><a href="http://farm3.static.flickr.com/2330/1826871937_53b6113318_o.jpg"><img src="http://farm3.static.flickr.com/2330/1826871937_b19ed92576_m.jpg" title="Twist together" alt="Twist together" height="180" width="240" /></a></p>
<p><strong>Step 12:</strong> Slide the heatshrink up the wires to cover the joints and heat it with the soldering iron to shrink it.</p>
<p><a href="http://farm3.static.flickr.com/2361/1826872947_82ba780678_o.jpg"><img src="http://farm3.static.flickr.com/2361/1826872947_5a6c12001b_m.jpg" title="Heatshrink" alt="Heatshrink" height="180" width="240" /></a></p>
<p><strong>Step 13:</strong> Carefully wrap the wires up and push them into the servo case.  Leave a gap next to the motor for the plastic support on the top case.</p>
<p><a href="http://farm3.static.flickr.com/2183/1827708918_ad02a4b042_o.jpg"><img src="http://farm3.static.flickr.com/2183/1827708918_9e853d29d0_m.jpg" title="Wrap up wires" alt="Wrap up wires" height="180" width="240" /></a></p>
<p><strong>Step 14:</strong> Slide on the motor cover piece.  Reattach it with the small screws.</p>
<p><a href="http://farm3.static.flickr.com/2162/1827709796_d3b7c8109d_o.jpg"><img src="http://farm3.static.flickr.com/2162/1827709796_1b417da05c_m.jpg" title="Reattach motor cover" alt="Reattach motor cover" height="180" width="240" /></a></p>
<p><strong>Step 15:</strong> Find the gear which is connected to the servo&#8217;s output shaft.  It looks like this:</p>
<p><a href="http://farm3.static.flickr.com/2228/1826875763_983db22a59_o.jpg"><img src="http://farm3.static.flickr.com/2228/1826875763_5e4582d0ff_m.jpg" title="Gear with output shaft" alt="Gear with output shaft" height="180" width="240" /></a></p>
<p>On the back of the gear is a small plastic stop which prevents the shaft rotating all the way round.  Carefully remove it, using either a sharp knife or a pair of wire cutters.  If you use the latter method, it should &#8220;ping&#8221; off quite easily in one piece.</p>
<p>Before:</p>
<p><a href="http://farm3.static.flickr.com/2263/1827711470_a7be918ae0_o.jpg"><img src="http://farm3.static.flickr.com/2263/1827711470_3ab832db62_m.jpg" title="Tab - before" alt="Tab - before" height="180" width="240" /></a></p>
<p>After:</p>
<p><a href="http://farm3.static.flickr.com/2241/1827712184_3e15a00d3e_o.jpg"><img src="http://farm3.static.flickr.com/2241/1827712184_fd62d3685b_m.jpg" title="Tab - after" alt="Tab - after" height="180" width="240" /></a></p>
<p><strong>Step 16:</strong> Sit this gear on the plastic axle that used to contain the potentiometer shaft.  Spin it round with your fingers and make sure it can move 360 degrees freely and smoothly, with no catching.  If it does catch, use a small file or knife to make sure the plastic stop is completely gone.</p>
<p><a href="http://farm3.static.flickr.com/2018/1827712894_bb4f899b08_o.jpg"><img src="http://farm3.static.flickr.com/2018/1827712894_40f1b8a114_m.jpg" title="Moves smoothly" alt="Moves smoothly" height="180" width="240" /></a></p>
<p><strong>Step 17:</strong> Reattach the other two gears.</p>
<p><a href="http://farm3.static.flickr.com/2406/1826878893_404b4455a6_o.jpg"><img src="http://farm3.static.flickr.com/2406/1826878893_47199657f7_m.jpg" title="Gear one" alt="Gear one" height="180" width="240" /></a></p>
<p><a href="http://farm3.static.flickr.com/2317/1827714514_d2bb5cdaf8_o.jpg"><img src="http://farm3.static.flickr.com/2317/1827714514_25c7e7fa02_m.jpg" title="Gear two" alt="Gear two" height="180" width="240" /></a></p>
<p><strong>Step 18:</strong> Place the top of the servo case back on, and screw in the four long screws.</p>
<p><a href="http://farm3.static.flickr.com/2011/1827715408_fbf5dd7c92_o.jpg"><img src="http://farm3.static.flickr.com/2011/1827715408_ae8a127efa_m.jpg" title="Finished" alt="Finished" height="180" width="240" /></a></p>
<p><strong>Finished!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.j4mie.org/2007/11/02/how-to-hack-acoms-as-16-servos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
