Laboratory Exercise 1 Microcontroller Board with Driver Board

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

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

MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

Lab Exercise 9: Stepper and Servo Motors

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

MicroToys Guide: Motors N. Pinckney April 2005

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

EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 11 Motor Control

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

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

Motor control using FPGA

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

EXPERIMENT 6: Advanced I/O Programming

Experiment#6: Speaker Control

Sensors and Sensing Motors, Encoders and Motor Control

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

The NMIH-0050 H-Bridge

' The PicBasic Pro Compiler Manual is on line at: '

Upgrading from Stepper to Servo

Brushless 5 click. PID: MIKROE 3032 Weight: 25 g

DC motor control using arduino

Datasheet of the Easy Servo Drive ES-D VAC or VDC, 8.2A Peak, Close-loop, No Tuning. Version

Ocean Controls KT-5198 Dual Bidirectional DC Motor Speed Controller

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

Embedded Systems Lab Lab 7 Stepper Motor Application

PIC Analog Voltage to PWM Duty Cycle

Sensors and Sensing Motors, Encoders and Motor Control

Implementation of Brushless DC motor speed control on STM32F407 Cortex M4

ELCT 912: Advanced Embedded Systems

unit: mm 4130 Parameter Symbol Conditions Ratings Unit Maximum supply voltage 1 V CC 1 max No input signal 50 V Maximum supply voltage 2 V CC

PIC ADC to PWM and Mosfet Low-Side Driver

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

CHAPTER 4 CONTROL ALGORITHM FOR PROPOSED H-BRIDGE MULTILEVEL INVERTER

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

EE 308 Spring S12 SUBSYSTEMS: PULSE WIDTH MODULATION, A/D CONVERTER, AND SYNCHRONOUS SERIAN INTERFACE

University of Texas at El Paso Electrical and Computer Engineering Department

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

Understanding RC Servos and DC Motors

Integrated Easy Servo

ies-2309 Integrated Easy Servo

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

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

DMC-8 (SKU#ROB )

OPENCOCKPITS IOCard USBSTEPPER INSTALLATION AND USER S MANUAL

PWM System. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

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

Servo click. PID: MIKROE 3133 Weight: 32 g

STPDRV-1 Stepper Motor Driver Data Sheet (R1.0) BFF Design Ltd

Step vs. Servo Selecting the Best

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

Laboratory 11. Pulse-Width-Modulation Motor Speed Control with a PIC

Lab 8. Stepper Motor Controller

Physics 335 Lab 7 - Microcontroller PWM Waveform Generation

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

GCE A level 1145/01 ELECTRONICS ET5

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

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

Jaguar Motor Controller (Stellaris Brushed DC Motor Control Module with CAN)

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

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

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

LSI/CSI LS7290 STEPPER MOTOR CONTROLLER. LSI Computer Systems, Inc Walt Whitman Road, Melville, NY (631) FAX (631)

LAB #10: Analog Interfacing

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

Datasheet of the Easy Servo Drive ES-D VDC, 8.0A Peak, Closed-loop, No Tuning

Bholanath. User s Manual. Precision Engineering Pvt.Ltd. BHSSD Step Servo Driver. Note:-

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

ME 2110 Controller Box Manual. Version 2.3

Stepper Motors & Look Up Table

MICROCONTROLLER TUTORIAL II TIMERS

Ametek, Inc. Rotron Technical Products Division. 100 East Erie St., Suite 200 Kent, Ohio User's Guide. Number Revision F

Electronic Speed Controls and RC Motors

Voltage-Versus-Speed Characteristic of a Wind Turbine Generator

ServoStep technology

SMART Funded by The National Science Foundation

GCE A level 1145/01 ELECTRONICS ET5

CONSTRUCTION GUIDE Robotic Arm. Robobox. Level II

Testing the hardware 7. Worksheet 1 - Driving the DC motor 8. Worksheet 2 - Driving the stepper motor 10. Worksheet 3 - Driving the servo motor 12

Step Motor Driver User Manual

Controlling Stepper Motors Using the Power I/O Wildcard

HBS Series Hybrid Servos

Simple Bridge Stand Alone H-Bridge Data Sheet Revision 1 August 2005

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

Hardware Flags. and the RTI system. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Laboration: Frequency measurements and PWM DC motor. Embedded Electronics IE1206

MEGORAS Technology - TB6600 STEP MOTOR Driver.

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

Microcontroller Based Electric Expansion Valve Controller for Air Conditioning System

Bill of Materials: PWM Stepper Motor Driver PART NO

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

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

Manual. ihss57-xx. Integrate Stepper Servo Motor.

Measuring Distance Using Sound

Servo and Motor Controller

LS7362 BRUSHLESS DC MOTOR COMMUTATOR / CONTROLLER

Programming PIC Microchips

Programmable Control Introduction

Datasheet of the Easy Servo Motor ES-M Series

EQ-ROBO Programming : bomb Remover Robot

Application Information

Transcription:

Laboratory Exercise 1 Microcontroller Board with Driver Board The purpose of this lab exercises is to demonstrate how the Microcontroller Board can be used to control motors connected to the Driver Board to achieve custom and precise control over the motors. There motors include DC motor, Unipolor and Bipoloar motors, servo motors, and brushless motors. In this exercises, we will demonstrate how to control the speed of the DC motor, how to control the degree of turning of a bipolar stepper motor as well as the servo motor. As previously mentioned in the Driver Board lab exercises, the Driver Board offers two type of control: manual, and PIC. When PIC mode is selected on the Driver Board, signal input from the Microcontroller will be expected by the Driver Board, and this signal will be routed to the motor to achieve control. DC Motor DC motors are devices that transfer electrical energy into mechanical energy. A typical DC motor consists of a series of magnetic poles (stator) arranged at a fixed number of degrees. A rotor containing a set of windings is located in between the stator. When electrical energy is applied to the motor the current circulating on the windings react with the magnetic field produced by the magnetic poles creating movement of the rotor. The rotor is then attached to a shaft where the load can be applied. Driving the DC motor using an external microcontroller requires two basic digital signals: (1) a Start/Stop and (2) a Direction signal. The Start/Stop signal can be pulse width modulated (PWM) in order to control the speed of the motor. The PWM signal should have a frequency from 1 KHz to 2 KHz. (CAUTION: Check the ratings of your motor for the actual frequency requirements). In order to increase or decrease the speed of the motor you need to control the duty cycle (i.e. the amount of time the signal is ON). To demonstrate in basics how the Start/Stop signal works, we will use delay functions generated in the PIC16 on the Microcontroller to pulse the output of the PORT pins and therefore achieving the PWM frequency required. While the choice of pin is arbitrary, we will use RA1 for Start/Stop signal and RA0 for the Direction signal. For 1 KHz frequency we pulse the pin RA0 in 1ms interval. Start_Stop bsf PORTA,1 ;Pluse RA1 high call Delay ;Delay for 1ms bcf PORTA,1 ;Pluse RA1 low call Delay ;Delay for 1ms goto Start_Stop ;infinite loop goto $

The delay routine can be generated easily by an online tool called Delay Code Generator. 1 Note that in order for the delay generated to function correctly, the Clock Frequency must be set to 10MHz which is the oscillator frequency on the Microcontroller Board. The delay code will look something like the following: ;*************************************** ; Delay 1ms ;*************************************** Delay movlw 0xF3 movwf d1 movlw 0x02 movwf d2 Delay_0 decfsz d1, f goto $+2 decfsz d2, f goto Delay_0 goto $+1 return ;2 cycles Note that variables d1, d2 are not declared in the delay routine generated. The user must declare the variables at the beginning of the code. The Direction signal can be either a high signal for the forward direction or low signal for the reverse direction. This is easily achieved by setting a particular pin high or low in the Microcontroller. bcf PORTA,0 ;Pluse RA0 low for dirction selection In order to drive a DC motor using the PIC Microcontroller board follow the next steps: 1. Make sure that the Mode Selector switch is in the DC mode. The LED labelled DC will turn ON. 2. Also, make sure that the DC/Bipolar jumper is on the DC mode. 3. Locate the PIC/ MAN switch on the controller side of the DC motors. Select the PIC mode. 4. Based on your motor ratings connect the required power of the motor on the right side of the board. Look for the terminal labelled DC1 PWR. 5. Connect the motor to the terminals labelled DC1 OUT located at the bottom right side of the board. 1 This tool can be found online at: http://www.piclist.com/cgi bin/delay.exe

6. Locate the DC1 Controller module and connect the three signals: DIR DC1, CLK DC1 and GND from the PIC Microcontroller Board. 7. In order to achieve the right duty cycle you can implement delays between turning the signal ON and OFF, the time of the delay depends mainly in the frequency of your motor and the speed requirements. For instance, a 50% on a 1KHz motor will require a delay of 500ms. Bipolar Stepper Motor A stepper motor is designed to run in discrete incremental steps when the correct electrical sequence of pulse is applied to the coils of the motor. Typically a bipolar motor has 4 wires which represent two sets of coils. Each set of coils can be thought ad a separate DC motor. Therefore it is possible to run a bipolar stepper motor in the same way a DC motor is run. The bipolar stepper motor requires a pulse sequence to operate; the direction and speed of the motor can be entirely controlled by adjusting the pulse sequence. Driving the Bipolar Stepper motor using an external microcontroller requires three basic digital signals: (1) a Start/Stop and (2) a Direction signal and (3) a Clock signal. In the following example we will attempt to drive a bipolar stepper motor with PIC16 on the Microcontroller Board. The pin assignment is as follow: RA2 will be used as Start/Stop pin, RA0 will be used as Direction signal, and RA1 as clock signal. The Start/Stop signal RA2 can be simply set high to start the motor or low to stop the motor by using the bcf or bsf command. The Direction signal RA0 is set to high for forward direction and low for reverse direction. By changing the frequency of the Clock signal you should be able to speed up or reduce the speed of the motor. To change the frequency the ON and OFF times must change either independently or simultaneously. To drive the bipolar motor, you can set the ON and OFF time delays at 1ms each. clock bsf PORTA,1 ;Pluse the clock signal high call Delay ;1ms delay bcf PORTA,1 ;Pluse the clock signal low call HalfS ;1ms delay goto clock ;infinite loop goto $ Note that with different delay time one can change the speed of bipolar stepper motor. Also one of the properties of stepper motors is the degree per turn. This is the degree the bipolar motor turns during one clock signal in this case, 2ms. To control the degree of turning, one can simply calculated the number of cycle needed according to the motor property, and use a finite loop instead of the infinite loop. In order to drive a bipolar motor using the PIC Microcontroller board follow the next steps:

1. Make sure that the Mode Selector switch is in the BP mode. The LED labelled BP will turn ON. 2. Also, make sure that the DC/Bipolar jumper is on the BP mode. 3. Locate the PIC/MAN switch on the controller side of the bipolar motor. Select the PIC mode. 4. Based on your motor ratings connect the required power of the motor on the right side of the board. Look for the terminal labelled DC1 PWR or DC2 PWR. 5. Connect the motor to the terminals labelled DC1 OUT and DC2 OUT located at the bottom right side of the board. 6. Locate the Bipolar Controller module and connect the four signals: CLK, START STOP, DIR AND GND from the PIC Microcontroller Board. Servo Motor Servo motors are used in many applications because they provide a reliable and controlled movement. A servo motor consists of a DC motor a small electronic feedback system which includes a potentiometer and a gear system. A typical servo motor consists of three wires. A power and a ground wires and a signal wire. The signal wire is used to provide the motor the necessary pulse to drive it. Servo motors are really simple to drive but they can be delicate too. You must be careful when driving a servo motor since a high frequency pulse can permanently damage the motor. Always review the motor datasheet before running it. The servo motor requires only one clock pulse to operate. The required clock pulsed must be low frequency (about 50 Hz) and a low duty cycle range to operate (0.9 to 2.1 ms). By changing the duty cycle between the appropriate duty cycle ranges, the servo can be positioned accurately. To drive the servo motor with pluses generated by the Microcontroller, assign any pin for the clock pulse, and the ON delay should be anywhere from 0.9 to 2.1 ms and the OFF time for 17.9 or 19.1ms. clock bsf PORTA,1 ;Pluse the clock signal high call ON_Delay ;On delay at 0.9 to 2.1ms depends on ;the motor bcf PORTA,1 ;Pluse the clock signal low call OFF_Delay ;OFF delay at 17.9 to 19.1ms goto clock ;infinite loop goto $ ;Stall here The duty cycle wave will looks something like this:

To control the degree of turn of the servo motor, In order to drive a servo motor using the PIC Microcontroller board follow the next steps: 1. Locate the PIC/MAN switch on the controller side of the servo motors. Select the PIC mode. 2. Based on your motor ratings connect the required power of the motor on the right side of the board. Look for the terminal labelled SRV PWR 3. Connect the motor to the terminals labelled SRV OUT or if the servo motor has the right female header, connect it to the supplied male header 4. Locate the Servo Controller module and connect the two signals: CLK AND GND from the PIC Microcontroller Board. 5. To drive the servo motor, you need to set the ON delay anywhere from 0.9 to 2.1 ms and the OFF time for 19.1 or 17.9 ms.