Stepper Motor Driver Unipolar & Bipolar Module ULN2003

  • Was  RM10.00 
  • RM5.00

  • Product Code: stepper-board-UL2003
  • Availability: In Stock

UNL2003 board

The ULN2003 stepper motor driver board allows you to easily control the 28BYJ-48 stepper motor from a microcontroller, like the Arduino Uno. One side of the board side has a 5 wire socket where the cable from the stepper motor hooks up and 4 LEDs to indicate which coil is currently powered. The motor cable only goes in one way, which always helps.

On the side you have a motor on / off jumper (keep it on to enable power to the stepper). The two pins below the 4 resistors, is where you provide power to the stepper. Note that powering the stepper from the 5V rail of the Arduino is not recommended. A separate 5-12V 1Amp power supply or battery pack should be used, as the motor may drain more current than the microcontroller can handle and could potentially damage it. In the middle of the board we have the ULN2003 chip. At the bottom are the 4 control inputs that should be connected to four Arduino digital pins.

 

Features

  • On-board ULN2003A chipset
  • 5-12V power supply
  • On-board 4-way indicator light;
  • On-board XH-5P socket
  • Compatible with Arduino
  • Stepper Motor Driver Test and DIY

 

Specifications

 

  • Rated voltage: 5V to 12V DC
  • Number of Phase: 4
  • Speed Variation Ratio: 1/64
  • Stride Angle: 5.625° /64
  • Frequency: 100Hz
  • DC resistance: 50Ω±7%(25℃)
  • Idle In-traction Frequency: > 600Hz
  • Idle Out-traction Frequency: > 1000Hz
  • In-traction Torque: >34.3mN.m(120Hz)
  • Self-positioning Torque: >34.3mN.m
  • Friction torque: 600-1200 gf.cm
  • Pull in torque: 300 gf.cm
  • Insulation grade A

 

Motor Connections

The diagram to the left shows the 5 wires connected to the motor. Plug the motor into the driver board.

The Arduino should be connected to the ULN2003 driver board as shown below:

  • 5V+ connect to +5V
  • 5V-  connect to 0V (Ground)
  • IN1: to Arduino digital input pin 8
  • IN2: to Arduino digital input pin 9
  • IN3: to Arduino digital input pin 10
  • IN4: to Arduino digital input pin 11 

Driving the Motor
You should drive the motor by enabling the pins in an 8-phase order as shown to the left (Clockwise movement):

  • Drive IN4 only
  • Drive IN4 and IN3
  • Drive IN3 only
  • Drive IN3 and IN2

For anti-clockwise motion, simply follow the sequence in reverse

 

 

Arduino Sketch for stepper motor board ULN2003

// This Arduino example demonstrates bidirectional operation of a
// 28BYJ-48, using a ULN2003 interface board to drive the stepper.
// The 28BYJ-48 motor is a 4-phase, 8-beat motor, geared down by
// a factor of 68. One bipolar winding is on motor pins 1 & 3 and
// the other on motor pins 2 & 4. The step angle is 5.625/64 and the
// operating Frequency is 100pps. Current draw is 92mA.
////////////////////////////////////////////////

//declare variables for the motor pins
int motorPin1 = 8;    // Blue   - 28BYJ48 pin 1
int motorPin2 = 9;    // Pink   - 28BYJ48 pin 2
int motorPin3 = 10;    // Yellow - 28BYJ48 pin 3
int motorPin4 = 11;    // Orange - 28BYJ48 pin 4
                        // Red    - 28BYJ48 pin 5 (VCC)

int motorSpeed = 1200;  //variable to set stepper speed
int count = 0;          // count of steps made
int countsperrev = 512; // number of steps per full revolution
int lookup[8] = {B01000, B01100, B00100, B00110, B00010, B00011, B00001, B01001};

//////////////////////////////////////////////////////////////////////////////
void setup() {
  //declare the motor pins as outputs
  pinMode(motorPin1, OUTPUT);
  pinMode(motorPin2, OUTPUT);
  pinMode(motorPin3, OUTPUT);
  pinMode(motorPin4, OUTPUT);
  Serial.begin(9600);
}

//////////////////////////////////////////////////////////////////////////////
void loop(){
  if(count < countsperrev )
    clockwise();
  else if (count == countsperrev * 2)
    count = 0;
  else
    anticlockwise();
  count++;
}

//////////////////////////////////////////////////////////////////////////////
//set pins to ULN2003 high in sequence from 1 to 4
//delay "motorSpeed" between each pin setting (to determine speed)
void anticlockwise()
{
  for(int i = 0; i < 8; i++)
  {
    setOutput(i);
    delayMicroseconds(motorSpeed);
  }
}

void clockwise()
{
  for(int i = 7; i >= 0; i--)
  {
    setOutput(i);
    delayMicroseconds(motorSpeed);
  }
}

void setOutput(int out)
{
  digitalWrite(motorPin1, bitRead(lookup[out], 0));
  digitalWrite(motorPin2, bitRead(lookup[out], 1));
  digitalWrite(motorPin3, bitRead(lookup[out], 2));
  digitalWrite(motorPin4, bitRead(lookup[out], 3));
}

 

 

Suggestion:

Stepper Motor 28BYJ [5v / 12v] 4-Phase 5-Wire

  • Model : 28BYJ-48
  • Number of Phase : 4
  • Speed Variation Ratio : 1/64
  • Stride Angle : 5.625° /64
  • Rated voltage : DC 5v / DC 12v
 

Write a review

Note: HTML is not translated!
    Bad           Good

 

Related Products

Tags: Stepper, Motor Driver