Docsity

MEM 458 Lab 3: Open Loop Motor Speed Control using PWM and QEP, Lab Reports of Mechanical Engineering

Toggle sidebar
bg1
MEM 458 Lab 3 Nov 2008
MEM 458 Lab 3
The report for this lab is due in 2 weeks, i.e before start of next lab on the
November 18, 2008.
Open loop control of motor speed using PWM and speed measurement using QEP.
• Opening the project and running it remains same as done in the previous
labs. The project folder name is “pwm_qep_exp” and the .pjt file within it
is called “pwm_qep_exp.pjt”. The C file having the main function within
this project is called “pwm_qep_exp.c”.
• Do not power up the board at this time.
• Open the project, compile it and connect the board to the computer as was
explained in the previous lab.
• Before running the project, we have to make certain circuit connections.
• Do not power up the board yet. Once you make the connections mentioned
below, get it verified by the TA.
• We have to connect the PWM outputs to the motor leads through the H-
bridge (small green board).
¾ The (port 8 pin 9) and (port 8 pin 11) should connect to the H-bridge
board at the port “To Controller” at pins 4 and 3 respectively.
¾ The port “To Motor” on the same board connects to the leads of the
motor.
¾ This small board also needs to be powered up using a regulated
adapter.
• We also have to connect the QEP wires. They are as follows.
¾ (Port “GND” pin 1 and/or pin 2) of H-bridge board to (port 8 pin 20)
of DSP board.
¾ (Port “To Controller” pin 1) connects to (port P8 pin 6) of DSP board.
¾ (Port “To Controller” pin 2) connects to (port P8 pin 8) of the DSP
board.
Chirag Jagadish & B.C.Chang 1 of 2
Drexel University
pf2

Partial preview of the text

Download MEM 458 Lab 3: Open Loop Motor Speed Control using PWM and QEP and more Lab Reports Mechanical Engineering in PDF only on Docsity!

MEM 458 Lab 3 Nov 2008

MEM 458 Lab 3

The report for this lab is due in 2 weeks, i.e before start of next lab on the November 18, 2008.

Open loop control of motor speed using PWM and speed measurement using QEP.

  • Opening the project and running it remains same as done in the previous labs. The project folder name is “pwm_qep_exp” and the .pjt file within it is called “pwm_qep_exp.pjt”. The C file having the main function within this project is called “pwm_qep_exp.c”.
  • Do not power up the board at this time.
  • Open the project, compile it and connect the board to the computer as was explained in the previous lab.
  • Before running the project, we have to make certain circuit connections.
  • Do not power up the board yet. Once you make the connections mentioned below, get it verified by the TA.
  • We have to connect the PWM outputs to the motor leads through the H- bridge (small green board).

¾ The (port 8 pin 9) and (port 8 pin 11) should connect to the H-bridge board at the port “To Controller” at pins 4 and 3 respectively. ¾ The port “To Motor” on the same board connects to the leads of the motor. ¾ This small board also needs to be powered up using a regulated adapter.

  • We also have to connect the QEP wires. They are as follows.

¾ (Port “GND” pin 1 and/or pin 2) of H-bridge board to (port 8 pin 20) of DSP board. ¾ (Port “To Controller” pin 1) connects to (port P8 pin 6) of DSP board. ¾ (Port “To Controller” pin 2) connects to (port P8 pin 8) of the DSP board.

Chirag Jagadish & B.C.Chang 1 of 2 Drexel University

MEM 458 Lab 3 Nov 2008

  • Once these connections are done, get it verified and then power up the board.
  • Compile the project and load the program.
  • Add the variable named “rpmnew” to the watch window as well as the CMPR register used in controlling the PWM and thereby the speed.
  • Run the program. Change the values in CMPR register and note the changes in speed of the motor.
  • Pin diagrams are available in lab 1 handout at the website http://www.pages.drexel.edu/~changbc/458_course/MEM458_Fall2008_lab1.pdf

Questions:

  1. Make a graph of the PWM (CMPR register values) and the rpm (rotation speed values), 5 to 10 readings would do. Comment on the result.
  2. Obtain speeds of 100, 150 and 200 by appropriately changing the values of CMPR registers. Record the values of the registers used to obtain the various speeds.
  3. Change the program so that angular position of the motor shaft can be computed.

Chirag Jagadish & B.C.Chang 2 of 2 Drexel University