<?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; Integrated Circuit</title>
	<atom:link href="http://blog.andrewburks.com/tag/integrated-circuit/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>
		<item>
		<title>Stepper Motor Driver &#8211; Shift Register</title>
		<link>http://blog.andrewburks.com/2010/07/stepper-motor-driver-shift-register/</link>
		<comments>http://blog.andrewburks.com/2010/07/stepper-motor-driver-shift-register/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 03:37:30 +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[Circuit]]></category>
		<category><![CDATA[Flip-Flop]]></category>
		<category><![CDATA[H-Bridge]]></category>
		<category><![CDATA[Integrated Circuit]]></category>
		<category><![CDATA[Motor Driver]]></category>
		<category><![CDATA[PCB]]></category>
		<category><![CDATA[Shift Register]]></category>
		<category><![CDATA[Stepper Motor]]></category>

		<guid isPermaLink="false">http://blog.andrewburks.com/?p=73</guid>
		<description><![CDATA[The Problem
I need to be able to turn 30 identical stepper motors on and off individually.  I can only afford to have one unique wire going to each stepper unit because I only have ~40 digital outputs to work with.  I can afford to have a few common outputs that are jumped from board to [...]]]></description>
			<content:encoded><![CDATA[<h2>The Problem</h2>
<p>I need to be able to turn 30 identical stepper motors on and off individually.  I can only afford to have one unique wire going to each stepper unit because I only have ~40 digital outputs to work with.  I can afford to have a few common outputs that are jumped from board to board.  basically I need to turn four inputs that go in a pattern into one input.</p>
<p>The four lines on the motor driver (H-Bridge) basically take turns going high when I want the motor to turn.  When I want it to stand still, only one of the lines should be high.  This is called &#8220;wave driving&#8221; a stepper motor.  Here is what happens when a bipolar stepper motor is wave driven.</p>
<p>t=0:  A=1  B=0  C=0  D=0</p>
<p>t=1:  A=0  B=1  C=0  D=0</p>
<p>t=2:  A=0  B=0  C=1  D=0</p>
<p>t=3:  A=0  B=0  C=0  D=1</p>
<p>t=4=0</p>
<h2>The Solution</h2>
<p>A Serial in Parallel out (SIPO) <a href="http://en.wikipedia.org/wiki/Shift_register#Serial-in.2C_parallel-out_.28SIPO.29">Shift Register</a> does basically exactly what I&#8217;m looking for.  If I have one common clock (a line that goes high every 1/4 step) and connect the 4th output to the data input, then the four parallel outputs will shift through my 4 states like a champ.  The only catch is that I need to seed the circuit with the initial &#8220;1&#8243; so that the &#8220;1&#8243; can move along the shift register.</p>
<p>Luckily, because a shift register is just 4 <a href="http://en.wikipedia.org/wiki/Flip-flop_(electronics)#RS_.28Reset-Set.29_flip-flop">flip-flops</a> lined up in a row, I could build my own shift register out of flip flops, and access the set/reset abilities of the individual flip-flops.  So in the final setup, I had a single clock coming from the Arduino (pulsing at 100ms intervals) which controlled the speed of the motor, and a &#8220;stop&#8221; pin coming from the Arduino to control whether or not the motor was turning.</p>
<p>The &#8220;stop&#8221; pin was tied to the reset pin on the first flip-flop and the set pins on the other 3.  This means that when the &#8220;stop&#8221; pin was driven low, it would force the shift register into the &#8220;1-0-0-0&#8243; state, and when it was released the &#8220;1&#8243; would shift sequentially at the speed of the clock to drive the motor.  Here is a view of the protoboard layout (the center IC is the motor driver, and the other two each contain two flip-flops):</p>
<p><a href="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-Shift-Circuit-Top.jpg"><img class="alignnone size-medium wp-image-81" title="Stepper Shift Circuit - Top" src="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-Shift-Circuit-Top-300x225.jpg" alt="" width="300" height="225" /></a></p>
<h2>Pros</h2>
<p>This is a huge improvement over controlling all 120 lines individually.  An Arduino mega can easily output a single clock and 30 control lines.  The cost of each circuit is about $4 in parts (three <a href="http://media.digikey.com/photos/Fairchild%20Semi%20Photos/261-20-DIP.jpg">Integrated Circuits</a>, or ICs), more if you PCB it.  It works, and it lets you do a powered brake as well.</p>
<h2>Cons</h2>
<p>The two IC&#8217;s with flip-flops are about $2.50 0f the total parts cost.  For this price ($2.50&#215;30=$75) it would technically be cheaper to buy some other board that can take serial from the Arduino and control the 120 outputs.  Also, the wiring is a bit complex and uninsulated because each flip-flop&#8217;s output feeds into the next one&#8217;s input.</p>
<h2>More Photos</h2>
<p><a href="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-Shift-Circuit-Detail.jpg"><img class="alignnone size-medium wp-image-82" title="Stepper Shift Circuit - Detail" src="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-Shift-Circuit-Detail-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-Shift-Circuit-Arduino.jpg"><img class="alignnone size-medium wp-image-83" title="Stepper Shift Circuit - Arduino" src="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-Shift-Circuit-Arduino-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-Shift-Circuit-Iso.jpg"><img class="alignnone size-medium wp-image-84" title="Stepper Shift Circuit - Iso" src="http://blog.andrewburks.com/wp-content/uploads/2010/07/Stepper-Shift-Circuit-Iso-300x225.jpg" alt="" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.andrewburks.com/2010/07/stepper-motor-driver-shift-register/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

