<?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>Crash Space</title>
	<atom:link href="http://blog.crashspace.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.crashspace.org</link>
	<description></description>
	<lastBuildDate>Sun, 07 Mar 2010 23:48:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>BristleBots and LED throwie art at Crash Space!</title>
		<link>http://blog.crashspace.org/2010/03/bristlebots-and-led-throwie-art-at-crash-space/</link>
		<comments>http://blog.crashspace.org/2010/03/bristlebots-and-led-throwie-art-at-crash-space/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 23:38:59 +0000</pubDate>
		<dc:creator>todbot</dc:creator>
				<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://blog.crashspace.org/?p=400</guid>
		<description><![CDATA[This upcoming Tuesday, 9 March 2010, 8pm at Crash Space in Culver City, we&#8217;ll be having some fun quick DIY projects for you to build.  Come on over and have fun with us.  The project kits are $5 for CrashSpace members or $10 for non-members and you can take them home after you [...]]]></description>
			<content:encoded><![CDATA[<p>This upcoming Tuesday, 9 March 2010, 8pm at <a href="http://blog.crashspace.org/">Crash Space</a> in Culver City, we&#8217;ll be having some fun quick DIY projects for you to build.  Come on over and have fun with us.  The project kits are $5 for CrashSpace members or $10 for non-members and you can take them home after you build them.  </p>
<p>In the kit you get the parts to build your own <a href="http://www.evilmadscientist.com/article.php/bristlebot">Bristlebot</a>, a tiny robot made from a toothbrush:<br />
<a href="http://www.flickr.com/photos/todbot/4415230836/"><img src='http://farm5.static.flickr.com/4068/4415230836_3eaccd1d39.jpg'></a><br />
(consists of toothbrush, pager motor, battery, and foam tape)</p>
<p>and LED throwie art:<br />
<a href="http://www.flickr.com/photos/todbot/4414504941/"><img src='http://farm5.static.flickr.com/4010/4414504941_ef8e2ac352.jpg'></a><br />
<a href="http://www.flickr.com/photos/todbot/4414614045/"><img src='http://farm5.static.flickr.com/4002/4414614045_f42f75e846.jpg'></a><br />
(consists of two color-changing RGB LEDs, battery, and a magnet)</p>
<p>We&#8217;ll have a Bristlebot race track you can do time trials on:<br />
<a href="http://www.flickr.com/photos/todbot/4345155456/"><img src='http://farm5.static.flickr.com/4039/4345155456_b2e8ba1f76.jpg'></a></p>
<p><object type="application/x-shockwave-flash" width="500" height="375" data="http://www.flickr.com/apps/video/stewart.swf?v=71377" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="flashvars" value="intl_lang=en-us&#038;photo_secret=d8baa1f3ec&#038;photo_id=4351680097"></param><param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=71377"></param><param name="bgcolor" value="#000000"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=71377" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&#038;photo_secret=d8baa1f3ec&#038;photo_id=4351680097" height="375" width="500"></embed></object></p>
<p>And we&#8217;ll be showing you how to build all of this, no previous experience required.  Come build bots and lights!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crashspace.org/2010/03/bristlebots-and-led-throwie-art-at-crash-space/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SpeedMake: Kick Off</title>
		<link>http://blog.crashspace.org/2010/03/speedmake-kick-off/</link>
		<comments>http://blog.crashspace.org/2010/03/speedmake-kick-off/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 00:26:54 +0000</pubDate>
		<dc:creator>Bardus Aude</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Contests]]></category>
		<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://blog.crashspace.org/?p=393</guid>
		<description><![CDATA[At the March 2nd Tuesday night meeting, a few brave volunteers participated in the very first SpeedMake event. SpeedMake is a contest of skill and science in which teams race against each other to be the first to complete an electronics project.
For this event, competitors worked to build Larson Scanners (see the picture below), a [...]]]></description>
			<content:encoded><![CDATA[<p>At the March 2nd Tuesday night meeting, a few brave volunteers participated in the very first SpeedMake event. SpeedMake is a contest of skill and science in which teams race against each other to be the first to complete an electronics project.</p>
<p>For this event, competitors worked to build Larson Scanners (see the picture below), a device which lights LEDs in sequence to create a scanning effect. People reverse engineered circuit boards, puzzled through IC spec sheets, breadboarded their projects, and totally ignored the optional crypto breaking aspect of the event (more&#8217;s the pity). We even got some Madden NFL-style commentary going. SpeedMake may not be the most gripping, thrilling sporting experience since the invention of the monster truck rally, but it looked like people were having fun.</p>
<p>If you find SpeedMake intriguing and you wish to subscribe to our newsletter, there’s more information at the Crash Space wiki, <a href="http://crashspace.pbworks.com/SpeedMake">here</a>. There will also be some announcements about the next upcoming SpeedMake event at this Tuesday’s Public Night meeting.</p>
<div id="attachment_392" class="wp-caption alignright" style="width: 310px"><a href="http://blog.crashspace.org/wp-content/uploads/2010/03/Larson-Scanner.jpg"><img class="size-medium wp-image-392" src="http://blog.crashspace.org/wp-content/uploads/2010/03/Larson-Scanner-300x225.jpg" alt="A Larson Scanner. Lots of blinkenlights." width="300" height="225" /></a><p class="wp-caption-text">The Larson Scanner built by Tod Kurt and Chris Sloan of winning team ShortWire in a hard contested 30 minute match</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.crashspace.org/2010/03/speedmake-kick-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>monochrom: Of drunken machines and horny relays</title>
		<link>http://blog.crashspace.org/2010/02/monochrom-of-drunken-machines-and-horny-relays/</link>
		<comments>http://blog.crashspace.org/2010/02/monochrom-of-drunken-machines-and-horny-relays/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 16:19:51 +0000</pubDate>
		<dc:creator>Sean Bonner</dc:creator>
				<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://blog.crashspace.org/?p=380</guid>
		<description><![CDATA[Sex machines! Cocktail robots! And more!
On Feb 24th, Johannes Grenzfurthner will be giving a workshop called &#8220;Of drunken machines and horny relays&#8221; in which he&#8217;ll be talking about how to build DIY hedonistic machines as well as about two of his on going conferences/project Roboexotica (which explores the under appreciated art of cocktail robotics) and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.facebook.com/event.php?eid=324010610094"><img src="http://blog.crashspace.org/wp-content/uploads/2010/02/n344585746317_2816.jpeg" alt="" width="200" height="266" align="right" /></a>Sex machines! Cocktail robots! And more!</p>
<p>On Feb 24th, <a href="http://en.wikipedia.org/wiki/Johannes_Grenzfurthner">Johannes Grenzfurthner</a> will be giving a workshop called &#8220;Of drunken machines and horny relays&#8221; in which he&#8217;ll be talking about how to build DIY hedonistic machines as well as about two of his on going conferences/project Roboexotica (which explores the under appreciated art of cocktail robotics) and Arse Elektronica (which explores the intersection of porn and technology). His talk will start at 8PM Wednesday night at Crash Space and will be open to the public (free for members, $10 donation recommended for non members)</p>
<p>UPDATE: We streamed the talk live, and an archive of the video is available online now but it broken into 2 parts for some reason. Watch it yourself: <a href="http://www.ustream.tv/recorded/4988768">Part 1</a> (15:00) | <a href="http://www.ustream.tv/recorded/4989104">Part 2</a> (48:00)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crashspace.org/2010/02/monochrom-of-drunken-machines-and-horny-relays/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Take Apart Tuesday No. 6 &#8211; HP 1120C</title>
		<link>http://blog.crashspace.org/2010/02/take-apart-tuesday-no-6/</link>
		<comments>http://blog.crashspace.org/2010/02/take-apart-tuesday-no-6/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 23:27:00 +0000</pubDate>
		<dc:creator>carlyn</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[dc]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[motor]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[smoke]]></category>
		<category><![CDATA[TakeApartTuesday]]></category>

		<guid isPermaLink="false">http://blog.crashspace.org/?p=373</guid>
		<description><![CDATA[So a bit of a rewind on Take Apart Tuesday. This is the write up for February 9th. I was going to skip it and just go straight for hard drive we dismantled on the 16th, but a potentiometer actually smoked (sorry, no flames). It seemed like a requirement to share what that happened.

So this [...]]]></description>
			<content:encoded><![CDATA[<p>So a bit of a rewind on Take Apart Tuesday. This is the write up for February 9th. I was going to skip it and just go straight for hard drive we dismantled on the 16th, but a potentiometer actually smoked (sorry, no flames). It seemed like a requirement to share what that happened.</p>
<p><object width="384" height="313"><param name="movie" value="http://www.youtube.com/v/pWwsG2Ddd2A&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/pWwsG2Ddd2A&#038;fs=1" type="application/x-shockwave-flash" width="384" height="313" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>So this week a bit on optical encoding, then some on stall torque and how it relates to component power ratings.  Just for giggles I threw in some DC Motor code on the Arduino at the end. So keep reading… The Case of the Smoking Potentiometer</p>
<p><span id="more-373"></span></p>
<h2><strong>Encoding Speed and Location with a DC Motor</strong></h2>
<p>So the original plan for for the HP DeskJet 1120C was to crack it open, swap out the ink cartridge for a pen and then control the stepper motors based on sensor data to create a custom output device that actually gives you an instant hard copy datalog like a seismograph or lie detector.  It is a fun thing to do with old printers.</p>
<p>The tricky part is that once the 1120C was open it wasn&#8217;t actually a stepper motor controlling the horizontal location of the print head. Instead this printer uses a method called <a href="http://mechatronics.mech.northwestern.edu/design_ref/sensors/encoders.html">optical encoding</a> and a plain old DC motor to determine where the print head should be.</p>
<p>http://www.flickr.com/photos/carlynorama/sets/72157623489291976/</p>
<p>A strip of plastic with fine lines feeds past an IC called the <a href="http://groups.google.mw/group/sci.electronics.components/browse_thread/thread/a8555b7e3eba7652">Q9864</a>, a quadrature decoder. This chip has two outputs that each use sensors to detect the black lines on the strip as they zip past.  The spacing between the sensors is such that the readings from outputs are offset, 90° out of phase, apparently.  This allows the processor receiving the data to determine which direction the print head is moving.  The output is TTL compliant. (TTL: Transistor to Transistor Logic, it means this IC can directly talk to other similar integrated circuits with the understanding that &#8220;1&#8243; is conveyed by generating a voltage level somewhere between 2V and 5.25V and &#8220;0&#8243; is represented by any voltage under 0.8V)</p>
<p>Now to attempt hacking into this chip it would be best to have an Oscilloscope, etc, but I haven&#8217;t even covered basic DC motor stuff and we have a smoking potentiometer to get to.  I&#8217;m going to take the dodge and point people to a project that was just in Issue 20 of MAKE called the <a href="http://makezine.com/20/autophena/">Autophenakistoscope</a>.</p>
<p><a href="http://www.retro-tronics.com/Phenakistoscope/Phenakistoscope.mov">Video on Retro-Tronics</a></p>
<p>Why point to this project you ask? Well the Autophenakistoscope is a phenakistoscope (early moving-picture device) that uses an<a href="http://www.sparkfun.com/commerce/product_info.php?products_id=241"> infrared emitter and detector pair</a> in conjunction with regularly placed slits in a moving cardboard wheel  in order to control the speed of a motor. The Q9864 with it&#8217;s strip is essentially an advanced version of this setup so looking at the code MAKE has published is a good way to figure out what to do with the data once you&#8217;ve gotten it anyway.</p>
<p>But the thing I haven&#8217;t covered is, &#8220;Why would HP do this to me and ruin my fabulous quick project idea?&#8221; Um, I mean, &#8220;What are the advantages of using encoded motor control over a basic stepper motor?&#8221; Simply stated, motors sometimes slip so it is good to have an independent outside source confirming that the motor is where you think it is. Many <a href="http://en.wikipedia.org/wiki/Numerical_control">CNC</a> routers, printers, etc. opt for this type of encoding rather than taking on faith that a stepper will always be on it&#8217;s best behavior.</p>
<p><strong> </strong></p>
<h2><strong>Direct DC Motor Control And What can Go Wrong</strong></h2>
<p><strong> </strong></p>
<p>So instead of just hijacking another stepper, like we could do <a href="http://www.youtube.com/watch?v=y9cA1NFqR9w">with the paper feed stepper</a>, we needed to build a circuit for this new motor. If you remember, the motor in our toothbrush was a DC motor and the circuit consisted of a battery, a switch and the motor.  This is the most basic circuit and it is the one we recreated to verify that the motor worked and what voltage it needed to move.   Following the advice I gave in <a href="http://blog.crashspace.org/2010/02/take-apart-tuesday-no-5-electric-toothbrushes/">TAT0005</a> I started with my lowest available voltage &#8211; 5V from an Arduino board powered from am external power supply. When that failed to move the motor at all, the next available power source was a 9V battery. A straight from the package 9V moved the motor hesitantly.  The problem here may actually have been a current/torque issue since the motor was still attached to the rubber belt and the print head. What finally worked cleanly was a 12V/1Amp supply.</p>
<p>Video Recreation:</p>
<p><object width="384" height="313"><param name="movie" value="http://www.youtube.com/v/plS_dCzcBaM&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/plS_dCzcBaM&#038;fs=1" type="application/x-shockwave-flash" width="384" height="313" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a title="IMG_5795 by carlynorama, on Flickr" href="http://www.flickr.com/photos/carlynorama/4380559380/"><img src="http://farm5.static.flickr.com/4006/4380559380_59f14829da_m.jpg" alt="IMG_5795" width="240" height="180" /></a></p>
<h2><strong>The Best Laid Plans</strong></h2>
<p>Off and on isn&#8217;t always fun enough, though.  The way to change the behavior of a motor is to change the way it&#8217;s getting its power.  To change direction &#8211; swap the position of the leads. To change speed &#8211; change the amount of voltage across the leads.  To provide more torque &#8211; increase the current available.</p>
<p>I wanted to quickly demonstrate speed control. To change the voltage available to the motor with a fixed voltage power supply you can <a href="http://www.allaboutcircuits.com/vol_1/chpt_5/1.html">add a resistor in series</a> with the motor. This resistor will burn off some of the potential energy/voltage as heat, decreasing what is available to the motor.  How much energy it steals from the circuit is related to how big of a resistor it is; a 100 Ohm resistor will drop the voltage a lot less than a 10k Ohm resistor.  You can calculate all this with <a href="http://www.allaboutcircuits.com/vol_1/chpt_2/1.html">Ohm&#8217;s Law</a> which I&#8217;ll use again later…</p>
<p>If you want to change the speed as you go the fixed resistor can be replaced by a variable resistor or rheostat.   <a href="http://www.allaboutcircuits.com/vol_6/chpt_3/7.html">All About Circuits</a> has a very good explanation of how this is done using a potentiometer.</p>
<p>And…. well, if you watched the video at the top of the post, you know what happened.</p>
<h2><strong>Pot Smoking</strong></h2>
<p>So, why did the potentiometer smoke? A few things, but the most important was that <strong>I failed to know my component.</strong> What do I mean by that? I mean that I grabbed a potentiometer out of my kit and ignored its power rating because I thought for a couple of seconds it wouldn&#8217;t matter. Wrong!</p>
<p>The three things I should have had in mind:</p>
<ul>
<li>Resistors dissipate energy as heat</li>
<li>Resistors/Potentiometers are given <a href="http://www.electronics-tutorials.ws/resistor/res_7.html">power ratings</a> based on the combination of voltage and current they can handle before they get immensely hot and fail. This is given in Watts (Watts = Volts * Amps)</li>
<li>Most of my pots are cheap 1/4 to 1/2 Watt jobs meant for use with a micro-controller</li>
<li>Motors draw A LOT of current when they are stalled.  Their resistance drops because no <a href="http://en.wikipedia.org/wiki/Counter-electromotive_force">counter EMF</a> is being generated to push against the current supplied by the power supply and <a href="http://www.the12volt.com/ohm/ohmslaw.asp">Ohm&#8217;s Law</a> tells us a drop in resistance at a a steady voltage will lead to a rise in the current. (V=I*R)   (<a href="http://www.combots.net/wiki/index.php/Stall_current">How much current are we talking about?</a>)</li>
<li>I was forcing the motor to stall. Repeatedly.</li>
<li>Plastic burns.</li>
</ul>
<p>So as the resistance in the potentiometer increased, the voltage to the motor dropped, and its speed dropped. The motor&#8217;s resistance plummeted faster than the resistance in the pot increased. The whole system started drawing more current.  This current was being pulled through the increased resistance of the pot… well to sum up it is entirely possible I was dragging a full amp at 12 V through a 1/4 W resistor set to its maximum resistance &#8211; hence smoke…</p>
<p><strong> </strong></p>
<h2><strong>So how do all those cheap electronics work?</strong></h2>
<p>A potentiometer that can handle 12.5 W can run between $15.00 to $30.00, depending on the quantity ordered.  Additionally, dropping voltage to a motor through resistance wastes a lot of energy and creates a lot of heat.  For these and other reasons a rheostat directly in series with a DC motor of any strength is not the method of choice for controlling speed.  What frequently gets used instead is something called <a href="http://www.tigoe.net/pcomp/code/input-output/analog-output">Pulse Width Modulation</a>.  This involves separating your control circuit (microcontroller/other pulsing IC) from your load circuit (motor) and <a href="http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads">using a microcontroller</a> or something like a <a href="http://www.dprg.org/tutorials/2005-11a/index.html"> 555 timer</a> to turn the load on and off very fast. The ratio of on time to off time controls the speed. More on, faster. More off, slower.</p>
<p><strong> </strong></p>
<p>FYI &#8211; separating the logic from the load makes <a href="http://itp.nyu.edu/physcomp/Labs/DCMotorControl">switching directions easier</a> because power and ground aren&#8217;t hardwired to the leads of the motor directly.  For the sake of symmetry with TAT0004 I&#8217;ve duplicated the Stepper Motor Random Motion program as an example.</p>
<p><object width="384" height="313"><param name="movie" value="http://www.youtube.com/v/byN14xb9JSY&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/byN14xb9JSY&#038;fs=1" type="application/x-shockwave-flash" width="384" height="313" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Circuit Board:</p>
<p><a title="IMG_5804 by carlynorama, on Flickr" href="http://www.flickr.com/photos/carlynorama/4379793479/"><img src="http://farm3.static.flickr.com/2748/4379793479_e83c121e9f_m.jpg" alt="IMG_5804" width="180" height="240" /></a></p>
<p><a href="http://23longacre.com/sharedFiles/code/arduino/motors/DCMotor_RandomMotion.txt">Code Here</a></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crashspace.org/2010/02/take-apart-tuesday-no-6/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
<enclosure url="http://www.retro-tronics.com/Phenakistoscope/Phenakistoscope.mov" length="9671970" type="video/quicktime" />
		</item>
		<item>
		<title>Radio Mondays: RC hobby gear</title>
		<link>http://blog.crashspace.org/2010/02/radio-mondays-rc-hobby-gear/</link>
		<comments>http://blog.crashspace.org/2010/02/radio-mondays-rc-hobby-gear/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 20:08:01 +0000</pubDate>
		<dc:creator>outlawpoet</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.crashspace.org/?p=369</guid>
		<description><![CDATA[
My outline notes of the meeting
We had another great Radio Mondays(about 10 attending), we discussed the wide variety of RC toys and models and organizations; paying special attention to areas people might be interested in trying out something. 
The toy helicopter above was very popular to fly around, although it&#8217;s a bit tricky to control. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.crashspace.org/wp-content/uploads/2010/02/Micro-Hughes-Infrared-Control-Toy-Helicopter-KEH609-.jpg"><img src="http://blog.crashspace.org/wp-content/uploads/2010/02/Micro-Hughes-Infrared-Control-Toy-Helicopter-KEH609--300x206.jpg" alt="" width="300" height="206" class="alignnone size-medium wp-image-370" /></a></p>
<p><a href="http://docs.google.com/View?id=dj2vts8_31dsdwtzf9">My outline notes of the meeting</a></p>
<p>We had another great Radio Mondays(about 10 attending), we discussed the wide variety of RC toys and models and organizations; paying special attention to areas people might be interested in trying out something. </p>
<p>The toy helicopter above was very popular to fly around, although it&#8217;s a bit tricky to control. Organizations like Big Gun scale ship combat and 3D-flying helicopter races were explored in detail, and we discussed some alternate uses of RC gear, like controlling art installations, decorations, using hobby flight gear as a cheap intro to UAV design, and much more. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crashspace.org/2010/02/radio-mondays-rc-hobby-gear/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Public Night!</title>
		<link>http://blog.crashspace.org/2010/02/public-night/</link>
		<comments>http://blog.crashspace.org/2010/02/public-night/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 17:06:46 +0000</pubDate>
		<dc:creator>daryll</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[News & Updates]]></category>

		<guid isPermaLink="false">http://blog.crashspace.org/?p=361</guid>
		<description><![CDATA[Are you curious about Crash Space? Want to figure out what people do at a hacker space? Want to meet some interesting people?
Now is your chance to check out Crash Space. Tomorrow night (Tuesday Feb 9th) at 8pm our usual Tuesday night meeting is open to the public.
What do we do at our usual Tuesday [...]]]></description>
			<content:encoded><![CDATA[<p>Are you curious about Crash Space? Want to figure out what people do at a hacker space? Want to meet some interesting people?</p>
<p>Now is your chance to check out Crash Space. Tomorrow night (Tuesday Feb 9th) at 8pm our usual Tuesday night meeting is open to the public.</p>
<p>What do we do at our usual Tuesday night meeting? A brief bit of CrashSpace business. A show and tell session by our members. Lots of interesting parts and projects show up. Finally, there&#8217;s Take Apart Tuesday. The group takes apart a couple pieces of hardware and figures out what&#8217;s inside them, how they work, and what parts might be useful to scavenge.</p>
<p>Come on by Crash Space at 8pm and see what it&#8217;s all about. We&#8217;d love to meet you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crashspace.org/2010/02/public-night/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacker-Supplies Field Trip</title>
		<link>http://blog.crashspace.org/2010/02/hacker-supplies-field-trip/</link>
		<comments>http://blog.crashspace.org/2010/02/hacker-supplies-field-trip/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 03:19:54 +0000</pubDate>
		<dc:creator>carlyn</dc:creator>
				<category><![CDATA[Local Resources]]></category>

		<guid isPermaLink="false">http://blog.crashspace.org/?p=354</guid>
		<description><![CDATA[Thursday Hutch and I did the rounds at various local outlets for Physical Computing/Hardware Hacking resources.  LA is SPOILED, I tell you. Coming from NYC, the idea that you can walk into a place &#8211; more than one place &#8211; and buy components is crazy talk.
Here are some selected photos from that trip, more on [...]]]></description>
			<content:encoded><![CDATA[<p>Thursday Hutch and I did the rounds at various local outlets for Physical Computing/Hardware Hacking resources.  LA is SPOILED, I tell you. Coming from NYC, the idea that you can walk into a place &#8211; more than one place &#8211; and buy components is crazy talk.</p>
<p>Here are some selected photos from that trip, more <a href="http://www.flickr.com/photos/carlynorama/collections/72157623243545489/">on flickr</a>, and <a href="http://crashspace.pbworks.com/Hacker-Supplies">more resources</a> on our wikipage.</p>
<p><object width="500" height="700"><param name="flashvars" value="offsite=true&#038;lang=en-us&#038;page_show_url=%2Fphotos%2Fcarlynorama%2Fsets%2F72157623243660993%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Fcarlynorama%2Fsets%2F72157623243660993%2F&#038;set_id=72157623243660993&#038;jump_to="></param><param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=71649"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=71649" allowFullScreen="true" flashvars="offsite=true&#038;lang=en-us&#038;page_show_url=%2Fphotos%2Fcarlynorama%2Fsets%2F72157623243660993%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Fcarlynorama%2Fsets%2F72157623243660993%2F&#038;set_id=72157623243660993&#038;jump_to=" width="500" height="700"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crashspace.org/2010/02/hacker-supplies-field-trip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Take Apart Tuesday No. 5: Electric Toothbrushes</title>
		<link>http://blog.crashspace.org/2010/02/take-apart-tuesday-no-5-electric-toothbrushes/</link>
		<comments>http://blog.crashspace.org/2010/02/take-apart-tuesday-no-5-electric-toothbrushes/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 21:15:24 +0000</pubDate>
		<dc:creator>carlyn</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[motor]]></category>
		<category><![CDATA[TakeApartTuesday]]></category>

		<guid isPermaLink="false">http://blog.crashspace.org/?p=337</guid>
		<description><![CDATA[This week&#8217;s Take Apart Tuesday is going to be a little light because we really spent the time after the meeting watching LOST.  LOVED IT.
I had dismantled two electric toothbrushes over the weekend preparing for an Introduction To Electronics class I&#8217;m teaching at Machine Project in March. I pretty much threw the parts on the [...]]]></description>
			<content:encoded><![CDATA[<p>This week&#8217;s Take Apart Tuesday is going to be a little light because we really spent the time after the meeting watching LOST.  LOVED IT.</p>
<p>I had dismantled two electric toothbrushes over the weekend preparing for an <a href="http://machineproject.com/events/2010/03/21/intro-to-electronics/">Introduction To Electronics</a> class I&#8217;m teaching at <a href="http://machineproject.com/">Machine Project</a> in March. I pretty much threw the parts on the table like chum saying &#8220;keep the talking to the commercials people.&#8221;</p>
<p>That said I have written up a little bit about the nature of DC motors and provided links.</p>
<p><a title="Brushes by carlynorama, on Flickr" href="http://www.flickr.com/photos/carlynorama/4328957457/"><img src="http://farm5.static.flickr.com/4045/4328957457_cbdc816678.jpg" alt="Brushes" width="500" height="375" /></a></p>
<p><span id="more-337"></span>DC motors are pretty much a piece of cake compared to stepper motors. No multiple leads attached to separate coils, no microcontrollers necessary.  In fact the most basic circuit is just a motor, a power source and maybe a switch.  This motor is a very low-current, low-voltage motor that isn&#8217;t going to face a lot of resistance as it runs.  In higher voltage/current situations you&#8217;ll likely see diodes and capacitors thrown into the mix to improve performance and stability. You might also see ways to change the motor&#8217;s speed or direction.  I&#8217;ll talk about that stuff during the class.</p>
<p>Just like steppers, however, DC motors move because of the joys of electromagnetism.  Perhaps the best way to really get a handle on that is to build you own motor from scratch by either follow directions like <a href="http://www.exploratorium.edu/snacks/motor_effect/">the ones on the Exploratorium site</a> and using materials you scavenge up yourself or by <a href="http://astore.amazon.com/wwwcrashspace-20/detail/B001DI8OBU">buying a kit</a>. It can make a big difference to see the effect in action.</p>
<p>Commercial toy motors are commonly configured with 2 stationary magnets of opposite orientations (field magnets) jammed up against an the outside of the housing (stator). In the center is an electromagnet created by running current through coils wound about an armature (sometimes called a rotor). This armature is attached to the axle.  The current comes to the electromagnet through contacts on the axle which are rubbing against two brushes on the casing. In the toothbrush circuit each brush is attached to a different end of the battery.</p>
<p><a title="The brush contacts / commutator by carlynorama, on Flickr" href="http://www.flickr.com/photos/carlynorama/4328957781/"><img src="http://farm5.static.flickr.com/4032/4328957781_f2d5d0129e_m.jpg" alt="The brush contacts / commutator" width="240" height="180" /></a></p>
<p><a title="Coils soldered to brush contacts by carlynorama, on Flickr" href="http://www.flickr.com/photos/carlynorama/4329693774/"><img src="http://farm5.static.flickr.com/4044/4329693774_c0fca40306_m.jpg" alt="Coils soldered to brush contacts" width="180" height="240" /></a></p>
<p>The commutator (fancy name for axle contacts) allows the axle to spin freely unfettered by wires that would twist and snap while still allowing power to flow to the electromagnet. Because of the way the separate contacts on the axle are configured, the axle spinning translates into a change in the direction of the current through the coil windings of the electromagnet. The change in the direction of the current means the poles of the electromagnet invert. That flip happens at just the right time to prevent the magnets from getting comfortable with each other and reaching a stasis. The constant change keeps the motor agitated and in motion.</p>
<p>A lot of the &#8220;build your own motor&#8221; examples and basic <a href="http://electronics.howstuffworks.com/motor1.htm">&#8220;how motors work&#8221;</a> illustrations show an armature shaped like a bar with only two coils.  While that keeps things simple when explaining the concept, once you crack open a real motor there are going to be at least three windings. Having three makes for much smoother motion and the <a href="http://www.solarbotics.net/starting/200111_dcmotor/200111_dcmotor2.html">Solarbotics site</a> has a nice animation of how that works.</p>
<p>This motor is pretty straight forward and will run off a 1.5 AA battery.  But what if I gave it more juice? Different motors will have different strength magnets, have their wires wrapped around the armature more or less times, simply be bigger or smaller, etc. Therefore, each motor has different current and voltage requirements, and limitations. I found one article that talked about what to do if you get a motor and <a href="http://www.rcgroups.com/forums/showthread.php?t=185271">don&#8217;t know how much power it needs</a>. It presumes quite a bit of knowledge and a way to detect RPM, but is super handy if you buy surplus motors. It is even handy if you pull a motor out a known circuit as the manufacturer might be starving or pushing the motor too hard.</p>
<p>The next time we have a surplus DC motor with no basic information to be found I&#8217;ll break down/illustrate his instructions the best I can. The more low-tech way to do things is to simply apply a low courrent/voltage source to the motor and slowly increase power to it until there is movement.</p>
<p>Happy motoring!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crashspace.org/2010/02/take-apart-tuesday-no-5-electric-toothbrushes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Radio Mondays: Emergency</title>
		<link>http://blog.crashspace.org/2010/02/radio-mondays-emergency/</link>
		<comments>http://blog.crashspace.org/2010/02/radio-mondays-emergency/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 19:15:21 +0000</pubDate>
		<dc:creator>outlawpoet</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.crashspace.org/?p=323</guid>
		<description><![CDATA[Yesterday we had another successful Radio Mondays, the subject was emergency uses of radio, and what was available to us, for listening and use. 


Amateur Radio

&#160;&#160;&#160; Services

&#160;&#160;&#160;&#160;&#160;&#160;ARES/RACES
&#160;&#160;&#160;&#160;&#160;&#160;Military Afilliate Radio System
&#160;&#160;&#160;&#160;&#160;&#160;SKYWARN 
&#160;&#160;&#160;&#160;&#160;&#160;SATERN(salvation army)


cells

&#160;&#160;&#160;wireless priority service
&#160;&#160;&#160;e911

NOAA weather alerts
emergency alert system
sat phones(iridium, globalsat)
police/fire/coast guard

There are also a host of military and government radio systems that get used in [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday we had another successful Radio Mondays, the subject was emergency uses of radio, and what was available to us, for listening and use. </p>
<p><span id="more-323"></span></p>
<ul>
<li>Amateur Radio</li>
<ul>
<li>&nbsp;&nbsp;&nbsp; Services</li>
<ul>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.arrl.org/FandES/field/pscm/sec1-ch1.html">ARES</a>/<a href="http://en.wikipedia.org/wiki/Radio_Amateur_Civil_Emergency_Service">RACES</a></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.netcom.army.mil/mars/">Military Afilliate Radio System</a></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://en.wikipedia.org/wiki/Skywarn">SKYWARN </a></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SATERN(salvation army)</li>
</ul>
</ul>
<li>cells</li>
<ul>
<li>&nbsp;&nbsp;&nbsp;<a href="http://wps.ncs.gov/">wireless priority service</a></li>
<li>&nbsp;&nbsp;&nbsp;e911</li>
</ul>
<li>NOAA weather alerts</li>
<li>emergency alert system</li>
<li>sat phones(iridium, globalsat)</li>
<li>police/fire/coast guard</li>
</ul>
<p>There are also a host of military and government radio systems that get used in an emergency, but they tend to be satellite or tight/encrypted links we can&#8217;t access. </p>
<p>We also talked about what direction we should go for our first project, we&#8217;re leaning towards a recreation of the famous <a href="http://en.wikipedia.org/wiki/Van_Eck_phreaking">experiments van Eck did</a>, that led to the TEMPEST standards. It would be interesting and even possibly useful to other projects, to know what kind of RF things around crashspace were emitting. </p>
<p>[pics later]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crashspace.org/2010/02/radio-mondays-emergency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Take Apart Tuesday No. 4: Apple StyleWriter 1200</title>
		<link>http://blog.crashspace.org/2010/01/take-apart-tuesday-no-4-apple-stylewriter-1200/</link>
		<comments>http://blog.crashspace.org/2010/01/take-apart-tuesday-no-4-apple-stylewriter-1200/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 08:32:17 +0000</pubDate>
		<dc:creator>carlyn</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://blog.crashspace.org/?p=297</guid>
		<description><![CDATA[This week we ripped apart an Apple StyleWriter 1200 and got one of its stepper motors working! See, we don&#8217;t just kill things.
Once again How Stuff Works comes to the rescue with a great article on inkjet printers. Give it a quick glance, especially the Inside an InkJet Printer, before you look at the dismantle [...]]]></description>
			<content:encoded><![CDATA[<p>This week we ripped apart an Apple StyleWriter 1200 and got one of its stepper motors working! See, we don&#8217;t just kill things.</p>
<p>Once again <a href="http://www.howstuffworks.com/">How Stuff Works</a> comes to the rescue with a <a href="http://computer.howstuffworks.com/inkjet-printer.htm/printable">great article</a> on inkjet printers. Give it a quick glance, especially the <a href="http://computer.howstuffworks.com/inkjet-printer2.htm">Inside an InkJet Printer</a>, before you look at the dismantle porn on flickr so you can get a sense of what you&#8217;re looking at.</p>
<p>This poor printer had clearly been languishing in a garage somewhere, with bugs and dirt and stray pennies&#8230; we&#8217;re happy it&#8217;s now in a better place.</p>
<p>Here&#8217;s the flickr set: <a href="http://www.flickr.com/photos/carlynorama/sets/72157623309152076/">http://www.flickr.com/photos/carlynorama/sets/72157623309152076/</a><br />
<a title="StyleWriter 1200 Set by carlynorama, on Flickr" href="http://www.flickr.com/photos/carlynorama/sets/72157623309152076/"><img src="http://farm5.static.flickr.com/4016/4314720656_76c4629c56.jpg" alt="IMG_5377" width="500" height="375" /></a></p>
<p>Last week we had a motor in our circuit inducing current for an LED so now we have the perfect segue for looking at a motor, well, being a motor.  We captured two stepper motors from the StyleWriter 1200 and got a 4 phase 5 wire unipolar stepping motor to do its thing.</p>
<p><object width="384" height="313"><param name="movie" value="http://www.youtube.com/v/dpEgjLb2MkM&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/dpEgjLb2MkM&#038;fs=1" type="application/x-shockwave-flash" width="384" height="313" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><span id="more-297"></span></p>
<h2>Salvaging a Stepper Motor</h2>
<h3>A basic summary</h3>
<p>There are many very good write ups on stepper motors online.</p>
<ul>
<li>The frequently sited <a href="http://www.cs.uiowa.edu/~jones/step/">Control of Stepping Motors</a> by      <a href="http://www.cs.uiowa.edu/%7Ejones/">Douglas W. Jones</a> <a href="http://www.uiowa.edu/">THE UNIVERSITY OF IOWA</a> <a href="http://www.cs.uiowa.edu/">Department of Computer Science</a></li>
<li><a href="http://www.doc.ic.ac.uk/~ih/doc/stepper/">Stepper Motors</a> by <a href="http://www.doc.ic.ac.uk/%7Eih">Ian Harries</a></li>
<li><a href="http://www.tigoe.net/intro.shtml">Tom Igoe</a>&#8217;s <a href="http://www.tigoe.net/pcomp/code/category/arduinowiring/51">Stepper Motor Control</a></li>
<li>And if you want some take-apart-extreme, Duck Tape Engineering has posted <a href="http://www.ducttapeeng.com/smd/smd1.htm">pictures of the inside of a stepper</a>.</li>
</ul>
<p>Stepper motors are the go-to motors when precise movement is more important than weight, torque or energy efficiency.   Their axles move in discrete steps, hence the name. So, for example, the motor I&#8217;m writing up here can be moved in 7.5° increments, dividing a full 360° turn into 48 discrete steps.</p>
<p>Unlike a DC motor that just spins freely in one or two directions, stepper motors need precise commands to each lead wire to get any kind of interesting behavior.  The motor will just sit there, shudder and try to elicit sympathy if you get it wrong. It is not a pretty sight. Which is why <a href="http://en.wikipedia.org/wiki/Microcontroller">microcontrollers</a>, like the <a href="http://www.arduino.cc/">Arduino</a>, are used to control them.</p>
<p>Motors generally have different power requirements than microcontrollers, and since they use changing currents and magnetism to generate motion they make for very electrically noisy additions to the circuit neighborhood.  As a result keeping the motor&#8217;s power and the microcontroller&#8217;s power separate becomes necessary. You can accomplish that separation <a href="http://www.tigoe.net/pcomp/code/input-output/controlling-high-current-circuits">with transistors</a>. However, transistors are bulky so various electronics companies have made integrated circuits that cram a whole bunch of transistors into one cute tiny little package. Well maybe not that cute, perhaps more black and svelte.</p>
<p><a href="http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&amp;storeId=10001&amp;catalogId=10001&amp;productId=1147194"><img src="http://www.jameco.com/Jameco/Products/ProdImag/1147194.jpg" alt="" width="150" height="150" /> </a></p>
<p><a href="http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&amp;storeId=10001&amp;catalogId=10001&amp;productId=1147194"><img src="http://www.jameco.com/Jameco/images/mfr/TEXASINSTRUMENTS.jpg" alt="TEXAS INSTRUMENTS" /></a></p>
<table>
<tbody>
<tr>
<th colspan="2">Part no. 1147194</th>
</tr>
<tr>
<td>Manufacturer</td>
<td>TEXAS INSTRUMENTS</td>
</tr>
<tr>
<td>Manufacturer no.</td>
<td>ULN2003ANE4</td>
</tr>
</tbody>
</table>
<p><a href="http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&amp;storeId=10001&amp;catalogId=10001&amp;productId=1147194"></a></p>
<p>You can generally nab anything called an H-Bridge, Darlington Transistor Array, Quadruple Half-H Drivers, etc. The L293,  SN75441, ULN2003 are all chips you might notice in examples and they all do the trick. Important caveat: they do not have identical wiring diagrams, i.e. they get integrated into circuits differently because how each pin on the IC behaves is different from chip to chip. It is best to use the same chip as the example you are copying unless you are comfortable reading a <a href="http://en.wikipedia.org/wiki/Datasheet">datasheet</a>.</p>
<p>For us that night,  I knew where there was a link to <a href="http://itp.nyu.edu/physcomp/Tutorials/StepperL293HBridge">pictures of a L293 online</a> and I had a L293 in my kit. So that is where we started.</p>
<h3>What Happened That Night</h3>
<p>So while I was starting to wire up the board, Justin jumped in to find out what kind of stepper we were dealing with. My old stepper example used a 4 wire bipolar stepper and this one had 5 wires sticking off it.</p>
<p>The motor&#8217;s label told us it was a <a href="http://www.mitsumi.co.jp/latest/Catalog/compo/motor/m42sp7_e.html">Mitsumi  M42SP-7</a>. According to the datasheet it is a 4-phase unipolar stepper motor. Mitsumi motors are fairly common and here is a link to their full <a href="http://www.mitsumi.co.jp/latest/Catalog/compo/motor/index_e.html">motor products list</a>. The other motor in the printer was the M42SP-4N.</p>
<p>Justin discovered the <a href="http://www.arduino.cc/en/Tutorial/StepperUnipolar">example on the Arduino site</a> using a 5 wired stepper and we decided to follow that.</p>
<p>Since wire colors on salvaged motors are fairly arbitrary we had to figure out what each wire was connected to. Ian Harris&#8217; site has the <a href="http://www.doc.ic.ac.uk/~ih/doc/stepper/others/">clearest explanation</a> on how to do that.</p>
<h3>Find the common wire</h3>
<p>In a 5 wire 4 Phase Unipolar Stepper Motor four of the wires are attached to coils in the motor and the fifth is a common source of power.</p>
<p>The first thing we had to do after extracting the motor was attach lead wires to it so we could use it with a <a href="http://en.wikipedia.org/wiki/Breadboard">breadboard</a>. The white connector at the end of the motor&#8217;s soldered on lead wires is not the same spacing as the spacing on a breadboard so we couldn&#8217;t just use the <a href="http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&amp;productId=68339&amp;catalogId=10001&amp;freeText=68339&amp;app.products.maxperpage=15&amp;storeId=10001&amp;search_type=jamecoall&amp;ddkey=http:StoreCatalogDrillDownView">0.100&#8243; breakaway male headers</a> that fit into breadboards. The <a href="http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&amp;storeId=10001&amp;catalogId=null&amp;productId=36792">22 gauge wire</a> I had on hand also seemed to be a bit thick, but we managed to squish its ends a bit with pliers and get the wire into the motor&#8217;s interconnect.</p>
<p><a title="IMG_5520 by carlynorama, on Flickr" href="http://www.flickr.com/photos/carlynorama/4314275927/"><img src="http://farm3.static.flickr.com/2705/4314275927_5c5cb1ca70.jpg" alt="IMG_5520" width="500" height="375" /></a></p>
<p>Once those wires were attached, Justin tested resistance between all the leads on the wire.  Most of the wires had a reading around 150 Ohms between them, but the black wire in the center read 75 ohms to each of the other wires.</p>
<p>My recreation:<br />
<a title="IMG_5510 by carlynorama, on Flickr" href="http://www.flickr.com/photos/carlynorama/4315012022/"><img src="http://farm3.static.flickr.com/2729/4315012022_c71cd39453.jpg" alt="IMG_5510" width="375" height="500" /></a></p>
<p>As Ian Hayes Says:</p>
<blockquote><p>The Common Power wire will be the one with only half as much resistance between it and all the others. This is because the Common Power wire only has one coil between it and each other wire, whereas each of the other wires have two coils between them. Hence half the resistance.</p></blockquote>
<p>We had some debate about whether that wire was really supposed to go to power or ground since it was black, but to power it goes.</p>
<h3>Hitching up the Arduino</h3>
<p>With the board finally wired up (a bit sloppily I will admit), Thereon lent his Arduino to the cause and we connected it up to the motor as indicated in the <a href="http://www.arduino.cc/en/Tutorial/StepperUnipolar">example on the Arduino site</a>. We did the best we could given that we were using a different chip and a different motor. Basically, I guessed. After loading in David Cuartielles&#8217; easy code we got stuttering but no real movement from the motor. (if you have no Arduino experience you can <a href="http://arduino.cc/en/Guide/HomePage">start here</a>). No biggie. Swapping which wires were two and three got us motion! Yay! (I&#8217;ll explain why this worked later)</p>
<p><a title="IMG_5494 by carlynorama, on Flickr" href="http://www.flickr.com/photos/carlynorama/4315010922/"><img src="http://farm3.static.flickr.com/2731/4315010922_6027b3eb40.jpg" alt="IMG_5494" width="500" height="375" /></a></p>
<h3>And the next day&#8230;</h3>
<p>So the next day I come in and not so much with the working motor. Not that unusual with a Physical Computing project, so I took it as a chance to really figure out which wire was which following <a href="http://www.doc.ic.ac.uk/~ih/doc/stepper/others/">Ian Hayes directions</a> which I mentioned before.  He shows a clear way to figure out the order of your coils on a 4-phase unipolar stepper. After running the common power into a supply voltage you pick any of the remaining wires and connect it to ground. He calls it &#8220;wire 4&#8243; arbitrarily. By tying each successive wire to ground and seeing how the motor behaves you can ferret out which wire is tied to which coil.</p>
<p>The results:</p>
<ul>
<li><span style="color: #ff9900">Wire 1 &#8211; Yellow</span></li>
<li>Wire 2- White</li>
<li><span style="color: #ff0000">Wire 3 &#8211; Red</span></li>
<li><span style="color: #dbc4bc">Wire 4- Brown on motor</span> / <span style="color: #99cc00">Green on lead wire<br />
</span></li>
</ul>
<p>There were <a href="http://www.piclist.com/techref/io/stepper/wires.htm">other tips</a> on how to figure this out on a pic chip (type of microcontroller) reference site, but it was better for motors with a different number of leads than our 5 wire unipolar motor.</p>
<p>Hayes goes on to explain how to <a href="http://www.doc.ic.ac.uk/~ih/doc/stepper/control2/sequence.html">find the right sequences</a> for a 5 wire / 4 phase unipolar motor. <a href="http://www.arduino.cc/en/Tutorial/StepperUnipolar">Cuartielles&#8217; code</a> matches up with Hayes recommendation with the following wiring (via the L293 in the middle)</p>
<ul>
<li>Arduino pin 8 -&gt; wire 1 / A / Yellow</li>
<li>Arduino pin 9 -&gt; wire 2 / B / White</li>
<li>Arduino pin 10 -&gt; wire 3 / A&#8217; / Red</li>
<li>Arduino pin 11 -&gt; wire 4 / B&#8217; / Brown-Green</li>
</ul>
<p>Notice I added the A/B/A&#8217;/B&#8217;  to this list. Many discussions of stepper motors talk about wires in terms of pairs: A/A&#8217; or 1a/1b,  etc. In our motor what are being called wires 1 and  3 are a pair and wires 2 and 4 are a pair. The reason swapping the wires the night before worked is because what I had done was to wire two wires relating to the same pair in succession when really the key to stepper motor control is making sure that all the different coils are properly interleaved.  So, for example, <a href="http://www.cs.uiowa.edu/~jones/step/types.html#unipolar">Jones&#8217; representation</a> of what what your microcontroller pins need to do to create motion (version below) looks way fancier than the simple step through that Curtielles is doing in his Arduino code even though they are doing the same thing. Again, this is because Jones is grouping his wires by pair rather than by the coil sequence.</p>
<pre>  Winding 1a 1000100010001... (our yellow wire)
  Winding 1b 0010001000100... (our red wire)
  Winding 2a 0100010001000... (our white wire)
  Winding 2b 0001000100010... (our brown/green wire)
              time ---&gt;</pre>
<h3>Not the problem.</h3>
<p>So now confident in the fact that the wires were all lined up correctly, I was still facing a stuttering motor.  My next guess was the power supply. Because in the Arduino example we were copying they had gotten away with using 5 V from the USB port I had cheated and done the same thing by tying the motor power supply pin of L293 into Arduino board&#8217;s 5V pin-out.  The M24SP-7 is a 12V-24V motor, and while, for what ever reason, it had decided to humor us the night before it was no longer in any mood to make do with a paltry 5 volts.  I now suspect that this was because my computer that night was plugged in and the next day I was running off a battery. It&#8217;s an untested theory. Adding a 12v external supply into the mix solved the problem. (See the note in <a href="http://www.flickr.com/photos/pcomp/104968959/in/set-72057594070996918/">this picture</a> for where that 12 V supply went into the breadboard)</p>
<h3>More fun with code</h3>
<p>So back to the video at the top of the post.</p>
<p>I have a longer history with Tom Igoe&#8217;s <a href="http://itp.nyu.edu/physcomp/Tutorials/StepperL293HBridge">bipolar stepper motor code</a> and decided to make it work with this motor. It lets you control how many steps you are moving and at what speed. His code is for a different type of motor and moved that motor 100 steps forward and 100 steps back.  I wanted something that was a little more fun to watch so I made the number of steps random and speed variable based on the number of random steps.</p>
<p>Those modifications are in the code <a href="http://23longacre.com/sharedFiles/code/arduino/motors/Stepper_RandomMotion.txt">here</a> and below, salient changes marked. Enjoy!</p>
<pre>/*
 Random Stepper Motor Motion
 by Carlyn Maw based on 2005 code by Tom Igoe

 This program moves a 4 phase unipolar stepper motor a random number of
 steps in one direction, then a different number of steps in the opposite
 direction, indefinitely. Speed of the motor is increased with the size of
 the random number.

 Created 28 January 2010
 Updated 

 */

int motorStep[4];        // array to hold the stepping sequence
int thisStep = 0;        // which step of the sequence we're on
<span style="color: #ccffff">long randomNumber;      // random muber that will be the number of steps the motor will move
int mySpeed;            // the delay interval between steps. The smaller the faster.
</span>
//  function prototypes:
void stepMotor(int whatStep, int speed);
void blink(int howManyTimes);

void setup() {
  /*
     save values for the 4 possible states of the stepper motor leads
   in a 4-byte array.  the stepMotor method will step through
   these four states to move the motor. This is a way to set the
   value on four pins at once.  The  digital pins 8 through 13 are
   represented in memory as a byte called PORTB. We will set
   PORTB to each  of the values of the array in order to set
   digital pins 8, 9, 10, and 11 at once with each step.

   We're representing the numbers as hexadecimal values below, but
   it'd be nicer to represent them as binary numbers, so that the
   representation shows us visually which pins of PORTB we're
   affecting.
   */
<span style="color: #ccffff">  motorStep[0] = B00001000;
  motorStep[1] = B00000100;
  motorStep[2] = B00000010;
  motorStep[3] = B00000001;</span>

 <span style="color: #ccffff"> /*
  //alternate step array with 1/2 steps
  motorStep[0] = B00001000;
  motorStep[1] = B00001100;
  motorStep[2] = B00000100;
  motorStep[3] = B00000110;
  motorStep[4] = B00000010;
  motorStep[5] = B00000011;
  motorStep[6] = B00000001;
  motorStep[7] = B00001001;
  */</span>

  /*
   The DDRB register is the Data Direction Register.  It sets whether
   the pins of PORTB are inputs or outputs. a 1 in a given position
   makes that pin an output.  A 0 makes it an input.
   */

  // set the last 4 pins of port b to output:
  DDRB = 0x0F; //0b0000_1111;

  // set all the pins of port b low:
  PORTB = 0; //0b0000_0000;

  // start  program with a half-second delay:
  delay(500);  

  // blink the reset LED 3 times:
  blink(3);

<span style="color: #ccffff">  //seed random from analog pin so pattern is different everytime
  randomSeed(analogRead(0));</span>
}

void loop() {

  /*
  move motor forward a random number of steps.
   note: by doing a modulo operation on i (i % 4),
   we can let i go as high as we want, and thisStep
   will equal 0,1,2,3,0,1,2,3, etc. until the end
   of the for-next loop.
   */

<span style="color: #ccffff">  // the max is higher than the number of steps it takes for
  // the small gear head to turn b/c it is attached to a larger
  // gearhead.
  randomNumber = random(5,100);
  mySpeed = 1000/randomNumber;</span>
  for (int i = 1; i&lt;= 100; i++) {
    thisStep = i % 4;
    stepMotor(thisStep, <span style="color: #ccffff">mySpeed</span>);
  }

  // move motor backward
<span style="color: #ccffff">  randomNumber = random(5,100);
  mySpeed = 1000/randomNumber;</span>
  for (int i = 100; i &gt;=1; i--) {
    thisStep = i % 4;
    stepMotor(thisStep, <span style="color: #ccffff">mySpeed</span>);
  }
}

//Step the motor forward one step:
void stepMotor(int whatStep, int speed) {
  // sets the value of the eight pins of port c to whatStep
  PORTB = motorStep[whatStep];

 // vary this delay as needed to make your stepper step:
  delay(speed);
}

// Blink the reset LED:
void blink(int howManyTimes) {
  int i;
  for (i=0; i&lt; howManyTimes; i++) {
    digitalWrite(13, HIGH);
    delay(200);
    digitalWrite(13, LOW);
    delay(200);
  }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.crashspace.org/2010/01/take-apart-tuesday-no-4-apple-stylewriter-1200/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
