Stepper motor control with the PIC

From Mech
Revision as of 17:17, 26 January 2008 by Lynch (talk | contribs)
Jump to navigationJump to search

Original Assignment

The project is to use an interrupt to achieve stepper motor control along arbitrary motion profiles (e.g., mathematical functions of time, including constant velocity profiles). For example, if your interrupt is at 1 ms, you can compare your desired step count at the current time to the desired step count at the current time and step the motor forward, backward, or not at all, as appropriate. A simpler variant of this is constant speed control: the main program sets the speed, and the interrupt determines whether or not to step the motor at each interrupt time. Your documentation must provide evidence that the interrupt service routine always completes in less time than the time between interrupts.

Also, stepper motors tend to have relatively low torque, but capable of high speeds under PIC control. To improve the torque, we can add a gearhead or other transmission element. It is convenient to have the motor and gearhead in a single package, so if you see a relatively inexpensive stepper motor + gearhead combination in an appropriate size, let us know!

Overview

Circuit

Code