<?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>Andrew Burks &#187; Half-Stepping</title>
	<atom:link href="http://blog.andrewburks.com/tag/half-stepping/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.andrewburks.com</link>
	<description>Personal Experiences with Technical Projects</description>
	<lastBuildDate>Fri, 25 Feb 2011 19:38:57 +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>Stepper Motor Driver &#8211; NAND Gates</title>
		<link>http://blog.andrewburks.com/2010/07/stepper-motor-driver-nand-gates/</link>
		<comments>http://blog.andrewburks.com/2010/07/stepper-motor-driver-nand-gates/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 04:03:12 +0000</pubDate>
		<dc:creator>aburks</dc:creator>
				<category><![CDATA[RobOrchestra]]></category>
		<category><![CDATA[Robotics Club]]></category>
		<category><![CDATA[Vibratron]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[H-Bridge]]></category>
		<category><![CDATA[Half-Stepping]]></category>
		<category><![CDATA[Integrated Circuit]]></category>
		<category><![CDATA[Logic]]></category>
		<category><![CDATA[NAND]]></category>
		<category><![CDATA[Stepper Driver]]></category>
		<category><![CDATA[Stepper Motor]]></category>

		<guid isPermaLink="false">http://blog.andrewburks.com/?p=77</guid>
		<description><![CDATA[The Problem
I still need to find a cost effective way of turning a bipolar stepper motor on and off using just one pin.  I want to have the ability to use a powered brake, and I want to be able to use half-stepping control of the motor for smoother rotation.
Half-stepping gives the motor higher resolution, [...]]]></description>
			<content:encoded><![CDATA[<h2>The Problem</h2>
<p>I still need to find a cost effective way of turning a bipolar stepper motor on and off using just one pin.  I want to have the ability to use a powered brake, and I want to be able to use <a href="http://en.wikipedia.org/wiki/Stepper_motor#Half_stepping">half-stepping</a> control of the motor for smoother rotation.</p>
<p>Half-stepping gives the motor higher resolution, which is good for my application because one full step cycle is enough to move a single ball through.  The 4-stage process from before turns into an 8-stage process when you change to half-stepping.</p>
<p>t=0  A=1  B=0  C=0  D=0</p>
<p>t=1  A=1  B=1  C=0  D=0</p>
<p>t=2  A=0  B=1  C=0  D=0</p>
<p>t=3  A=0  B=1  C=1  D=0</p>
<p>t=4  A=0  B=0  C=1  D=0</p>
<p>t=5  A=0  B=0  C=1  D=1</p>
<p>t=6  A=0  B=0  C=0  D=1</p>
<p>t=7  A=1  B=0  C=0  D=1</p>
<p>t=8=0</p>
<h2>The Solution</h2>
<p>I noticed that in half stepping (and full stepping) if you view the logic for each of the four wires as a wave, they are always 90 degrees out of phase and have a specific shape.  I wanted to create four unique signal lines, one for each of the four wave patterns, and transmit this signal to each of the 30 stepper controllers.  At each controller, I should be able to choose either some default value (like a powered or unpowered brake) or let the motor run off the signal.</p>
<p>Because my focus was centered on the powered brake, my initial idea was to take my on-off line at each motor and perform a <a href="http://en.wikipedia.org/wiki/AND_Gate">logical AND</a> with three of the four waves and a <a href="http://en.wikipedia.org/wiki/OR_Gate">logical OR</a> with the other wave.  The OR would drive its input high while the AND would drive its inputs low.  This solved my problem, but unfortunately I couldn&#8217;t find a chip with an AND and an OR circuit on it.</p>
<p><a href="http://en.wikipedia.org/wiki/NAND_logic">You can build any logic gate</a> with a combination of <a href="http://en.wikipedia.org/wiki/NAND_gate">NAND</a> or <a href="http://en.wikipedia.org/wiki/NOR_gate">NOR</a> gates.  It takes two NAND gates to build an AND gate, and three NAND gates to build an OR gate (and vice-versa when building from NOR gates).  They sell IC&#8217;s with 4 NAND gates in them, so I really wanted to find a way to do my OR operation with only 2 NAND gates.</p>
<p>Eventually I realized that if I negated the signal wave coming from the Arduino (by using 1 NAND as an inverter) and then performed a NAND operation with the wave signal and the on-off signal I got the exact output I wanted!  of course, if I had just used an AND on each of the four inputs, I would have an unpowered brake and less of a headache.</p>
<p>I made this circuit on a protoboard, and tested it with both full and half stepping.  It worked like a charm.  The next step is to see if half-stepping combined with a smaller diameter wheel will be able to push balls along without jamming.  Here is the protoboard layout:</p>
<p><a href="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-NAND-Circuit-Top.jpg"><img class="alignnone size-medium wp-image-87" title="Stepper NAND Circuit - Top" src="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-NAND-Circuit-Top-300x225.jpg" alt="" width="300" height="225" /></a></p>
<h2>Pros</h2>
<p>This setup allows for full and half stepping.  It costs less than the shift register design, about $2 per unit (only $0.75 from the two NAND ICs).  Each of the four inputs is completely isolated from the others, so the wiring is simpler (which makes the PCB layout easier).</p>
<h2>Cons</h2>
<p>There are now 4 common signal wires instead of just one.  These 4 wires will need to be jumped from board to board, potentially requiring some sort of transistor to keep the voltage from dropping as it moves across the boards.</p>
<h2>More Photos</h2>
<p><a href="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-NAND-Circuit-Setup.jpg"><img class="alignnone size-medium wp-image-88" title="Stepper NAND Circuit - Setup" src="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-NAND-Circuit-Setup-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-NAND-Circuit-Detail.jpg"><img class="alignnone size-medium wp-image-89" title="Stepper NAND Circuit - Detail" src="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-NAND-Circuit-Detail-300x225.jpg" alt="" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andrewburks.com/2010/07/stepper-motor-driver-nand-gates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

