Unformatted text preview:

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMSFall 2009 Lab 4: Motor ControlOctober 5, 2009Dr. Harrison H. ChinFormal LabsFall 2009 CalendarFall 2009 Calendar (Cont.)Lab 4: Motor ControlHardware SetupDC MotorsOptical EncodersQuadrature DecodingDecoder CircuitEncoder Signals and Decoder Circuit Timing DiagramArduino Motor ShieldL293D Quadruple Half-H Driver (H-Bridge)Pulse Width Modulation (PWM)Pulse Width Modulation (PWM)Serial Data CaptureController DesignMatlab SISOTOOL Controller Design ToolSimulink SimulationMotor Control Template CodeStep Response ComparisonServomotor ControlStepper MotorProject DiscussionDeliverablesUntitled2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMSFall 2009 Lab 4: Motor ControlOctober 5, 2009Dr. Harrison H. ChinFormal Labs1. Microcontrollers• Introduction to microcontrollers• Arduino microcontroller kit2. Sensors and Signals• Analog / Digital sensors• Data acquisition• Data processing and visualization3. GPS and Data Logging• GPS receiver and shield • Data logging• Visualization of data4. Motor Control•Motors• Encoders• Position controlFall 2009 Calendar9/9: First day of classes10/12: Columbus Day—Holiday10/13: Monday scheduleW1W2W3W4W5W6W7W8Lab 1: Lab Intro, Arduino microcontrollerLab 3: GPS & data loggingLab 4: Motor controlTerm project proposal (W4)Formal labs: 4 weeksTerm project: 8 weeksLab 2: Sensors & signals, A/D, D/A, PWMTerm project starts (W6)Fall 2009 Calendar (Cont.)11/11: Veteran’s Day—Holiday11/26-27: Thanksgiving Vacation 12/10: Last day of classesW9W10W11W12W13W14Term project presentation (12/8 & 12/10)Term project milestone presentation (11/5)Term project draft (12/1)Lab 4: Motor Control• DC motor experiments (1:30 – 3:30)– Processing Encoder Signals – Implementing Closed-Loop Position Control– Higher Performance from the Control System– Velocity Control• Controlling a Servo (3:30 – 4:30)• Project discussion (4:30 – 5:00)Hardware SetupArduinoMotor ShieldPC6-C-4 Decoder CircuitMaxon DC MotorExternal PowerUSBDC Motors Permanent Magnets Armature Terminal Brush Commutator Winding1)()(21+⎟⎠⎞⎜⎝⎛⋅=Ω−sKJRKsVstmmtTime constantWhat is the time constant for our Maxon F2140.937 motor?Courtesy of Lael Odhner. Used with permission.Optical EncodersRegular phaseQuadrature phase Opaque Translucent Disk with grid pattern Light source: LED Photodetector Track A Track A Track A Track A Track A Track A Track A Track A Track B Track B Track B Track B Track B Track B Track B Track B Counter-clockwise rotation -90-90-90oB B +9090o o A A Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation Clockwise rotation PhotodetectorsPhotodetectorsPhotodetectorsPhotodetectorsPhotodetectorsPhotodetectorsPhotodetectorsPhotodetectorsPhotodetectorsPhotodetectorsPhotodetectorsPhotodetectorsPhotodetectorsPhotodetectorsA A B B Courtesy of Harry Asada. Used with permission.Quadrature DecodingX (Ch A) Y (Ch B) F0 F1 F2 F30 0 10001 0 01001 1 00100 1 0001 Track A Track B -90oB +90o A Clockwise rotation Photodetectors A B Counter-clockwise rotation Image by Deepak Kumar Tala, http://www.asic-world.com.Courtesy of Harry Asada. Used with permission.Decoder Circuit• The PC6 decoder by US Digital decodes the quadrature outputs of an incremental shaft encoder. The circuit we use is the PC6-C-4, clock and direction version that provides 4x the encoder resolution.• For the Maxon motor each encoder channel has 100 counts and through a 6:1 ratio gearhead we get 600 counts per channel (see Maxon motor specs).• With the PC6-C-4 decoder circuit we get a total of 4x600 = 2,400 counts per shaft rotation.Images removed due to copyright restrictions.Please see any photo of the US Digital PC6 decoder,such as http://usdigital.com/assets/images/galleries/take_2__0088.jpg,and the pinout diagram for the LS7184 quadrature clock converter(datasheet).Encoder Signals and Decoder Circuit Timing Diagram• Check the following signals with an OscilloscopeImage removed due to copyright restrictions.Please see p. 4 in US Digital, "PC6 Encoder to Counter Interface Board."Arduino Motor Shield• 2 connections for 5V 'hobby' servos• Up to 4 bi-directional DC motors • Up to 2 stepper motors (unipolar or bipolar) with single coil, double coil, interleaved or micro-stepping. • 4 H-Bridges: L293D chipset provides 0.6A per bridge (1.2A peak) with thermal shutdown protection, 4.5V to 36V • Pull down resistors keep motors disabled during power-up • Arduino reset button brought up top • 2-pin terminal block to connect external power, for separate logic/motor supplies Photo by ladyada on Flickr.L293D Quadruple Half-H Driver (H-Bridge)• The L293D is a quadruple high-current half-H driver. • The L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V. • It is designed to drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage loads in positive-supply applications.An H-bridge enables a voltage to be applied across a load in either direction.Image removed due to copyright restrictions.Please see the pinout for L293D NE package(datasheet).Pulse Width Modulation (PWM)• PWM frequency (Hz) = 1 / PWM period• Duty cycle = Pulsewidth / PWM period• PWM frequencies typically range from 100Hz into MHz• Duty cycles can be used from 0 – 100%, although some systems use much smaller ranges, e.g. 5-10% for hobby remote servos.• The waveform has two pieces of information: Period and Pulsewidth, although they are usually not changed simultaneously.Use a scope to look at the PWM signal if you can Volts VpeakTimePWM periodPulsewidthPulse Width Modulation (PWM)• Can be used as a substitute for analog output (high frequency switching is filtered out by the physical systems and what is left is the mean voltage).• Applications include: lamp dimmers, motor speed control, power supplies,…Courtesy of Tod E. Kurt. Used with permission.Serial Data Capture• Use “RealTerm” Serial Capture Program (http://realterm.sourceforge.net/) to monitor and capture serial data•for


View Full Document

MIT 2 017J - Lab 4: Motor Control

Documents in this Course
Load more
Download Lab 4: Motor Control
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 4: Motor Control and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 4: Motor Control 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?