stEPPEr Motor controL usinG
89c51 MicrocontroLLEr
Mandeep Singh Walia
H
ere’s a stepper motor controller based on 89C51 microcontroller to control the rotation of a DC stepper motor in clockwise and anti-clockwise directions. The controller is simple and easy-to-construct, and can be used in many applications including machine control and robotics for controlling the axial rotation in
XY plane. A similar circuit can be added to control the rotation of the motor in either
XZ or YZ plane.
Fig. 1 shows the block diagram of the stepper motor control system. The power supply section (in Fig. 2) consists of a stepdown transformer (7.5V AC, 1A), bridge rectifier (comprising diodes D1 through
D4), filter capacitors (C1 and C2) and regulator IC 7805.
We have used here an Atmel make low-power, high-performance, 8-bit CMOS microcontroller AT89C51 with 4 kB of Flash p rogrammable and erasable read-only memory (PEROM). It has a 128x8-bit internal RAM, 32 programmable input/output
(I/O) lines and two 16-bit timer/counters.
The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional non-volatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, Atmel
AT89C51 is a powerful, highly flexible and cost-effective solution to many embedded control applications. From traffic control equipment to input devices, computer networking products and stepper motor controllers, 89C51 microcontrollers deliver a high performance with a choice of configurations and options matched to the specific needs of each application.
IC AT89C51 features:
1. 8-bit CPU with math registers A and B
2. 16-bit program counter (PC) and data pointer (DPTR)
3. 8-bit program status word (PSW)
4. 8-bit stack pointer (SP)
The control switches for the motor are connected to Reset and Port P0.7 pins of the microcontroller. Circuit description
Fig. 2 shows the complete circuit of the stepper motor controller.