3 Pages

#### ELEC3050 HCS12 Lab7

Course: ELEC 3050, Fall 2008

School: Auburn

Word Count: 734

Rating:

###### Document Preview

ELEC 3040/3050 Lab Manual Lab 7 Revised 2/23/09 LAB #7: PWM WAVEFORM GENERATION INTRODUCTION There are many devices that can be controlled by periodically pulsing one or more of their input signals. For example, stepper motors rotate some fixed amount for each pulse applied to their inputs. The intensity of a light or the speed of a D.C. motor can be controlled with pulse-width modulated (PWM) digital waveforms,...

##### Unformatted Document Excerpt
Coursehero >> Alabama >> Auburn >> ELEC 3050

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

ELEC 3040/3050 Lab Manual Lab 7 Revised 2/23/09 LAB #7: PWM WAVEFORM GENERATION INTRODUCTION There are many devices that can be controlled by periodically pulsing one or more of their input signals. For example, stepper motors rotate some fixed amount for each pulse applied to their inputs. The intensity of a light or the speed of a D.C. motor can be controlled with pulse-width modulated (PWM) digital waveforms, with the light/motor effectively controlled by the average voltage of the signal. A PWM waveform is a periodic signal comprising pulses of fixed duration (width). For a constant period, variations in the pulse width can create different desired effects. The purpose of this lab is to generate a PWM signal waveform, with switch-selectable pulse widths. This will be used in the next lab as a control signal to drive a D.C. motor at one of several switch-selectable speeds. PWM SIGNAL CHARACTERISTICS Figure 1 illustrates the parameters of a PWM signal. The waveform is characterized by the expression T = T1 + T2, where T is the period of the waveform, with the signal high for time T1 and low for time T2. The <a href="/keyword/duty-cycle/" >duty cycle</a> of the waveform is defined as the high time divided by the period: T1/(T1 + T2) = T1/T. Note that the three waveforms shown in Figure 1 have <a href="/keyword/duty-cycle/" >duty cycle</a> s of 50%, 25%, and 75%, as indicated. 2 1 50% <a href="/keyword/duty-cycle/" >duty cycle</a> 2 1 25% <a href="/keyword/duty-cycle/" >duty cycle</a> 2 1 75% <a href="/keyword/duty-cycle/" >duty cycle</a> Figure 1. Pulse-width modulated (PWM) waveforms. The term pulse-width modulation refers to the alteration (modulation) of the high time, T1, while maintaining a constant period, T. In the next lab, we will drive a D.C. motor with a PWM signal, varying its <a href="/keyword/duty-cycle/" >duty cycle</a> to control the speed of the motor. 7-1 ELEC 3040/3050 Lab Manual Lab 7 Revised 2/23/09 PWM SIGNAL GENERATION In this lab, PWM signals will be generated with two different methods. One will utilize the output compare operating mode of the HCS12 main timer module utilized in the previous lab. The second method will utilize a special PWM module available in the HCS12. Overviews of these two modules are given in the class presentation slides, posted on the class web page. HARDWARE AND SOFTWARE DESIGN Using both methods described above, you are to implement a switch-selectable, variable <a href="/keyword/duty-cycle/" >duty cycle</a> PWM waveform generator. Three switches are to be used to select one of eight <a href="/keyword/duty-cycle/" >duty cycle</a> values for the PWM waveform: 87.5%, 75%, 62.5%, 50%, 37.5%, 25%, 12.5%, and 0% (i.e. stopped). When the waveform generation is stopped, the signal is to be in the low state. (HINT - Counter register values for the 7 non-zero <a href="/keyword/duty-cycle/" >duty cycle</a> s can be stored in an array, with the number corresponding to the switch settings used as an index into that array.) Two C programs, one for each method, must be written to produce the variable <a href="/keyword/duty-cycle/" >duty cycle</a> PWM signal. For this lab, the period T should be 1 msec. LABORATORY EXPERIMENTS 1. Verify that your hardware is operating properly by using test programs from previous labs, or some other brief program that exercises the hardware. 2. Download and run your first PWM waveform generation program, based on the HCS12 timer module output compare function, displaying the generated waveform on the oscilloscope. Demonstrate to the lab instructor that you can use the switches to select the three assigned <a href="/keyword/duty-cycle/" >duty cycle</a> s and the stop condition. Also show that the stop condition leaves the signal in the low state. 3. Measure and record the <a href="/keyword/duty-cycle/" >duty cycle</a> for each of the eight switch settings, and plot the measured values on a graph (vs. switch setting) to ensure a linear increase in <a href="...

Textbooks related to the document above:

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Auburn - ELEC - 3050
ELEC 3040/3050 Lab #7PWM Waveform GenerationGoals of this lab exerciseBegin the design of the semester project: a speed controller for a D.C. motor Generate a pulse-width-modulated (PWM) waveform with switch-selectable duty cycleUsing two
Auburn - ELEC - 3050
ELEC 3050 Lab ManualLab 8 Revised 01/23/09LAB #8: SPEED CONTROL OF A D.C. MOTOR THE MOTOR DRIVERINTRODUCTION This lab continues the main part of the lab project, which is the development of a speed controller for a D.C. motor. The controller is
Auburn - ELEC - 3050
Lab 8. Speed Control of a D.C. motorThe Motor DriverMotor Speed Control Project1. 2. 3. 4. 5. Generate PWM waveform Amplify the waveform to drive the motor Measure motor speed Measure motor parameters Control speed with a computer algorithm12v d
Auburn - ELEC - 3050
ELEC 3040/3050 Lab ManualLab 9 Revised 01/23/09LAB #9: SPEED CONTROL OF A D.C. MOTOR SENSING MOTOR SPEED VIA TACH FREQUENCYINTRODUCTION Precise control of the speed of a D.C. motor requires that one be able to accurately measure the speed so tha
Auburn - ELEC - 3050
Lab 9. Speed Control of a D.C. motorSensing Motor Speed (Tach Frequency Method)Motor Speed Control Project1. 2. 3. 4. 5. Generate PWM waveform Amplify the waveform to drive the motor Measure motor speed Measure motor parameters Control speed with
Auburn - ELEC - 3050
ELEC 3040/3050 Lab ManualLab 10 Revised 01/23/09LAB #10: SPEED CONTROL OF A D.C. MOTOR SENSING MOTOR SPEED VIA TACH AMPLITUDEINTRODUCTION Precise control of the speed of a D.C. motor requires that one be able to accurately measure the speed so t
Auburn - ELEC - 3050
Lab 10. Speed Control of a D.C. motorSpeed Measurement: Tach Amplitude MethodMotor Speed Control Project1.2. 3. 4. 5.Generate PWM waveform Amplify the waveform to drive the motor Measure motor speed Measure motor parameters Control speed with
Auburn - ELEC - 3050
ELEC 3040/3050 Lab ManualLab 11 Revised 01/23/09LAB #11: SPEED CONTROL OF A D.C. MOTOR MOTOR CHARACTERIZATIONINTRODUCTION The primary goal of this semester-long project is to develop a speed controller for a D.C. motor. Whenever the motor is to
Auburn - ELEC - 3050
Lab 11. Speed Control of a D.C. motorMotor CharacterizationMotor Speed Control Project1. 2. 3. 4.5.Generate PWM waveform Amplify the waveform to drive the motor Measure motor speed Measure motor parameters Control speed with a PID controller
University of Michigan - BME - 516
Noll (2006)CT Notes 1: Page 1Computed Tomography Notes, Part 1 Challenges with Projection X-ray Systems The equation that governs the image intensity in projection imaging is:I d ( x, y ) = I 0 exp - ( x, y, z )dz()Projection x-ray syst
University of Michigan - BME - 516
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|28 Jun 2005 20:24:29 -0000 vti_title:SR|BONUS ! (2.0 points) vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|28 Jun 2005 20:24:29 -0000 vti_timecreated:TR|28
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|07 Jul 2005 15:33:47 -0000 vti_title:SR|Lecture 7 vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|07 Jul 2005 15:33:47 -0000 vti_timecreated:TR|07 Jul 2005 15
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|20 Jul 2005 22:48:08 -0000 vti_title:SR|Lecture 7 vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|20 Jul 2005 22:48:08 -0000 vti_timecreated:TR|20 Jul 2005 22
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|26 Jul 2005 14:53:00 -0000 vti_title:SR|Lecture 7 vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|26 Jul 2005 14:53:00 -0000 vti_timecreated:TR|26 Jul 2005 14
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|28 Jul 2005 15:32:59 -0000 vti_title:SR|Lecture 7 vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|28 Jul 2005 15:32:59 -0000 vti_timecreated:TR|28 Jul 2005 15
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|16 Jun 2005 22:43:28 -0000 vti_title:SR|STAT3600 vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|16 Jun 2005 22:43:28 -0000 vti_timecreated:TR|16 Jun 2005 22:
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|16 Jun 2005 22:43:28 -0000 vti_title:SR|PowerPoint Presentation vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|16 Jun 2005 22:43:28 -0000 vti_timecreated:TR|
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|24 Jun 2005 17:51:09 -0000 vti_title:SR|Lecture 7 vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|24 Jun 2005 17:51:09 -0000 vti_timecreated:TR|24 Jun 2005 17
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|16 Jun 2005 22:43:29 -0000 vti_title:SR|Review 1 vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|16 Jun 2005 22:43:29 -0000 vti_timecreated:TR|16 Jun 2005 22:
Auburn - STAT - 3600
Sheet1 vti_encoding:SR|utf8-nl vti_timelastmodified:TR|08 Jun 2005 18:45:22 -0000 vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|08 Jun 2005 18:45:22 -0000 vti_timecreated:TR|08 Jun 2005 18:53:51 -0000 vti
Auburn - STAT - 3600
Sheet1 vti_encoding:SR|utf8-nl vti_timelastmodified:TR|08 Jun 2005 18:45:15 -0000 vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|08 Jun 2005 18:45:15 -0000 vti_timecreated:TR|08 Jun 2005 18:53:51 -0000 vti
Auburn - STAT - 3600
Sheet1 vti_encoding:SR|utf8-nl vti_timelastmodified:TR|08 Jun 2005 18:45:19 -0000 vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|08 Jun 2005 18:45:19 -0000 vti_timecreated:TR|08 Jun 2005 18:53:51 -0000 vti
Auburn - COMP - 5340
COMP 5340/6340 Network Quality Assurance and SimulationAssignment 2 (Due on Friday March 23 2007, 40 points) (Quiz on Lab 1 on Friday March 23 2007, 60 points)Format: Each assignment has two parts: 1) Part I: Exercises to work out: nothing to turn
Auburn - E - 6200
ELEC 5200-001/6200-001 Computer Architecture and Design Spring 2007 Homework 10 Problems Assigned 4/24/07, due 4/30/07 Problem 1: (a) Consider a processor connected directly to the main memory. Each memory access (read or write) requires 50 cycles. B
Auburn - E - 6200
ELEC 5200-001/6200-001 Computer Architecture and Design Spring 2007 Homework 9 Problems Assigned 4/23/07, due 4/27/07 Problem 1: A single-cycle datapath is a one-stage pipeline. Suppose it consists of combinational and asynchronous circuitry followed
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|14 Jun 2005 13:42:42 -0000 vti_title:SR|Homework 1 Answers vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|14 Jun 2005 13:42:42 -0000 vti_timecreated:TR|14 Ju
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|08 Jun 2005 18:34:00 -0000 vti_title:SR|STAT3600 HOMEWORK I vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|08 Jun 2005 18:34:00 -0000 vti_timecreated:TR|08 J
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|14 Jun 2005 13:42:20 -0000 vti_title:SR|STAT3600 HOMEWORK I vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|14 Jun 2005 13:42:20 -0000 vti_timecreated:TR|14 J
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|08 Jun 2005 18:34:11 -0000 vti_title:SR|STAT3600 HOMEWORK I vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|08 Jun 2005 18:34:11 -0000 vti_timecreated:TR|08 J
Auburn - STAT - 3600
vti_encoding:SR|utf8-nl vti_timelastmodified:TR|10 Jun 2005 04:38:27 -0000 vti_title:SR|STAT3600 HOMEWORK I vti_author:SR|AUBURN\dengior vti_modifiedby:SR|AUBURN\dengior vti_nexttolasttimemodified:TR|10 Jun 2005 04:38:27 -0000 vti_timecreated:TR|10 J