Stepper Motors & Look Up Table

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

FM Tuner Controller for Portable and Car Radios

Embedded Systems Lab Lab 7 Stepper Motor Application

MicroToys Guide: Motors N. Pinckney April 2005

Laboratory Exercise 1 Microcontroller Board with Driver Board

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

GCE A level 1145/01 ELECTRONICS ET5. P.M. THURSDAY, 31 May hours. Centre Number. Candidate Number. Surname. Other Names

GCE A level 1145/01 ELECTRONICS ET5

Binary Outputs: LEDs

Controlling Stepper Motors Using the Power I/O Wildcard

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 11 Motor Control

;;;;;;; Variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; cblock Bank0RAM ;Temporary storage for STATUS during interrupts

Lab 8. Stepper Motor Controller

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

GCE A level 1145/01 ELECTRONICS ET5

ECE Solution to Homework #4

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

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

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

Electric Power Systems 2: Generators, Three-phase Power, and Power Electronics

Stepper Motors WE CREATE MOTION

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

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

Triple Stage Incubator

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

Haydon Kerk Motion Solutions Phone: International: Can-Stack Linear Actuators

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

NJM37717 STEPPER MOTOR DRIVER

Experiment#6: Speaker Control

MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

EXPERIMENT 6: Advanced I/O Programming

8902/RE and 8902/RR Resolver Speed Feedback Options

Simulation Study of MOSFET Based Drive Circuit Design of Sensorless BLDC Motor for Space Vehicle

Sensor Interface Using PIC12CXXX as a Sensor Interface for Metal Detection

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

NJM3777 DUAL STEPPER MOTOR DRIVER NJM3777E3(SOP24)

The Motor sketch. One Direction ON-OFF DC Motor

Embedded Systems. Interfacing PIC with external devices Analog to digital Converter. Eng. Anis Nazer Second Semester

Automatic Railway Gate Control & Track Switching

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

Real Time Embedded Systems. Lecture 1 January 17, 2012

UNIT 9 DC Separately-Excited Generator

EASTERN MEDITERRANEAN UNIVERSITY FACULTY OF ENGINEERING Electrical and Electronics Engineering Department

Designated client product

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

05-VAWT Generator Testing

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

RoHS Directive-Compliant Compact Linear Actuators DRL Series. Features

Section 2 Lab Experiments

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

User Guide IRMCS3041 System Overview/Guide. Aengus Murray. Table of Contents. Introduction

Dual Full-Bridge PWM Motor Driver AMM56219

Basic Measurement and M-G Set OBJECTIVE

High-Torque/High-Power Bipolar Stepper Motor Driver Using 8-bit PIC Microcontroller. Over Temperature Detection COG1 COG1C COG2

Low Cost, Small Package, 120VAC Microstepping Drive

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

PBL 3717/2 Stepper Motor Drive Circuit

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

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

Half stepping techniques

USER S GUIDE POLOLU A4988 STEPPER MOTOR DRIVER CARRIER USING THE DRIVER POWER CONNECTIONS

Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan

AC generator theory. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

EXAMPLE. Use this jack for the red test lead when measuring. current from 0 to 200mA. Figure P-1

User Guide Introduction. IRMCS3043 System Overview/Guide. International Rectifier s imotion Team. Table of Contents

Binary Outputs: Transistors Used as a Switch

H-bridge for DC motor control


DC Motor Speed Control using PID Controllers

Microcontroller Based Inductance Capacitance Meter

NJM2671 NJM 2671E2 STEPPER MOTOR CONTROLLER / DRIVER

Pulse Width Modulation

Active Vibration Isolation of an Unbalanced Machine Tool Spindle

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

Physics 335 Lab 7 - Microcontroller PWM Waveform Generation

Integrators, differentiators, and simple filters

EE 340L EXPERIMENT # 5.1 SYNCHRONOUS GENERATOR (STAND-ALONE OPERATION)

ANGULAR POSITION CONTROL OF DC MOTOR USING SHORTEST PATH ALGORITHM

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

K7QO Marker Generator

NJM3771 DUAL STEPPER MOTOR DRIVER

Actuator Precision Characterization

AN Driving stepper motors using NXP I 2 C-bus GPIO expanders. Document information

University of Washington Department of Electrical Engineering EE 351: Introduction to Energy Devices and Systems. Lab 1: Power Electronic Converters

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

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

output passes full first (positive) hump and 1/2-scale second hump

ECE 203 LAB 6: INVERTED PENDULUM

INTEGRATED CIRCUITS. AN1221 Switched-mode drives for DC motors. Author: Lester J. Hadley, Jr.

Introduction to Stepper Motors

PBL 3774/1. Dual Stepper Motor Driver PBL3774/1. February Key Features. Description PBL 3774/1

Hashemite University Faculty of Engineering Mechatronics Engineering Department. Microprocessors and Microcontrollers Laboratory

Ac to dc rectifier calculator

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

Solar Mobius Final Report. Team 1821 Members: Advisor. Sponsor

56 mm sq. (2.20 inch sq.)

Final Project Report E3390 Electronic Circuits Design Lab. RFID Access Control System. Jeffrey Mok Joseph Kim

Electromechanical Switch Replacement

Dual Full-Bridge PWM Motor Driver AM2168

Alternating Current Study Guide. Preface. This module is DIFFICULT.

Transcription:

tepper Motors & Look Up Table Unipolar (5 lead) stepper motor from www.mpj.com. stepper motor is a digital motor with two phases and 4, 5, or 6 leads. These leads connect to two sets of electromagets. When current is applied to one set of leads, the permanent magnet on the motor aligns with the field created by the electromagnet (as is the left figure). When the other leads are energized, the motor rotates to line up with the next electromagnet. (In essence, a stepper motor is a 2-phase synchronous motor if you've had EE 331.) black black white 4-Lead (bipolar) 5-Lead (unipolar) 6-Lead (unipolar) In your lab kits is a 5-lead unipolar stepper motor. 1 February 5, 2018

green 134 Ohms red 134 Ohms black 134 Ohms brown 134 Ohms white To make the motor spin, Tie the black lead to ground. pply + to +24V to each lead in succession:,,,. The more the voltage, the more the current (and torque). ote that each phase needs positive and negative current to make the motor spin. Two ways to do this follow: 2 February 5, 2018

Method 1: Use the center tap and four P transistors: +12V a0 a1 a2 134 134 300 300 a0 a1 a2 +12V b1 b0 300 b0 b1 b2 134 134 300 b2 Each phase has a resistance of 134 Ohms to the center tap (black wire). If you connect a given end to ground, current will flow in that direction. The current you're trying to turn on and off is: max (I c ) = 12V 0.2V 134Ω max (I c ) = 88m To saturate a given transistor βi b > I c I b > 88m 100 = 0.88m The largest base resistor you can use is then R b < 0.7V 0.88m = 4.88kΩ The smallest is what the PI can output (25m) R b > 0.7V 25m = 172Ω The above circuit uses 300 Ohms as a bit of an overkill. 3 February 5, 2018

Method #2: Use an H-ridge 1k b e PP T1 PP T3 e b 1k c tepper Motor c 1k b c P T2 P T4 c b 1k e e For example, for the above voltages for (,,, ) Transistor T2 and T3 are off (there is no current through the diode, making Ib = 0) Transistor T1 and T4 are saturated This results in -4.6V being applied ot the stepper motor (assuming the transistors are saturated) If you switch the votlages for (,,, ), the +4.6V would be applied to the stepper motor. If you turn off all four transistors, then is applied to the stepper motor. Hence, with an H-bridge, you can one phase of a stepper motor. With two H-bridges, you can drive both phases. 4 February 5, 2018

L9110s H-rige search ebay using keywords rduino H-ridge Rather than building an H-bridge from scratch, your lab kits includes an L9110s H-bridge with the following specifications: Vcc: 2. < Vcc < 12V urrent: Up to 800m per channel Input Motor -1-1 0 0 0 1 +Vcc 1 0 +Vcc 1 1 Z Z onnect the stepper motor to the H-bridge as follows: green R0 () R2 () -1-1 G MOTOR green white red brown 5.. 12V Vcc MOTOR red black R1 () -1 brown R3 () -1 L9110s H-ridge white tepper Motor 5 February 5, 2018

To make the motor spin, apply the following voltages to the H-bridge. This is termed full-stepping. (R3) (R2) (R1) (R0) 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 repeat Each step the motor to rotate 3.6 degrees per step, or 100 steps per rotation. To make the motor spin the opposite direction, shift right instead. You can also do half-stepping with the following sequence: (R3) (R2) (R1) (R0) 0 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 1 repeat This causes the motor to rotate 1.8 degrees per step, or 200 steps per rotation. idelight: ote that with full-stepping, you're trying to approximate sin() and cos() with a 4-step square wave tep 0 tep 1 tep 2 tep 3 tep 0 tep 1 tep 2 tep 3 Vac sin() Vbd cos() Full-tepping pproximation to sin() and cos() 6 February 5, 2018

With half-stepping, you're approximating sin() and cos() with an 8-step square wave: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 in() os() Essentially, a stepper motor is a 2-phase synchronous motor. If you approximate the sine waves with 4 or 8 steps, you get a stepper motor. oftware: Look Up Tables In, when you do a table read or write, such as TLE[3] = 12; what you are doing is Taking the address of the start of the variable, TLE Offsetting this address by 3, and Writing the number '12' to this address In assembler, you can do this with a subroutine. For full stepping: ; W stores a number 0..3 ; W PORT ; 0 0 0 0 1 0x01 ; 1 0 0 1 0 0x02 ; 2 0 1 0 0 0x04 ; 3 1 0 0 0 0x08 Fulltep: andlw 0x03 movwf TEMP incf TEMP,F retlw 0x01 retlw 0x02 retlw 0x04 retlw 0x08 7 February 5, 2018

For half-stepping: ; W stores a number 0..3 ; W PORT ; 0 0 0 0 1 0x01 ; 1 0 0 1 1 0x03 ; 2 0 0 1 0 0x02 ; 3 0 1 1 0 0x06 ; 4 0 1 0 0 0x04 ; 5 1 1 0 0 0x0 ; 6 1 0 0 0 0x08 ; 7 1 0 0 1 0x09 8 February 5, 2018

Halftep: andlw 0x07 movwf TEMP incf TEMP,F retlw 0x01 retlw 0x03 retlw 0x02 retlw 0x06 retlw 0x04 retlw 0x0 retlw 0x08 retlw 0x09 The main calling routine would then look something like the following: 9 February 5, 2018

; --- tepper.asm ---- #include <p18f4620.inc> ; --- Variables --- T0 EQU 1 T1 EQU 2 T2 EQU 3 GLE EQU 4 TEMP EQU 5 ; --- Main Routine --- org 0x800 call Init clrf TEP Loop: call tep call Table call Output movlw 250 call Wait_ms goto Loop ; PORT = TLE[TEP] ; each step is 250ms ; --- ubroutines --- tep: incf return GLE,F Table: movf GLE,W andlw 0x03 movwf TEMP incf TEMP,F retlw 0x01 retlw 0x02 retlw 0x04 retlw 0x08 ; full stepping Output movwf return PORT Init: clrf TRI ;PORT is output clrf TRI ;PORT is output clrf TRI ;PORT is output clrf TRI ;PORT is output clrf TRIE ;PORTE is output movlw 0x0F movwf O1 ;everyone is binary return 10 February 5, 2018

Wait_ms: movwf T2 W2: movlw 10 movwf T1 W1: movlw 100 movwf T0 W0: decfsz T0,F goto W0 decfsz goto decfsz goto T1,F W1 T2,F W2 return end 11 February 5, 2018

Microstepping: stepper motor is actually an synchronous machine: If you send a square wave to the motor, it jumps from one angle to another: it is operating as a stepper motor. For the motor above, it has 200 steps per rotation. If you send a sine wave to the motor, it smoothly moves from one angle to another: it is operating as an synchronous machine. For the motor above, it rotates once per 50 cycles: 200 steps revolution 1cycle 4steps = 50 cycles revolution If you apply a 60Hz sine wave to the above motor (sine on phase, cosine on phase ), it will spin at 60 cycle sec 1 revolution 50 cycles = 1.2 rps = 72 rpm For example, if you look at the voltage applied to phase, when using full stepping the voltage V looks like the blue line in the following figure (shown for two cycles): 1 0 0 0 V = 1 0 1 0 0 V = 0 0 0 1 0 V = -1 0 0 0 1 V = 0 repeat If you use a sine wave instead, you'll be able to position the motor inbetween steps. This is shown in the red line below: The other phase would be a cosine waveform, resulting in V = sin (φ) V = cos (φ) and φis the desired angle for the stepper motor. Each cycle (360 degrees) corresponds to one step. ignal sent to V when using full steps (blue line) or microstepping (red line). 12 February 5, 2018

V would be 90 degrees out of phase (cosine vs. sine). Linear ctuators: linear actuator is a stepper motor with a hollow shaft. If you put a screw into the motor and spin it, it moves the screw forward and backwards. (You can also do this my having the above motor drive a scew which moves a device forward and backwards as you rotate the motor.) E Motors L23GK (www.servosystems.com $200) For example, assume you have a stepper motor with 400 steps per rotation (half stepping) driving a 1/4 x 20 screw. The screw needs to rotate 20 times to move 1 inch (the 20 in the name). Each step moves the device 400 steps rotation 20 rotation inch = 8,000step/inch You can control the position of the stage to 0.125mil (0.003mm) (!) 13 February 5, 2018