Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Abstract
The following resources come from the 2009/10 BEng in Digital Systems and Computer Engineering (course number 2ELE0065) from the University of Hertfordshire. All the mini projects are designed as level two modules of the undergraduate programmes. The objectives of this project are to design, develop and test software for an embedded system that will smoothly control the rotation of a stepper motor, taking into account the physical constraints on the maximum operating speed of the motor. Each student will be required to design a C program can rotate a stepper motor to a number of user-defined positions as quickly as possible. This will include sensing of the marker pulse, the implementation of an appropriate speed profile and the use of timer-generated interrupts.
Contents
Mini Project- Stepper Motor Control....................................................................................................................................1 Section 1. Project Introduction............................................................................................................................................2 Section 2. Tasks for Project Day 1......................................................................................................................................4 Section 3. Tasks for Project Day 2......................................................................................................................................5 Credits................................................................................................................................................................................6
In addition to the resources found below there are supporting documents which should be used in combination with this resource. Please see: Mini Projects - Introductory presentation. Mini Projects - E-Log. Mini Projects - Staff & Student Guide. Mini Projects - Standard Grading Criteria. Mini Projects - Reflection. You will also need the Mini Project- Stepper Motor Control presentation.
University of Hertfordshire 2009 This work is licensed under a Creative Commons Attribution 2.0 License.
2. Project Title: Stepper Motor Control 3. Project Objectives: (technical, specific to this project)
Design, develop and test software for an embedded system that will smoothly control the rotation of a stepper motor, taking into account the physical constraints on the maximum operating speed of the motor.
7. Day 1
Expected Outcomes for the day: The student will develop a program that will move the stepper motor to a number of positions specified by the facilitator. The pulses will be generated using delay loops and the program will poll for the marker pulse input. The program should choose the shortest distance between specified positions. Assessment criteria: a logical choice of I/O configuration; a methodical design/build/test sequence; well-structured and legible code including effective breakdown into functions and clear use of #define statements; correct operation of the programs at each stage. Key Tasks: 1. Specify an I/O map to show how the stepper motor is to be connected to the input and output ports. Page 2 of 6
Mini Project- Stepper Motor Control 2. Using a structure chart, design a program to generate the appropriate signals to rotate the motor, using delay loops. Implement and test the program. Perform experiments to choose a reasonable delay length. 3. Modify the design to position the motor at the marker pulse and then to execute a complete revolution, thereby counting the number of steps per revolution and deriving the angular travel per step. 4. Further modify the design to move the motor to a specified position and then to a sequence of positions specified by the facilitator, using the shortest distance between positions.
8. Day 2
Expected Outcomes for the day: The student will build on his or her experience on Day 1 to create an interrupt-driven system that will rotate the motor at a speed (in r.p.m.) specified on a number of input pins. The student will then investigate the range of speeds at which the motor can rotate, in the presence of different amounts of inertial load. The student will then be asked to rotate the motor a given number of times as quickly as possible while maintaining reliable positioning. Ideally the student will develop the idea of using a speed profile and will implement this. Assessment criteria; a methodical design/build/test sequence; well-structured and legible code including effective breakdown into functions and clear use of #define statements; correct implementation of interrupts; correct operation of the programs at each stage; a well-designed sequence of experiments to determine the best performance of the motor. Key Tasks: 1. Design, implement, and test a program to control motor revolution speed in terms of Hertz using the delay function. 2. Determine the maximum speed at which the motor will turn (from a standing start) with and without extra inertial load. 3. Modify your code so that the motor begins to rotate using the pulse rate, which gradually increases and then decreases. This is known as implementing a "speed profile". 4. Modify the design to complete a fixed number of revolutions as quickly as possible (using a speed profile). Demonstrate the performance of the system.
Page 3 of 6
Page 4 of 6
Page 5 of 6
Credits
This resource was created by the University of Hertfordshire and released as an open educational resource through the Open Engineering Resources project of the HE Academy Engineering Subject Centre. The Open Engineering Resources project was funded by HEFCE and part of the JISC/HE Academy UKOER programme.
This work is licensed under a Creative Commons Attribution 2.0 License. The name of the University of Hertfordshire, UH and the UH logo are the name and registered marks of the University of Hertfordshire. To the fullest extent permitted by law the University of Hertfordshire reserves all its rights in its name and marks which may not be used except with its written permission. The JISC logo is licensed under the terms of the Creative Commons Attribution-Non-Commercial-No Derivative Works 2.0 UK: England & Wales Licence. All reproductions must comply with the terms of that licence. The HEA logo is owned by the Higher Education Academy Limited may be freely distributed and copied for educational purposes only, provided that appropriate acknowledgement is given to the Higher Education Academy as the copyright holder and original publisher.
Page 6 of 6