SlideShare ist ein Scribd-Unternehmen logo
1 von 6
Mini Project- Stepper Motor Control
Author: University of Hertfordshire
Date created:
Date revised: 2009


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.
Mini Project- Stepper Motor Control




Section 1. Project Introduction
1. Learning Outcomes assessed (as taken from the DMD)

All Learning Outcomes specified in the Definitive Module Documentation are assessed as part of this miniproject. The
specific Learning Outcomes are:

Knowledge and Understanding
Be able to:
    • Identify and enhance knowledge gained from other studies in areas relevant to the project topic selected.

Skills and Attributes
Be able to:
    • Use relevant measurement instruments to analyse a defined electronic engineering problem relevant to digital
        systems or embedded computer systems.
    • Synthesise a solution to a defined electronic engineering problem relevant to digital systems or embedded
        computer systems.
    • Take, and analyse appropriately, test results from that solution.
    • Carry out a simple critical evaluation of the results taken.

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.

4. Project Summary: (50 words max)

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.

5. Introductory Lecture (2hrs) Content:

    •   The importance of embedded system design, specifically structure charts and I/O Maps
    •   The MC68230 PIT board
    •   Addressing I/O ports
    •   Bit manipulation and masks

6. Preparation Session (3hrs):
The students will complete a design and programming task to generate specified patterns on the output pins of the
buffered I/O port, controlled by the signals on the input pins. They could, for example, derive and output a parity signal
from the inputs. This session will act primarily as a refresher about:
The programming and development environment for the 68000 system
Debugging (breakpoints, single stepping, watch windows, …)

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.

9. Facilitator guidance (key ideas to draw out from students):

Day 1: Need for clear design. Variations in motor positions. Benefits of reusable functions. Limits of open-loop control.

Day 2: Relating processor speed to motor behaviour (e.g. speed). Impact of real-world effects such as inertia. Speed
profiling.

10. Required Resources: Laboratory Facilities and Teaching Support.

Laboratory Resources: LD403

    1. PC Workstations with development environment for 68000 Flight boards.
    2. Main 68000 development boards, buffered I/O boards, stepper motor boards, detachable discs to attach to
       stepper motor dial to vary the inertia.

    Teaching Resources:

    3. Briefing packs for the preparatory session and both practical days.




                                                        Page 3 of 6
Mini Project- Stepper Motor Control



Section 2. Tasks for Project Day 1
Write functions to perform each of the tasks listed below. You should demonstrate each task as you complete it. The
code that you submit at the end of the day should include all of these functions.

Initialise the motor by moving it to a standard starting position.

Count the number of steps required for a full rotation of the motor. (Read the result using the debugger.) Perform this
procedure in full-step and half-step mode.


Design, develop and test a diagnostic start-up routine that moves the motor to its starting position, performs enough
steps for a full rotation, and verifies that the motor is back in the starting position. Output a signal to indicate whether the
test was successful.

Move the motor to a position that the user has specified on the input switches.


Move the motor through a sequence of 3 positions (4, 9, 2) that are stored in an array in the program. The motor must
take the shortest route between the specified positions.




                                                          Page 4 of 6
Mini Project- Stepper Motor Control



Section 3. Tasks for Project Day 2
Perform each of the tasks listed below. You should demonstrate each task as you complete it. The code that you submit
at the end of the day should include all of the changes described below.

Your code includes a "delay loop" to control the rate at which pulses are sent to the motor. Perform experiments to
relate the number of times the loop is executed to the pulse rate (in Hz).

Modify your code to include a variable that represents the desired pulse rate (in Hz). Your code should convert this rate
into an appropriate limit for the delay loop.

Perform experiments to determine the maximum pulse rate that can be used to rotate the wheel.


Attach the extra mass to the wheel.

Repeat step 3 to determine the maximum pulse rate with the extra mass attached.

Modify your code so that the motor begins to rotate using the pulse rate from step 5, and then gradually increases the
pulse rate. This is known as implementing a "speed profile". Experiment to find out the maximum pulse rate that can be
achieved in this way and the maximum rate at which the pulse rate can be increased.


Optional Tasks:

Notice that the motor will overshoot if it is moving at high speed and is stopped suddenly. Modify your code so that the
speed profile includes a gradual increase in speed, followed by a period at constant speed, followed by a gradual
deceleration.

Using your speed profile, make the motor complete exactly 20 revolutions in as short a time as possible.




                                                       Page 5 of 6
Mini Project- Stepper Motor Control



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.




© University of Hertfordshire 2009




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

Weitere ähnliche Inhalte

Was ist angesagt?

How to make a Line Follower Robot
How to make a Line Follower RobotHow to make a Line Follower Robot
How to make a Line Follower RobotroboVITics club
 
Multi-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for ArduinoMulti-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for ArduinoWanita Long
 
Electric car with arduino
Electric car with arduinoElectric car with arduino
Electric car with arduinoDishant Sharma
 
Automatic railway gate control using microcontroller
Automatic railway gate control using microcontrollerAutomatic railway gate control using microcontroller
Automatic railway gate control using microcontrollerpukeshwar harmukh
 
Report - Line Following Robot
Report - Line Following RobotReport - Line Following Robot
Report - Line Following RobotDivay Khatri
 
54350108 metro-prototype-new
54350108 metro-prototype-new54350108 metro-prototype-new
54350108 metro-prototype-newpomil
 
Basic Tutorial for Robotic Arm
Basic Tutorial for Robotic ArmBasic Tutorial for Robotic Arm
Basic Tutorial for Robotic ArmYu Wei Chen
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoKarim El-Rayes
 
Vlsi es-lab-manual
Vlsi es-lab-manualVlsi es-lab-manual
Vlsi es-lab-manualtwinkleratna
 
Build your 1st robot arm controlled by arduino
Build your 1st robot arm controlled by arduinoBuild your 1st robot arm controlled by arduino
Build your 1st robot arm controlled by arduinoMohamed Okasha
 
Final Slot Car Report
Final Slot Car ReportFinal Slot Car Report
Final Slot Car ReportKyle Avery
 
Line following robot
Line following robotLine following robot
Line following robotsunil sah
 
ROBOTIC ARM WITH VOICE CONTROLLED AND IMAGE PROCESSING (1)
ROBOTIC ARM WITH VOICE CONTROLLED AND IMAGE PROCESSING (1)ROBOTIC ARM WITH VOICE CONTROLLED AND IMAGE PROCESSING (1)
ROBOTIC ARM WITH VOICE CONTROLLED AND IMAGE PROCESSING (1)Jayan Kant Duggal
 
Calculator design with lcd using fpga
Calculator design with lcd using fpgaCalculator design with lcd using fpga
Calculator design with lcd using fpgaHossam Hassan
 
برمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأولبرمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأولAhmed Sakr
 

Was ist angesagt? (20)

How to make a Line Follower Robot
How to make a Line Follower RobotHow to make a Line Follower Robot
How to make a Line Follower Robot
 
Multi-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for ArduinoMulti-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for Arduino
 
Electric car with arduino
Electric car with arduinoElectric car with arduino
Electric car with arduino
 
Automatic railway gate control using microcontroller
Automatic railway gate control using microcontrollerAutomatic railway gate control using microcontroller
Automatic railway gate control using microcontroller
 
Report - Line Following Robot
Report - Line Following RobotReport - Line Following Robot
Report - Line Following Robot
 
54350108 metro-prototype-new
54350108 metro-prototype-new54350108 metro-prototype-new
54350108 metro-prototype-new
 
Basic Tutorial for Robotic Arm
Basic Tutorial for Robotic ArmBasic Tutorial for Robotic Arm
Basic Tutorial for Robotic Arm
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Microcontoller
MicrocontollerMicrocontoller
Microcontoller
 
Vlsi es-lab-manual
Vlsi es-lab-manualVlsi es-lab-manual
Vlsi es-lab-manual
 
Build your 1st robot arm controlled by arduino
Build your 1st robot arm controlled by arduinoBuild your 1st robot arm controlled by arduino
Build your 1st robot arm controlled by arduino
 
Line follower Robot with Arduino
Line follower Robot with ArduinoLine follower Robot with Arduino
Line follower Robot with Arduino
 
Final Slot Car Report
Final Slot Car ReportFinal Slot Car Report
Final Slot Car Report
 
Line following robot
Line following robotLine following robot
Line following robot
 
ROBOTIC ARM WITH VOICE CONTROLLED AND IMAGE PROCESSING (1)
ROBOTIC ARM WITH VOICE CONTROLLED AND IMAGE PROCESSING (1)ROBOTIC ARM WITH VOICE CONTROLLED AND IMAGE PROCESSING (1)
ROBOTIC ARM WITH VOICE CONTROLLED AND IMAGE PROCESSING (1)
 
Calculator design with lcd using fpga
Calculator design with lcd using fpgaCalculator design with lcd using fpga
Calculator design with lcd using fpga
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
 
برمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأولبرمجة الأردوينو - اليوم الأول
برمجة الأردوينو - اليوم الأول
 
Project report
Project reportProject report
Project report
 
Line Following Robot
Line Following RobotLine Following Robot
Line Following Robot
 

Andere mochten auch

Andere mochten auch (14)

Stepper motor control
Stepper motor controlStepper motor control
Stepper motor control
 
Martel Electrical Calibrator
Martel Electrical CalibratorMartel Electrical Calibrator
Martel Electrical Calibrator
 
digi mul ppt
digi mul pptdigi mul ppt
digi mul ppt
 
Advanced Instrumentation
Advanced InstrumentationAdvanced Instrumentation
Advanced Instrumentation
 
Mini Project- Torque Control of a DC Motor
Mini Project- Torque Control of a DC MotorMini Project- Torque Control of a DC Motor
Mini Project- Torque Control of a DC Motor
 
Construction of digital voltmeter by Bapi Kumar Das
Construction of digital voltmeter by Bapi Kumar DasConstruction of digital voltmeter by Bapi Kumar Das
Construction of digital voltmeter by Bapi Kumar Das
 
AST 406 Ammeter and Voltmeter
AST 406 Ammeter and VoltmeterAST 406 Ammeter and Voltmeter
AST 406 Ammeter and Voltmeter
 
Analog multimeter and ohmmeter
Analog multimeter and ohmmeterAnalog multimeter and ohmmeter
Analog multimeter and ohmmeter
 
A mini project on the transmission tower
A mini project on the transmission towerA mini project on the transmission tower
A mini project on the transmission tower
 
Types of insulator
Types of insulatorTypes of insulator
Types of insulator
 
transmission line
transmission line transmission line
transmission line
 
LIFI TECHNOLOGY PROJECT TITLES 2015 - 2016
LIFI TECHNOLOGY PROJECT TITLES 2015 - 2016LIFI TECHNOLOGY PROJECT TITLES 2015 - 2016
LIFI TECHNOLOGY PROJECT TITLES 2015 - 2016
 
INSULATORS AND ITS TYPES
INSULATORS AND ITS TYPESINSULATORS AND ITS TYPES
INSULATORS AND ITS TYPES
 
Digital multimeter
Digital multimeterDigital multimeter
Digital multimeter
 

Ähnlich wie Stepper Motor Control Software

TFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdfTFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdfhoussemouni2
 
Demonstrate the implementation PI controller to regulate speed of DC Servo Mo...
Demonstrate the implementation PI controller to regulate speed of DC Servo Mo...Demonstrate the implementation PI controller to regulate speed of DC Servo Mo...
Demonstrate the implementation PI controller to regulate speed of DC Servo Mo...MIbrar4
 
Resume_Ajay_24-9-15
Resume_Ajay_24-9-15Resume_Ajay_24-9-15
Resume_Ajay_24-9-15Ajay Late
 
Runtimeperformanceevaluationofembeddedsoftware 100825224539-phpapp02
Runtimeperformanceevaluationofembeddedsoftware 100825224539-phpapp02Runtimeperformanceevaluationofembeddedsoftware 100825224539-phpapp02
Runtimeperformanceevaluationofembeddedsoftware 100825224539-phpapp02NNfamily
 
Runtime performance evaluation of embedded software
Runtime performance evaluation of embedded softwareRuntime performance evaluation of embedded software
Runtime performance evaluation of embedded softwareMr. Chanuwan
 
Qavane_211068691__IEEE_Paper-1
Qavane_211068691__IEEE_Paper-1Qavane_211068691__IEEE_Paper-1
Qavane_211068691__IEEE_Paper-1Mandilakhe Qavane
 
Minor_Project_Report
Minor_Project_ReportMinor_Project_Report
Minor_Project_ReportVansh Kumar
 
Pick and Place Robotic Claw for Engineering Applications
Pick and Place Robotic Claw for Engineering ApplicationsPick and Place Robotic Claw for Engineering Applications
Pick and Place Robotic Claw for Engineering ApplicationsIRJET Journal
 
IRJET- A Testbed for Real Time Water Level Control System
IRJET- 	  A Testbed for Real Time Water Level Control SystemIRJET- 	  A Testbed for Real Time Water Level Control System
IRJET- A Testbed for Real Time Water Level Control SystemIRJET Journal
 
Dynamic task scheduling on multicore automotive ec us
Dynamic task scheduling on multicore automotive ec usDynamic task scheduling on multicore automotive ec us
Dynamic task scheduling on multicore automotive ec usVLSICS Design
 
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUS
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUSDYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUS
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUSVLSICS Design
 
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUS
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUSDYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUS
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUSVLSICS Design
 
IRJET-Survey on Simulation of Self-Driving Cars using Supervised and Reinforc...
IRJET-Survey on Simulation of Self-Driving Cars using Supervised and Reinforc...IRJET-Survey on Simulation of Self-Driving Cars using Supervised and Reinforc...
IRJET-Survey on Simulation of Self-Driving Cars using Supervised and Reinforc...IRJET Journal
 

Ähnlich wie Stepper Motor Control Software (20)

TFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdfTFG_Oriol_Torta.pdf
TFG_Oriol_Torta.pdf
 
Demonstrate the implementation PI controller to regulate speed of DC Servo Mo...
Demonstrate the implementation PI controller to regulate speed of DC Servo Mo...Demonstrate the implementation PI controller to regulate speed of DC Servo Mo...
Demonstrate the implementation PI controller to regulate speed of DC Servo Mo...
 
Mini Project- Dual Processor Computation
Mini Project- Dual Processor ComputationMini Project- Dual Processor Computation
Mini Project- Dual Processor Computation
 
PORTFOLIO_MJ
PORTFOLIO_MJPORTFOLIO_MJ
PORTFOLIO_MJ
 
ERTS_IV_ECE.pptx
ERTS_IV_ECE.pptxERTS_IV_ECE.pptx
ERTS_IV_ECE.pptx
 
Resume_Ajay_24-9-15
Resume_Ajay_24-9-15Resume_Ajay_24-9-15
Resume_Ajay_24-9-15
 
Runtimeperformanceevaluationofembeddedsoftware 100825224539-phpapp02
Runtimeperformanceevaluationofembeddedsoftware 100825224539-phpapp02Runtimeperformanceevaluationofembeddedsoftware 100825224539-phpapp02
Runtimeperformanceevaluationofembeddedsoftware 100825224539-phpapp02
 
Runtime performance evaluation of embedded software
Runtime performance evaluation of embedded softwareRuntime performance evaluation of embedded software
Runtime performance evaluation of embedded software
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Qavane_211068691__IEEE_Paper-1
Qavane_211068691__IEEE_Paper-1Qavane_211068691__IEEE_Paper-1
Qavane_211068691__IEEE_Paper-1
 
Machine vision amk mtmr final
Machine vision amk  mtmr final Machine vision amk  mtmr final
Machine vision amk mtmr final
 
Minor_Project_Report
Minor_Project_ReportMinor_Project_Report
Minor_Project_Report
 
Pick and Place Robotic Claw for Engineering Applications
Pick and Place Robotic Claw for Engineering ApplicationsPick and Place Robotic Claw for Engineering Applications
Pick and Place Robotic Claw for Engineering Applications
 
IRJET- A Testbed for Real Time Water Level Control System
IRJET- 	  A Testbed for Real Time Water Level Control SystemIRJET- 	  A Testbed for Real Time Water Level Control System
IRJET- A Testbed for Real Time Water Level Control System
 
Dynamic task scheduling on multicore automotive ec us
Dynamic task scheduling on multicore automotive ec usDynamic task scheduling on multicore automotive ec us
Dynamic task scheduling on multicore automotive ec us
 
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUS
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUSDYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUS
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUS
 
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUS
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUSDYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUS
DYNAMIC TASK SCHEDULING ON MULTICORE AUTOMOTIVE ECUS
 
C0521114
C0521114C0521114
C0521114
 
E43012628
E43012628E43012628
E43012628
 
IRJET-Survey on Simulation of Self-Driving Cars using Supervised and Reinforc...
IRJET-Survey on Simulation of Self-Driving Cars using Supervised and Reinforc...IRJET-Survey on Simulation of Self-Driving Cars using Supervised and Reinforc...
IRJET-Survey on Simulation of Self-Driving Cars using Supervised and Reinforc...
 

Mehr von University of Hertfordshire, School of Electronic Communications and Electrical Engineering

Mehr von University of Hertfordshire, School of Electronic Communications and Electrical Engineering (20)

Mini Project- Home Automation
Mini Project- Home AutomationMini Project- Home Automation
Mini Project- Home Automation
 
Mini Project- Automated Selection Machine
Mini Project- Automated Selection MachineMini Project- Automated Selection Machine
Mini Project- Automated Selection Machine
 
Mini Project- Soundscape for Games Consoles
Mini Project-  Soundscape for Games ConsolesMini Project-  Soundscape for Games Consoles
Mini Project- Soundscape for Games Consoles
 
Mini Project- Face Recognition
Mini Project- Face RecognitionMini Project- Face Recognition
Mini Project- Face Recognition
 
Mini Project- Games Development For The Desktop Pc And Dedicated Gaming Machine
Mini Project- Games Development For The Desktop Pc And Dedicated Gaming MachineMini Project- Games Development For The Desktop Pc And Dedicated Gaming Machine
Mini Project- Games Development For The Desktop Pc And Dedicated Gaming Machine
 
Mini Project- Audio Enhancement
Mini Project- Audio EnhancementMini Project- Audio Enhancement
Mini Project- Audio Enhancement
 
Mini Project- Multimedia Montage
Mini Project- Multimedia MontageMini Project- Multimedia Montage
Mini Project- Multimedia Montage
 
Mini Project- Audio Enhancement
Mini Project-  Audio EnhancementMini Project-  Audio Enhancement
Mini Project- Audio Enhancement
 
Mini Project- Multimedia Montage
Mini Project-  Multimedia MontageMini Project-  Multimedia Montage
Mini Project- Multimedia Montage
 
Mini Project- Internet Security Mechanisms
Mini Project- Internet Security MechanismsMini Project- Internet Security Mechanisms
Mini Project- Internet Security Mechanisms
 
Mini Project Internet Security Mechanisms
Mini Project  Internet Security MechanismsMini Project  Internet Security Mechanisms
Mini Project Internet Security Mechanisms
 
Mini Project- Personal Multimedia Portfolio
Mini Project- Personal Multimedia PortfolioMini Project- Personal Multimedia Portfolio
Mini Project- Personal Multimedia Portfolio
 
Mini Projects- Personal Multimedia Portfolio
Mini Projects- Personal Multimedia PortfolioMini Projects- Personal Multimedia Portfolio
Mini Projects- Personal Multimedia Portfolio
 
Mini Project- Credit The Edit
Mini Project- Credit The EditMini Project- Credit The Edit
Mini Project- Credit The Edit
 
Mini Project- Credit The Edit
Mini Project- Credit The EditMini Project- Credit The Edit
Mini Project- Credit The Edit
 
Mini Project- Digital Video Editing
Mini Project- Digital Video EditingMini Project- Digital Video Editing
Mini Project- Digital Video Editing
 
Mini Project- Digital Video Editing
Mini Project- Digital Video EditingMini Project- Digital Video Editing
Mini Project- Digital Video Editing
 
Mini Project- Digital Audio Editing
Mini Project- Digital Audio EditingMini Project- Digital Audio Editing
Mini Project- Digital Audio Editing
 
Mini Project- Shopping Cart Development
Mini Project- Shopping Cart DevelopmentMini Project- Shopping Cart Development
Mini Project- Shopping Cart Development
 
Mini Project- Shopping Cart Development
Mini Project- Shopping Cart DevelopmentMini Project- Shopping Cart Development
Mini Project- Shopping Cart Development
 

Kürzlich hochgeladen

Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 

Kürzlich hochgeladen (20)

Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 

Stepper Motor Control Software

  • 1. Mini Project- Stepper Motor Control Author: University of Hertfordshire Date created: Date revised: 2009 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. Mini Project- Stepper Motor Control Section 1. Project Introduction 1. Learning Outcomes assessed (as taken from the DMD) All Learning Outcomes specified in the Definitive Module Documentation are assessed as part of this miniproject. The specific Learning Outcomes are: Knowledge and Understanding Be able to: • Identify and enhance knowledge gained from other studies in areas relevant to the project topic selected. Skills and Attributes Be able to: • Use relevant measurement instruments to analyse a defined electronic engineering problem relevant to digital systems or embedded computer systems. • Synthesise a solution to a defined electronic engineering problem relevant to digital systems or embedded computer systems. • Take, and analyse appropriately, test results from that solution. • Carry out a simple critical evaluation of the results taken. 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. 4. Project Summary: (50 words max) 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. 5. Introductory Lecture (2hrs) Content: • The importance of embedded system design, specifically structure charts and I/O Maps • The MC68230 PIT board • Addressing I/O ports • Bit manipulation and masks 6. Preparation Session (3hrs): The students will complete a design and programming task to generate specified patterns on the output pins of the buffered I/O port, controlled by the signals on the input pins. They could, for example, derive and output a parity signal from the inputs. This session will act primarily as a refresher about: The programming and development environment for the 68000 system Debugging (breakpoints, single stepping, watch windows, …) 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
  • 3. 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. 9. Facilitator guidance (key ideas to draw out from students): Day 1: Need for clear design. Variations in motor positions. Benefits of reusable functions. Limits of open-loop control. Day 2: Relating processor speed to motor behaviour (e.g. speed). Impact of real-world effects such as inertia. Speed profiling. 10. Required Resources: Laboratory Facilities and Teaching Support. Laboratory Resources: LD403 1. PC Workstations with development environment for 68000 Flight boards. 2. Main 68000 development boards, buffered I/O boards, stepper motor boards, detachable discs to attach to stepper motor dial to vary the inertia. Teaching Resources: 3. Briefing packs for the preparatory session and both practical days. Page 3 of 6
  • 4. Mini Project- Stepper Motor Control Section 2. Tasks for Project Day 1 Write functions to perform each of the tasks listed below. You should demonstrate each task as you complete it. The code that you submit at the end of the day should include all of these functions. Initialise the motor by moving it to a standard starting position. Count the number of steps required for a full rotation of the motor. (Read the result using the debugger.) Perform this procedure in full-step and half-step mode. Design, develop and test a diagnostic start-up routine that moves the motor to its starting position, performs enough steps for a full rotation, and verifies that the motor is back in the starting position. Output a signal to indicate whether the test was successful. Move the motor to a position that the user has specified on the input switches. Move the motor through a sequence of 3 positions (4, 9, 2) that are stored in an array in the program. The motor must take the shortest route between the specified positions. Page 4 of 6
  • 5. Mini Project- Stepper Motor Control Section 3. Tasks for Project Day 2 Perform each of the tasks listed below. You should demonstrate each task as you complete it. The code that you submit at the end of the day should include all of the changes described below. Your code includes a "delay loop" to control the rate at which pulses are sent to the motor. Perform experiments to relate the number of times the loop is executed to the pulse rate (in Hz). Modify your code to include a variable that represents the desired pulse rate (in Hz). Your code should convert this rate into an appropriate limit for the delay loop. Perform experiments to determine the maximum pulse rate that can be used to rotate the wheel. Attach the extra mass to the wheel. Repeat step 3 to determine the maximum pulse rate with the extra mass attached. Modify your code so that the motor begins to rotate using the pulse rate from step 5, and then gradually increases the pulse rate. This is known as implementing a "speed profile". Experiment to find out the maximum pulse rate that can be achieved in this way and the maximum rate at which the pulse rate can be increased. Optional Tasks: Notice that the motor will overshoot if it is moving at high speed and is stopped suddenly. Modify your code so that the speed profile includes a gradual increase in speed, followed by a period at constant speed, followed by a gradual deceleration. Using your speed profile, make the motor complete exactly 20 revolutions in as short a time as possible. Page 5 of 6
  • 6. Mini Project- Stepper Motor Control 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. © University of Hertfordshire 2009 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