Download Understanding the Operation of Stepper and Servo Motors - Prof. Stephen Kuyath and more Study notes Electrical and Electronics Engineering in PDF only on Docsity! ———as)6h| CUS
fo
%
ee.
ETEE 3285
Topic 18: Motion Control
Objectives To gain an understanding of the operation of a stepper motor To develop a means to control a stepper motor To gain an understanding of servo motors Speed control Position control 4/7/2009 2 4/7/2009 2 4/7/2009 5 Stepper Motors [1] [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 Because the current is flowing in this direction through the winding, an electromagnet is produced in these teeth, with the North end pointing up. This magnetic field causes the rotor to rotate to this point, aligning itself with the magnetic field. 4/7/2009 6 Stepper Motors [1] [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 If we now apply current to winding 2, the rotor will turn to this new position 4/7/2009 7 Stepper Motors [1] [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 And now, if current is applied to winding 1 again, but in the opposite direction as before, the rotor will turn to this new position 4/7/2009 10 Stepper Motors [1] [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 We have completed one cycle of the electrical stimulation to the windings and at the same time, have made one revolution (cycle) of the rotor. f fe m In general: f f p e m 2 where p is the number of equally-spaced magnetic poles on the rotor and: Step p 180 4/7/2009 11 Stepper Motors [1] [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 We have completed one cycle of the electrical stimulation to the windings and at the same time, have made one revolution (cycle) of the rotor. f fe m In general: f f p e m 2 where p is the number of equally-spaced magnetic poles on the rotor and: Step p 180 “It is common to find two-phase steppers with anywhere between 12 and 200 poles, which results in a stepping resolution of anywhere between 15º and 0.9º.” [1] 4/7/2009 12 Stepper Motors [1] [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 This is a two-phase, six-pole motor: It has two windings (two-phase) for the four teeth 4/7/2009 15 Stepper Motors [1] [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 Voltage is applied to stator windings #1 with a polarity such that current will flow in a direction that causes a North magnetic field at the top and South at the bottom. If we remove that voltage and apply a voltage to windings 2 such that a North polarity forms on the left (South on the right), the rotor will rotate clockwise one position. 4/7/2009 16 Stepper Motors [1] [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 Voltage is applied to stator windings #1 with a polarity such that current will flow in a direction that causes a North magnetic field at the top and South at the bottom. If we remove that voltage and apply a voltage to windings 2 such that a North polarity forms on the left (South on the right), the rotor will rotate clockwise one position. And then reapply voltage to winding one, but with the opposite polarity we get another clockwise rotation of one position. 4/7/2009 17 Stepper Motors [1] [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 Voltage is applied to stator windings #1 with a polarity such that current will flow in a direction that causes a North magnetic field at the top and South at the bottom. If we remove that voltage and apply a voltage to windings 2 such that a North polarity forms on the left (South on the right), the rotor will rotate clockwise one position. And then reapply voltage to winding one, but with the opposite polarity we get another clockwise rotation of one position. And finally, reapply voltage to winding 2 with the opposite polarity as before, we get one more step. 4/7/2009 20 H-Bridge [2] [2] Freescale, 2007, Stepper Motor, downloaded 3/16/08 from: http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=02nQXGrrlPZh3C This image shows two H-Bridges, one to control each of the two phases of the stepper motor. If a small voltage is applied to the bases of Q1 and Q4, then current will flow DOWN through phase 1. The AVR voltages are only used to turn on the transistors. The output port pins should be tied through a resistor to the base of the transistors. 4/7/2009 21 H-Bridge [2] [2] Freescale, 2007, Stepper Motor, downloaded 3/16/08 from: http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=02nQXGrrlPZh3C This image shows two H-Bridges, one to control each of the two phases of the stepper motor. If a small voltage is applied to the bases of Q2 and Q3, then current will flow UP through phase 1. 4/7/2009 22 H-Bridge [2] [2] Freescale, 2007, Stepper Motor, downloaded 3/16/08 from: http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=02nQXGrrlPZh3C This image shows two H-Bridges, one to control each of the two phases of the stepper motor. If a small voltage is applied to the bases of Q5 and Q8, then current will flow DOWN through phase 2. 4/7/2009 25 H-Bridge [2] [2] Freescale, 2007, Stepper Motor, downloaded 3/16/08 from: http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=02nQXGrrlPZh3C In the lab we have used: 1. 2N3904 transistors 2. A 10 kΩ resistor between the base of the transistor and the output of the port. 4/7/2009 26 Controller Outputs So, the sequence we need to repeat is: Step 1: Transistors: 87654321 00001001 4/7/2009 27 Controller Outputs So, the sequence we need to repeat is: Step 2: Transistors: 87654321 00001001 01100000 4/7/2009 30 Controller Outputs So, the sequence we need to repeat is: Step 5: Transistors: 87654321 00001001 01100000 00000110 10010000 Etc. 4/7/2009 31 Controller Outputs It appears that each pin in the output port will need a square wave output. All need the same frequency, and all will have a 25% duty cycle, but they will all be out of phase. Step 5: Transistors: 87654321 00001001 01100000 00000110 10010000 Etc. 4/7/2009 32 Controller Outputs You have to leave the pulse high long enough for the stepper to move a step, but not too long if you want smooth movement. Port X b0 Port X b1 Port X b2 Port X b3 Port X b4 Port X b5 Port X b6 Port X b7 4/7/2009 35 Unipolar Stepper Motors [1] This is a wiring diagram of a unipolar stepper motor. As you can see the center tap of the winding also has a lead (C). The controller circuit (and sequence of high/low outputs from the controller) is a little different. [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 4/7/2009 36 Unipolar Stepper Motors [1] When connecting a stepper motor to a circuit, you should look up the specifications for that motor. The color codes above are typical but not necessarily correct for your stepper motor. [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 Black (+12 V) Red (Coil 1) Green (Coil 2) White (Coil 4) Brown (Coil 3) 4/7/2009 37 Unipolar Stepper Motors [1] Above is the sequence of outputs from the AVR port to get this type of motor moving. [1] Simon, D., 2003, Get Your Motor Running, Embedded Systems Design, April 10, 2003 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 Etc. T1 T2 T3 T4Transistor Sequence: 4/7/2009 40 Servo Motors [4] [4] Baldor Electric Company, Servo Control Facts Servo motors may also be used in applications where exact positioning or speed is required. Servo motors are actually an assembly of parts that include a motor, a control circuit, and a feedback device. For speed control a tachometer would be used as the feedback device. If position control is needed, a position encoder would be used. There are several types of encoders including, absolute, directional, and incremental. 4/7/2009 41 Servo Motors [4] [4] Baldor Electric Company, Servo Control Facts This is an example of an incremental encoder. As the motor shaft rotates, the disk also rotates. As the light shines through the disk and lines up with the grid assembly, light will strike the photo sensor. This produces a pulse, which can be counted 4/7/2009 42 Servo Motors [4] [4] Baldor Electric Company, Servo Control Facts For our purposes, we need to know how to make the motor move, in this case, to a specific position. Our controller would only need to provide a pulse of the required duration to achieve the desired position. The values to the left are a good rule of thumb. To maintain this position, the pulse would have to be repeated at specified intervals. This information would be provided by the manufacturer.