Lab Exercise 9: Stepper and Servo Motors

Similar documents
Assembly Language. Topic 14 Motion Control. Stepper and Servo Motors

MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

Sensors and Sensing Motors, Encoders and Motor Control

combine regular DC-motors with a gear-box and an encoder/potentiometer to form a position control loop can only assume a limited range of angular

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators

Laboratory Exercise 1 Microcontroller Board with Driver Board

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 11 Motor Control

PART 2 - ACTUATORS. 6.0 Stepper Motors. 6.1 Principle of Operation

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

Lab 8. Stepper Motor Controller

Basic NC and CNC. Dr. J. Ramkumar Professor, Department of Mechanical Engineering Micro machining Lab, I.I.T. Kanpur

Sensors and Sensing Motors, Encoders and Motor Control

ME 3200 Mechatronics I Laboratory Lab 8: Angular Position and Velocity Sensors

Upgrading from Stepper to Servo

MAE106 Laboratory Exercises Lab # 3 Open-loop control of a DC motor

L E C T U R E R, E L E C T R I C A L A N D M I C R O E L E C T R O N I C E N G I N E E R I N G

DC motor control using arduino

GE 320: Introduction to Control Systems

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013

Administrative Notes. DC Motors; Torque and Gearing; Encoders; Motor Control. Today. Early DC Motors. Friday 1pm: Communications lecture

Laboratory Seven Stepper Motor and Feedback Control

DISCUSSION OF FUNDAMENTALS

Computer Numeric Control

Voltage-Versus-Speed Characteristic of a Wind Turbine Generator

Automobile Prototype Servo Control

Motor control using FPGA

BME/ISE 3511 Bioelectronics I - Laboratory Exercise #4. Variable Resistors (Potentiometers and Rheostats)

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

Introduction: Components used:

EE 314 Spring 2003 Microprocessor Systems

CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II

EXPERIMENT 6: Advanced I/O Programming

Job Sheet 2 Servo Control

The DC Machine Laboration 3

RC Servo Interface. Figure Bipolar amplifier connected to a large DC motor

DC Motor Speed Control using PID Controllers

Precalculations Individual Portion Introductory Lab: Basic Operation of Common Laboratory Instruments

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter

Lock Cracker S. Lust, E. Skjel, R. LeBlanc, C. Kim

Electronic Speed Controls and RC Motors

Page ENSC387 - Introduction to Electro-Mechanical Sensors and Actuators: Simon Fraser University Engineering Science

Part (A) Using the Potentiometer and the ADC* Part (B) LEDs and Stepper Motors with Interrupts* Part (D) Breadboard PIC Running a Stepper Motor

815-BR SERVO AMPLIFIER FOR BRUSH SERVOMOTORS

Robot Actuators. Motors and Control. Stepper Motor Basics. Increased Resolution. Stepper motors. DC motors AC motors. Physics review: Nature is lazy.

Position and Velocity Sensors

FRIDAY, 18 MAY 1.00 PM 4.00 PM. Where appropriate, you may use sketches to illustrate your answer.

DC SERVO MOTOR CONTROL SYSTEM

Introduction to MS150

UNIVERSITY OF JORDAN Mechatronics Engineering Department Measurements & Control Lab Experiment no.1 DC Servo Motor

University of California at Berkeley Donald A. Glaser Physics 111A Instrumentation Laboratory

Torque on a Current Loop: Motors. and Meters

LV8716QAGEVK Evaluation Kit User Guide

PreLab 6 PWM Design for H-bridge Driver (due Oct 23)

Lecture #19 Digital To Analog, PWM, Stepper Motors Embedded System Engineering Philip Koopman Monday, 28-March-2016

Motomatic Servo Control

Lab 6: Exploring the Servomotor Controller Circuit

School of Engineering Mechatronics Engineering Department. Experim. ment no. 1

Chapter 7: The motors of the robot

Lab Exercise 6: Digital/Analog conversion

LAB 1 AN EXAMPLE MECHATRONIC SYSTEM: THE FURBY

Laboratory Tutorial#1

Laboratory Assignment Number 3 for Mech 143. Pre-Lab: Part 1 Interfacing to a DC Motor and Potentiometer

EE 210: CIRCUITS AND DEVICES

Exercise 3. Doubly-Fed Induction Generators EXERCISE OBJECTIVE DISCUSSION OUTLINE DISCUSSION. Doubly-fed induction generator operation

The Mechatronics Sorter Team Members John Valdez Hugo Ramirez Peter Verbiest Quyen Chu

Pulse-Width-Modulation Motor Speed Control with a PIC (modified from lab text by Alciatore)

Using Servos with an Arduino

AC Drive Technology. An Overview for the Converting Industry. Siemens Industry, Inc All rights reserved.

Speed Feedback and Current Control in PWM DC Motor Drives

Stepping Motor. Applications. Structure and operation. Code names. Mobile equipment Digital cameras, Mobile equipments, PDA, etc.

Understanding RC Servos and DC Motors

Castle Creations, INC.

UNIT 9 DC Separately-Excited Generator

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

SMART Funded by The National Science Foundation

Modelling and Control of Hybrid Stepper Motor

Feedback Devices. By John Mazurkiewicz. Baldor Electric

Basic of PCD Series Pulse Control LSIs

Step Motor Controller I. Introduction II. Step Motor Basics

PMSM Control Using a Three-Phase, Six-Step 120 Modulation Inverter

Modeling Position Tracking System with Stepper Motor

BALDOR ELECTRIC COMPANY SERVO CONTROL FACTS A HANDBOOK EXPLAINING THE BASICS OF MOTION

3. What is the difference between Switched Reluctance motor and variable reluctance stepper motor?(may12)

Microcontroller Based Closed Loop Speed and Position Control of DC Motor

ServoStep technology

Lab 9. Speed Control of a D.C. motor. Sensing Motor Speed (Tachometer Frequency Method)

05-VAWT Generator Testing

Exercise 2-2. Antenna Driving System EXERCISE OBJECTIVE DISCUSSION OUTLINE DISCUSSION

General Description. The TETRIX MAX Servo Motor Expansion Controller features the following:

Experiment#6: Speaker Control

Transformers. Department of Physics & Astronomy Texas Christian University, Fort Worth, TX. April 23, 2013

Laboratory 2 More Resistor Networks and Potentiometers.

Stepper Motors and Control Part I - Unipolar Stepper Motor and Control (c) 1999 by Rustle Laidman, All Rights Reserved

International Journal of Advance Engineering and Research Development

Training Schedule. Robotic System Design using Arduino Platform

ECE 5670/6670 Project. Brushless DC Motor Control with 6-Step Commutation. Objectives

Converting a Hobby Servomotor to a DC Gearhead Motor

Lab 5: Inverted Pendulum PID Control

05-VAWT Generator Testing

Motors and Servos Part 2: DC Motors

Transcription:

ME 3200 Mechatronics Laboratory Lab Exercise 9: Stepper and Servo Motors Introduction In this laboratory exercise, you will explore some of the properties of stepper and servomotors. These actuators are very useful when you desire a particular angular position from a motor output. They are relatively easy to control, and can provide interesting capability to any design. You may find them useful in the design of the robot for your project. Brief Background The term stepper motor is a short descriptive name for a wound synchronous motor. These motors operate on the principle of a rotating magnetic field. A permanently magnetized rotor sits within an envelope of stator windings, as seen in Figure 1. When current is introduced to the windings, a magnetic field develops according to Faraday s law. The poles of the magnet attached to the rotor line up with the induced magnetic field, resulting in a net torque on the rotor. Stepper motors would not be very interesting or useful if their rotors could only assume one position and stay there when the current is switched on. To improve their usefulness, an external circuit is used to switch the current between the windings in a circular pattern to create a rotating magnetic field. The rotor chases the magnetic field resulting in a net speed proportional to the switching rate. Most stepper motors have two sets of windings or phases, but some have three. Figure 1: Schematic of a stepper motor with two sets of windings and a single pole rotor taking half steps.

The stepper motor of Figure 1 does not have a very desirable angular resolution since the rotor has only one pole pair. To increase angular resolution, the rotors of most stepper motors contain many pole pairs. The addition of these pole pairs reduces the angle the rotor turns each step, thus improving the angular resolution of the stepper motor. The angular resolution of a stepper motor is defined according to the following equation: 360 θ = m N where θ is the resolution, m is the number of stator phases, and N is the number of rotor teeth. Equation 1 applies only for full-step configurations. The half-step configuration doubles the full-step resolution. Note that each pole pair has two teeth. Thus, for the stepper motor depicted in Figure 1, m = 2, N = 2 and the full-step and half-step resolutions of the stepper motor are 90 and 45 respectively. The motor used in this laboratory exercise is a two-phase stepper motor. An external circuit built around the Motorola MC3479P stepper motor driver chip drives the stepper motors used in this laboratory exercise. This IC chip requires a TTL input clock signal (i.e. square wave whose amplitude switches between zero and five volts) and produces control signals that excite the two stator windings of the stepper motor. Stepping configuration and rotation direction are controlled by setting pins nine and ten, respectively, to either zero or five volts. The individual stepper motor coils are connected between pins two and three and fourteen and fifteen, respectively. For more detailed information on this circuit, please refer to the Motorola MC3479P data sheet by following the link in the Lab Handouts page of the class website. Servo Motors Servomotors are another useful motor to use in situations where angular position is critical. Servomotors are DC motors whose output shafts are coupled to a potentiometer that provides position feedback to a control circuit. The control circuitry drives the motor to the angle specified by the input signal until the difference between the potentiometer signal and the input reference is zero. This control circuit guarantees that the output shaft of the servo will achieve the desired angular position. (1) Figure 2: PWM signal The servos used in this lab are the same RC servos used in radio controlled airplanes and cars. These RC servos require a pulse width modulated (PWM) input that communicates the angle command to the servo s control circuit. A PWM signal is a special kind of square wave characterized by a repeated pulse, the duration of which is less than the period of the signal, T (see Figure 2). The term pulse width modulation refers to the fact that the width of the signal is variable while the frequency of the signal is held constant. In the case of the RC servos, the width of the pulse determines the angle of the servo output.

Interfacing and controlling the RC servo with the Handy Board is very simple. Each servo has three input wires: the white wire accepts the PWM output of the Handy Board, the red wire requires a regulated +5V input, and the black wire is the ground connection for the internal circuitry. To connect the servo to the Handy Board simply connect the red wire to the five volt power bus, the black wire to the ground bus, and the white wire to either digital input nine or timer output three (TOC3) (see port TOC3 on the schematic located on page 58 of the Handy Board Technical Reference). Once the servo is connected, download the binary source file(s) appropriate for the connections of the servo(s): servo_a7.icb controls the digital nine output, and servo_a5.icb controls the TOC3. These files add built-in functions and variables to the Handy Board operating system that allow you to control up to two servo motors. The two control commands of interest are int servo_a7_init(int enable) and int servo_a7_pulse; these commands allow us to control the servo attached to digital nine (please note that changing the 7 to a 5 in these filenames will alter the servo behavior on TOC3). Calling servo_a7_init(1) enables the control of the servo connected to digital nine port: servo_a7_init(0) disables it. Once the servo is initialized, redefining the value of the global variable servo_a7_pulse changes the position of the servo output. This variable is an integer that defines the pulse width (duration) of the PWM output in clock ticks of the Handy Board s processor. Since there is a lot of variation between the maximum and minimum pulse width for each servo, determining these limits experimentally is recommended.

Laboratory Exercise Required Materials/Equipment An electronic breadboard A Motorola MC3479P motor driver chip A stepper motor Solid core wire Resistors Banana cables Alligator clips Wire cutters/strippers A Handy Board An RC Servo Digital multimeter 2_channel_oscope.vi Stepper Motors 1. Build the stepper motor control circuit shown in Figure 3 making sure that you can easily change the voltage on pins nine and ten. 2. Connect pin two to the top left banana port of the stepper motor, pin three to the top right banana port, pin fifteen to the bottom left banana port, and pin fourteen to the bottom right banana port. Figure 3: Pin out schematic for the driver chip.

3. Open the 2_channel_oscope.vi from the LabView folder on the computer desktop and connect the output of the signal generator to the A_CH0 input of the DAQ breakout box. 4. Using the 2_channel_oscope.vi, adjust the output of the signal generator to a 2.5V, 2Hz square wave that oscillates between zero and five volts. Note: To meet the amplitude requirement for the step above, the DC offset of the signal generator must be modified to 2.5V. The DC offset is adjusted by pulling out the Offset knob and rotating the knob clockwise to increase and counterclockwise to decrease the offset. 5. Connect the output of the signal generator to the Clk input of the driver circuit (the stepper motor should begin to turn). Try different voltage inputs for pins nine and ten to change the stepping method and the direction of rotation, respectively. 6. Unplug the inputs to the stepper motor, connect them to the first two input channels of the DAQ breakout box, and use the 2_channel_oscope.vi to observe the two control signals for different combinations of rotational direction and stepping mode. Record your observations in the table below (sketches could be helpful). Clockwise Counter-clockwise Half-stepping Full-stepping 7. With the input frequency of 2Hz, measure the stepping torque of the motor with your finger. What happens to the stepping torque when the input frequency is increased? 8. Determine the number of rotor pole pairs of your stepper motor by counting the number of steps it takes to complete one revolution in full-step mode, and using Equation 1 to solve for the number of rotor teeth, N, and dividing by two. Record the result in the space below: Number of pole pairs =

9. Determine what input frequency makes the stepper motor stall, by slowly increasing the input frequency until the rotor stops rotating. You may note that the motor misses steps before it completely stalls. Why? 10. Breakdown the stepper motor setup and return the connecting wires to the appropriate racks. Servo Motors 11. Locate an RC Servo and a Handy Board and interface it with Interactive C at your lab station. 12. Open Windows Explorer, navigate to C:\IC\libs\RCservo, and copy the following files onto your disk: servoexample.c, servo_a5.icb, and servo_a7.icb. These files are all you need to control the RC Servo 13. Open your copy of servoexample.c and examine the code to understand what the code does. 14. Connect the RC Servo to your Handy Board by connecting the white lead of the servo to digital port nine (top input bus), the red lead to the +5V supply bus (middle bus), and the black lead to the ground bus (bottom bus). 15. Download your copies of servoexample.c, servo_a5.icb, and servo_a7.icb to your Handy Board and reset your Handy Board. The servo should respond by moving to the center of its angular travel. 16. Rotate the knob of the Handy Board to actuate the servo back and forth. As you rotate the knob position the display shows the number of clock ticks that determine the width of the input pulse to the servo. 17. Determine the maximum and minimum values of the servo_a7_pulse variable that correspond to the maximum and minimum angles the servo can travel before it hits its stop by modifying the values of min and max in your copy of the servoexample.c file, reloading the code, and using the screen output and the knob to determine the limits on the pulse width. Caution: The servo can break the mechanical stop if you command the servo to go past the limits imposed by its mechanical stop. Before you load the modified code, make sure that the knob is somewhere in the middle of its travel so that it doesn t accidentally try to move past the stop. Then carefully determine the maximum and minimum travel by moving the knob toward its maximum and minimum positions respectively. 18. Record the values you determined in the previous step and modify the servoexample.c program to reflect these values. Max: Min: 19. Place your finger on one of the legs of the rotor and oppose the movement of the servo to qualitatively measure the torque output of the servo. 20. Connect the digital nine input to A_CH0 of the DAQ (make sure the DAQ will measure the output relative to the ground of the Handy Board). Observe the output using the VI you opened previously, turn the knob to its maximum and minimum positions, and measure the width of the clock pulse for each. Record them below Max Pulse = sec Min Pulse = sec 21. Clean up your station and answer the questions at the end of the lab.

Questions 1. List at least two possible applications of stepper motors. 2. How can you determine the absolute position of the stepper motor shaft? 3. What are some potential disadvantages of having more windings in a stepper motor? 4. Compare and contrast stepper motors to DC motors. 5. List at least two applications of RC servomotors. 6. What are two benefits of using an RC servo in your robot project? 7. What are two limitations of using an RC servo in your robot project? 8. Compare and contrast a servomotor to a DC motor.