Holiday

Search Site

5V 28BYJ-48 4-Phase Stepper Motor with ULN2003 Driver Board

Availability: In stock

£2.79

The 28BYJ-48 stepper motor is ideally suited to your Arduino project using 5 vdc logic level control

The 28BYJ-48 stepper motor is a 4 pole unit and steps 5.625' per pulse

The motor incorporates a 64:1 reduction gearing, increasing torque and reducing output speed

This stepper motor has 5 wires and connects directly into the ULN2003 Driver Board (included)

The ULN2003 Has 4 inputs, and has 4 bright LED's to show when each input is active

 

The complete package includes the 28BYJ-48, pre-wired, and the ULN2003 IC Driver circuit board

To get you started with the 28BYJ-48, here is the Basic Arduino Code

// Sketch for Arduino and
// 28BYJ-48, using a ULN2003 interface board to drive the stepper.
// Adapted by Mallinson-electrical

//declare variables for the motor pins
int motorPin1 = 8;    // Arduino pin 8 to In 1 on the ULN2003
int motorPin2 = 9;    // Arduino pin 9 to In 2 on the ULN2003
int motorPin3 = 10;   // Arduino pin 10 to In 3 on the ULN2003
int motorPin4 = 11;   // Arduino pin 11 to In 4 on the ULN2003
                      // supply power to + and - from Arduino 5vdc and gnd

int motorSpeed = 1250;  // set speed of 28BYJ-48 stepper,

//max frequency is 100hz, so max speed is 1250

//(100 steps per second 8 pulses per step so 10000 divided by 8)
// 1250 equates to apx 6 seconds per rev
int count = 0;          // count of steps made
int countsperrev = 510; // number of steps per full revolution- actually 509.5 as gear ratio is 63.684:1 apx
int revolutionsCW = 1; // number of revs required clockwise
int revolutionsCCW = 3; // number of revs required counterclockwise
int lookup[8] = {B01001, B00001, B00011, B00010, B00110,B00100,B01100, B01000};
int setTurnsCW = (revolutionsCW * countsperrev);
int setTurnsCCW = (revolutionsCCW * countsperrev);

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 < setTurnsCW )
    anticlockwise();
  else if (count == setTurnsCW + setTurnsCCW)
    count = 0;
  else
    clockwise();
  count++;
}


void anticlockwise()
{
  for(int i = 0; i < 8; i++) // 8 pulses
  {
    setOutput(i);
    delayMicroseconds(motorSpeed);
  }
}

void clockwise()
{
  for(int i = 7; i >= 0; i--) // 8 pulses
  {
    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));
}

Use spaces to separate tags. Use single quotes (') for phrases.


Questions:

There are no product questions yet.

Ask a question and Give an answer. Help your fellow customer.

Ask Your Question

* Required Fields

Frequently bought together

Customers who bought this product also commonly purchased the following combination of items.

Customers Who Bought This Item Also Bought

Back to top