For our final project we built an ATmega32 based stepper motor controller which measures the angular position of the motor shaft using an optical encoder and quadrature decoder. Our system performs 3 basic functions:
(1) Communicate with a PC by means of a RS-485 interface, and (2) Generates step and direction signals for a US digital MD1 microstep drive, and (3) Monitors the stepper motor rotor shaft by means of an optical encoder.