In this study, a principal model of a stepper motor is described. Then it stability program was designed based on linear quadratic optimal control theory and the controllability and observability were studied. Then wardware design and the main routine flowpath chart are given. It has been observed that MCU can be useful in controlling stepper motor. Also the advantage of strategy is that the designer can make modifications to the control easily and quickly.