Embedded Systems

stepper motor interfacing with 8051

stepper motor interfacing with 8051_________________________________________________________________________________________________

  • What is motor? – A motor is an electric machine that converts electrical energy into mechanical energy. Motor has following parts:

dc_motor_diagram (1)

  1. Rotor –In an electric motor the moving part is the rotor which turns the shaft to deliver the mechanical power. The rotor usually has conductors laid into it which carry currents that interact with the magnetic field of the stator to generate the forces that turn the shaft. However, some rotors carry permanent magnets, and the stator holds the conductors.
  2. Stator –The stationary part is the stator, usually has either windings or permanent magnets. The stator is the stationary part of the motor’s electromagnetic circuit. The stator core is made up of many thin metal sheets, called laminations. Laminations are used to reduce energy loses that would result if a solid core were used.
  3. Windings-Windings are wires that are laid in coils, usually wrapped around a laminated soft iron magnetic core so as to form magnetic poles when energized with current.
  4. Commutator –commutator is a mechanism used to switch the input of certain AC and DC machines consisting of slip ring segments insulated from each other and from the electric motor’s shaft. The motor’s armature current is supplied through the stationary brushes in contact with the revolving commutator, which causes required current reversal and applies power to the machine in an optimal manner as the rotor rotates from pole to pole.

stepper motor interfacing with 8051

  • Types of motor –There are many confusion arises when motors categorized, but mainly two types that is AC & DC. Here we only interface simple DC motor, geared DC motor and stepper motor as you can see on above pics.
  • Operation – we can’t direct interface any motors with microcontroller because


  1. Low voltage compatibility – microcontroller pin produced very low voltage about 5V and at this voltage motor not drive properly. To operate motor, at least 9V required.
  2. Low current compatibility – microcontroller pin produced very low current about 1.3mA(AT89c51)  and at this current rating motor not drive. To operate motor, at least 300mA current required.
  3. Back EMF- motor produced back current due to induced EMF which is harmful for microcontroller and cause of this microcontroller pin may be damaged.


Solution is L293D Dual H-Bridge IC for simple DC motor and ULN2803 or ULN2003 for stepper motor, this IC produce 600mA to 700mA current with voltage range of 9V to 48V which is enough to drive small electronics motors. The circuit diagram of how to interface motor using this IC is shown in side TAB(circuit diagram).


  • Applications – Different motors are used according to its characteristics and required parameters and its application as diverse as industrial fans, blowers and pumps, machine tools, household appliances, power tools, and disk drives.

Click Here : Interfacing of simple DC & geared DC motor

Click Here : stepper motor interfacing with 8051 and program point of view understanding

1. Circuit Diagram Of GEAR MOTOR interfacing with 8051

gear motor interfacing with 8051   ____________________________________________________________________________________________________

2. Circuit Diagram Of STEPPER MOTOR interfacing with 8051

stepper motor interfacing with 8051

1. Program of GEAR MOTOR Controlled By Switches With 8051

PROTEUS File for SIMULATION(Password Of RAR file is

download (1)


2. Program of STEPPER MOTOR Controlled By Switches With 8051

PROTEUS File for SIMULATION(Password Of RAR file is

download (1)


Content for the tab VIDEO