Stepper Motor Control System Based On Arduino With ULN2003 Chip

By on November 17, 2014

Web site:

Project Summary:

This project uses ULN2003 chip to drive. The working voltage is DC5V. It is widely used on ATM machine, inkjet printer,cutting plotter, fax machine,spraying equipment, medical instruments and equipments, PC peripheral, and USB Mass Storage ,precise instrument,industrial control system,office automation,robot areas,etc.

Full Project:

Step 1: Components List

Picture of Components List

Step 2: Schematic Diagram

Picture of Schematic Diagram

Working Principle:

To change the rotating speed of the stepper motor by changing the input frequency of pulse signal. And to realize the motor rotating in the clockeise direction and counter-clockwise direction by controlling the transform sequence of the pulse signal.

Step 3: Overall hardware connected diagram

Picture of Overall hardware connected diagram

Step 4: Plug into the power supply wires and place the components

Picture of Plug into the power supply wires and place the components

Step 5: Connect the LCD1602

Picture of Connect the LCD1602

Step 6: Connect the stepper motor

Picture of Connect the stepper motor

Step 7: Connect the signal end and power supply end

Picture of Connect the signal end and power supply end

Connect the signal end of the components and the cathode and anode of the power supply to the Arduino UNO and common port of power supply.

Step 8: The experimental effect after starting up the power supply

Picture of The experimental effect after starting up the power supply

Circuit diagram:

Picture of Schematic Diagram

Bill of Materials:

1.Arduino  UNO V3.0 R3 Board or Compatible Arduino

2.1602A HD44780 Character LCD Display Module

3.5V 4 Phase 5 Line 5VDC Stepper Motor

4.50K Ohm B50K Knurled Shaft Linear Rotary Taper Potentiometer

5.ULN2003AN DIP-16 TI Darlington Transistor Array

6.Trim Pot Resistor Potentiometer

7.830 Point Solderless PCB Bread Board MB-102 Test DIY

8.12X12X5mm Tact Switches 4 Legs

9.Bread Board Jump Line Jumper Wire

10. Dupont 20cm Color Cable Line

11.+5V DC power supply



1.When start up, the stepper motor will rotate in the clockwise direction, at the same time the1602 LCD will display the stepping rate and rotating direction.

2.When you press the key1, the stepper motor will rotate in the counter-clockwise direction.

3.When you turn the potentiometer to the left or to the right, you can adjust the stepping rate of the stepper motor. At the same tine the 1602 LCD will display the current speed.

Software & Code Snippets:

#include <Stepper.h>
#include <LiquidCrystal.h>
int Iint1=0;
int Iint2=1;
int anjian1=2;
int anjian2=3;
int motorSpeed;
LiquidCrystal lcd(9,8,7,6,5,4);
const int stepsPerRevolution =200;
// 	Here set the stepper motor rotation step how much is a circle
int dim=stepsPerRevolution;
//	Set the step motor number and pin
Stepper myStepper(stepsPerRevolution, 10,11,12,13);  
void setup()
   lcd.begin(16, 2);
   lcd.setCursor(0, 1);
   // 	Set the motor speed of 60 steps per minute


void loop() 
   void Direction();
   //	 Read the sensor values:
   int sensorReading = analogRead(A0);
  // 	Map it to a range of 0-150:
  int motorSpeed = map(sensorReading, 0, 1023, 0, 150);
  // 	Set the motor speed:
   if (motorSpeed > 0) 
 void clockwise()
     //   clockwise rotation
     lcd.setCursor(10, 1);

  void counterclockwise()
     //	anti-clockwise
     lcd.setCursor(10, 1);


Picture of Components List



Leave a Reply

Your email address will not be published. Required fields are marked *