MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

Similar documents
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

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

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

Lab Exercise 9: Stepper and Servo Motors

Stepper motor basics

M.Kaliamoorthy and I.Gerald PSNACET/EEE CHAPTER 2 STEPPER MOTORS

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 11 Motor Control

Laboratory Exercise 1 Microcontroller Board with Driver Board

EXPERIMENT 6: Advanced I/O Programming

Sensors and Sensing Motors, Encoders and Motor Control

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

Computer Numeric Control

Step vs. Servo Selecting the Best

Controlling Stepper Motors Using the Power I/O Wildcard

Lab 8. Stepper Motor Controller

CHAPTER TWO LITERATURE REVIEW

:for... A G!,Jide to Stepp~s~ Se~o~, ~,6d ~er Electrical M~chines

Modeling Position Tracking System with Stepper 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

Sensors and Sensing Motors, Encoders and Motor Control

THE UNIVERSITY OF BRITISH COLUMBIA. Department of Electrical and Computer Engineering. EECE 365: Applied Electronics and Electromechanics

AN Industrial Stepper Motor Driver. Application Note Abstract. Introduction. Stepper Motor Control Method

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

Simulation of Stepper Motor using Quasi Square Wave Input

A COMPARISON STUDY OF THE COMMUTATION METHODS FOR THE THREE-PHASE PERMANENT MAGNET BRUSHLESS DC MOTOR

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

DC motor control using arduino

Motor control using FPGA

Feedback Devices. By John Mazurkiewicz. Baldor Electric

Voltage-Versus-Speed Characteristic of a Wind Turbine Generator

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

Page 1. Relays. Poles and Throws. Relay Types. Common embedded system problem CS/ECE 6780/5780. Al Davis. Terminology used for switches

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

!! #! # %! & ())) +, ,., / 01 2 & ,! / ))8 /9: : ;, 8) 88)9 () 9) 9)

Embedded Systems Lab Lab 7 Stepper Motor Application

30-80V, 8.2A Peak, No Tuning, Nulls loss of Synchronization

Simulation of Solar Powered PMBLDC Motor Drive

Introduction to Relays. ECE/CS 5780/6780: Embedded System Design. Various Relay Configurations. Types of Relays. Drawing of an EM Relay

Job Sheet 2 Servo Control

Modelling and Control of Hybrid Stepper Motor

Upgrading from Stepper to Servo

EE 410/510: Electromechanical Systems Chapter 5

Portland State University MICROCONTROLLERS

Integrated Easy Servo

SPECIAL MACHINES CONTENTS CONTENTS. Learning Objectives. Stepper motor

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

Figure 1. Digilent DC Motor

ies-2309 Integrated Easy Servo

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

CHAPTER 6 FABRICATION OF PROTOTYPE: PERFORMANCE RESULTS AND DISCUSSIONS

Motion-Control System of Bench-Top CT Scanner

ES86 Series Closed-loop Stepper Drive + Motor System (Drive+ Motor/Encoder)

ES86 Series Closed-loop Stepper Drive + Motor System (ES-D808 Drive+ Motor/Encoder)

Module: Arduino as Signal Generator

RoHS. Unipolar and Bipolar winding Lead wire type 2H5654U20

HBS Series Hybrid Servos

Microcontroller Based Closed Loop Speed and Position Control of DC Motor

Operation of Separately Excited Switched Reluctance Generator

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

6.111 Lecture # 19. Controlling Position. Some General Features of Servos: Servomechanisms are of this form:

Datasheet of the MEZ Stepper Servo Drive MEZ 2D VDC, 8.2A Peak, Closed-loop, No Tuning. Version

Experiment 3. Performance of an induction motor drive under V/f and rotor flux oriented controllers.

Electronics Design Laboratory Lecture #6. ECEN2270 Electronics Design Laboratory

Electronic Speed Controls and RC Motors

ES86 Series Closed-loop Stepper Drive + Motor System (Drive+ Motor/Encoder)

Design of A Closed Loop Speed Control For BLDC Motor

SPEED CONTROL OF SENSORLESS BLDC MOTOR WITH FIELD ORIENTED CONTROL

Application Note. 3-Phase Brushless DC Motor Control with Hall Sensors AN-CM-244

CL86T. 24~80VDC, 8.2A Peak, Closed-loop, No Tuning. Descriptions. Closed-loop. Stepper. Applications. Datasheet of the Closed-loop Stepper CL86T

Experiment#6: Speaker Control

SPEED CONTROL OF INDUCTION MOTOR WITHOUT SPEED SENSOR AT LOW SPEED OPERATIONS

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

42 mm sq /step

SPEED CONTROL OF BRUSHLES DC MOTOR

Half stepping techniques

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

Real Time Stepper Motor Control Using ARM Microcontroller and MATLAB GUI For Satellite Ground Station Tracking

Speed Control of BLDC Motor Using FPGA

Actuators. DC Motor Servo Motor Stepper Motor. Sensors

STEPPER MOTOR DRIVE FOR COMPUTER NUMERICAL CONTROL MACHINES

Brushed DC Motor Microcontroller PWM Speed Control with Optical Encoder and H-Bridge

Motion Control Glossary

AutoBench 1.1. software benchmark data book.

Stepper Motors in C. Unipolar (5 lead) stepper motorr. $1.95 from 100 steps per rotation. 24V / 160mA / 600 gm cm holding 160mA

PMSM TECHNOLOGY IN HIGH PERFORMANCE VARIABLE SPEED APPLICATIONS

CHAPTER 2 STATE SPACE MODEL OF BLDC MOTOR

3.1.Introduction. Synchronous Machines

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

DC Motor Speed Control using PID Controllers

Type of loads Active load torque: - Passive load torque :-

Experiment 4.B. Position Control. ECEN 2270 Electronics Design Laboratory 1

SRI SUKHMANI INSTITUTE OF ENGINEERING & TECHNOLOGY DERA BASSI DEPARTMENT: ELECTRONICS & COMM. LABORATORY MANUAL LAB: EMI SUBJECT CODE: SEMESTER: 4th

Application Information

White Paper. Even Without Power You can count on it

ServoStep technology

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

Design of double loop-locked system for brush-less DC motor based on DSP

Stepping motor controlling apparatus

Designing With Motion Handbook

POWER FACTOR IMPROVEMENT USING CURRENT SOURCE RECTIFIER WITH BATTERY CHARGING CAPABILITY IN REGENERATIVE MODE OF SRM

Transcription:

PH-315 MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits Portland State University Summary Four sequential digital waveforms are used to control a stepper motor. The main objective of this laboratory session is to illustrate how pulse width modulation helps to implement the sequential logic effectively. 1. Introduction In sequential logic, the outputs of the block depend on both i) the input and ii) the memory of the block. The sequential logic has some kind of memory or feedback capability. In the previous labs we have attained familiarity implementing combinational logic using arrays. In this lab, you will see how sequential logic can be implemented with a sequence of pulses. When operating a stepper motor, the control signals are the input and the stepper motor s positions are the output. The motor always turns from the current position to the next position, so the motor has some kind of memory of its position in the previous step. Figure 1. General platform to implement a sequential-logic circuit. 2. Stepper motor A stepper motor is an electromechanical device that converts electrical pulses into discrete mechanical movements. The shaft or spindle of a stepper motor rotates in discrete step increments when electrical command pulses are applied to it in the proper sequence. The motors rotation has several direct relationships to these applied input pulses: The sequence of the applied pulses is directly related to the direction of motor shafts rotation; the speed of the motor shafts rotation is directly related to the frequency of the input pulses; and the length of rotation is directly related to the number of input pulses applied. Advantages of stepper motors 1. The rotation angle of the motor is proportional to the number of input pulses. 2. The motor is able to apply a large torque at the beginning of the pulse, which provides excellent response to starting/stopping/reversing.

3. Because the rotor moves towards already fixed poles, it provides precise positioning and repeatability of movement (error is not accumulative!). One can find stepper motors with 1% position accuracy (even at low price). 4. Very reliable since there are no contact brushes in the motor. 5. A stepper motor has the ability to be accurately controlled with open loop strategies. The latter implies that no feedback information (from precedent rotor position) is needed; that is, each step is implemented independent of what happened in the past. This type of control eliminates the need for expensive sensing and feedback-control devices such as optical encoders. The position is known simply by keeping track of the input step pulses. Disadvantages of stepper motors 1. Resonances can occur if not properly controlled. 2. Not easy to operate at extremely high speeds. Types of Stepper Motors There are three basic types of stepper motors: Variable-reluctance Permanent-magnet Hybrid Variable-reluctance (VR). This type of stepper motor has been around for a long time. It is probably the easiest to understand from a structural point of view. Figure 2 shows a cross section, consisting of a soft iron multi-toothed rotor and a wound stator. When the stator windings are energized with DC current the poles become magnetized. Rotation occurs when the rotor teeth are attracted to the energized stator poles. Figure 2. Cross-section of a variable reluctance (VR) motor.

Permanent Magnet (PM). See in fig 3. The permanent magnet step motor is a low cost and low resolution type motor with typical step angles in the range of 7.5 to 15. (48 24 steps/revolution). PM motors have permanent magnets added to the motor structure. The rotor no longer has teeth as with the VR motor. Instead the rotor is magnetized with alternating north and south poles situated in a straight line parallel to the rotor shaft. These magnetized rotor poles provide an increased magnetic flux intensity and because of this the PM motor exhibits improved torque characteristics when compared with the VR type. N S N S S N S Figure 3. Principle of a PM stepper motor. Hybrid (HB). The hybrid stepper motor is more expensive than the PM stepper motor but provides better performance with respect to step resolution, torque and speed. Typical step angles for the HB stepper motor range from 3.6 to 0.9 (100 400 steps per revolution). The hybrid stepper motor combines the best features of both the PM and VR type stepper motors. The rotor is multi-toothed like the VR motor and contains an axially magnetized concentric magnet around its shaft. The teeth on the rotor provide an even better path which helps guide the magnetic flux to preferred locations in the airgap. This further increases the detent, holding and dynamic torque characteristics of the motor when compared with both the VR and PM types. Figure 4. Cross-section of a hybrid stepper motor.

When to Use a Stepper Motor A stepper motor can be a good choice whenever controlled movement is required. They can be used to advantage in applications where controlled rotation angle, speed, position and synchronism is needed. Some applications include printers, plotters, high end office equipment, hard disk drives, medical equipment, fax machines, automotive and many more. Drive the motor with a rotating magnetic field When a phase winding of a stepper motor is energized with current, a magnetic flux is developed in the stator. Figure 5 shows the motor rotating clockwise as its pole aligns with the sequentially activated stator poles. To get the motor to rotate we can now see that we must provide a sequence of energizing the stator windings in such a fashion that provides a rotating magnetic flux field which the rotor follows due to magnetic attraction. Figure 5. Bipolar wound stepper motors. The figure shows the individual stators that are sequentially turned ON, while keeping the others OFF. 3. Experimental procedure 3.A LEDs lighted up in sequence. First, we are going to generate sequences of pulses to light up four LEDs. Connect four LEDs to the digital ports D4 D7, like the one shown in the circuit below. TASK: Make a program to light up the four LEDS sequentially; i.e. put LED j in HIGH while keeping all the others in LOW, repeating the process from j=1 to j=4. Take good care of the timing.

Figure 6. Bipolar wound stepper motors. The waveform of the output should look similar to the pattern shown in Fig. 7. Figure 7. Waveform of the outputs (for the circuit of Fig. 6). To help us elaborate the code for implementing the waveform digitally and in a sequential way, we have highlighted in green color one period of the waveform. 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 In the program we will take this matrix information row by row to write the pins. Run the program suggested in Fig. 8 void setup() { for(int i=4; i<=7; i++) pinmode(i, OUTPUT); void loop()

{for (char i=4; i<=7; i++) digitalwrite( i, HIGH), delay(300), digitalwrite( i, LOW); // Notice the i-th waveform is implemented // row by row, according to the matrix below // Fig. 7, and in a PWM format // to increase the sequence speed, decrease the delay time Figure 8. Implementation of sequential logic via PWM. Notice, PWM is implemented in all the four pins, which helps to implement sequential logic effectively. The program in Fig. 8 is short because it capitalizes on using positive and negative logic in the same line (highlighted in light orange color). Otherwise the program may result in being much longer. TASK: Write your own program (alternative to the one in Fig. 8) to generate the same waveform of figure 7. (Some former students used up to 20 lines; hence no worries if your program is too long). Reverse the process implemented above; i. e. in sequence light up LED4 to LED1. Repeat this process and draw the wave form of the outputs. 3.B Connecting the terminals to the stepper motor Upon finishing 3A and 3B successfully, you will have learned the essentials in digitally controlling a stepper motor. In next steps you will see why. 3.B.1 Remove the LEDs and hook up D4 D7 with the ABCD phases of the stepper motor driver board. Connect the 5V power supply and GND to the board. You will see that the stepper motor is running! Figure 9. Connection between the Arduino board and stepper motor.

3.B.2 Change the speed and direction of the stepper motor, by changing the delay time. 3.C Alternative method to drive the stepper motor The objective is to output the control sequence shown below to the stepper motor. Figure 10. Alternative wave form (compared to Fig. 7) for full step driving. TASK: Using an analytical analysis, indicate whether or not the waveforms in Fig. 7 and Fig. 10 have a different net effect in driving the stepper motor. If the answer were no, a follow up question would be: why to bother then in designing the new waveforms in Fig. 10. If the answer were yes, indicate the main difference(s). 3D. Advanced driving of a 4 phase stepper motor. Half Step Drive. In Half Step Drive, the stator is energized according to the sequence AB B AB A AB B AB A and the rotor steps from position 1 2 3 4 5 6 7 8. This results in angular movements that are half of those in 1- or 2-phases-on drive modes. Half stepping can reduce a phenomena referred to as resonance which can be experienced in 1- or 2 phases-on drive modes. By half step driving, even though the stepper motor we are using has four fixed positions, we can make it run at 8 positions. Fig 11 shows the sequences of the half step driving.

Figure 11. Half step drive waveforms. Similar to what we did with the waveforms in Fig. 9, we have highlighted in green color one period of the waveform in Fig. 11. This allows to elaborate the matrix needed to make the code implementing the waveform digitally and in a sequential way. 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1 1 The program below (Fig. 12) will output the control sequence as shown above to the stepper motor. The difference with the program in Fig. 7 is that the matrix is read in columns (instead of rows). TASK: Make your own alternative program to do the same job. // const byte o4=b11100000; const byte o5=b00111000; const byte o6=b00001110; const byte o7=b10000011; word delayus=19533; // Here we implement the information // from the matrix. void setup() { for( int k=4; k <=7; k++)

pinmode( k, OUTPUT); void loop() { int i, j; { for( j=0; j<510; j++) { // This is the sequential clock for( i=7; i>=0; i--) // Notice we read the bytes from // left to right. { bitread(o4, i)? digitalwrite(4,high):digitalwrite(4,low); Figure 12. bitread(o5, i)? digitalwrite(5,high):digitalwrite(5,low); bitread(o6, i)? digitalwrite(6,high):digitalwrite(6,low); bitread(o7, i)? digitalwrite(7,high):digitalwrite(7,low); delaymicroseconds(delayus);