Der 28BYJ-48 stepper motor

What is the 28BYJ-48 stepper motor?

The 28BYJ-48 stepper motor is a motor that is often used in small robotics projects as well as in various other applications such as automated blinds, 3D printers and camera sliders. The ULN2003 Driver Board is used for simple control of the motor.

Unlike conventional DC motors, the 28BYJ-48 stepper motor moves in small, precise steps controlled by electrical pulses instead of rotating continuously. This makes it ideal for applications where precise control of the motor movement is required.

The 28BYJ-48 is not a particularly powerful motor and only offers limited torque. It is therefore more suitable for applications with lighter loads and low mechanical resistance. In some versions of the 28BYJ-48, a reduction gear is integrated to increase the torque and step resolution.

A stepper motor can have 2-phase, 4-phase, 5-phase or more, depending on how the coils are arranged. Each phase corresponds to a specific step and has two switching states (A and B). By switching between the switching states, the coils can generate a magnetic field that pulls the rotor into a new position.

The sequence in which the coils are switched on and off is referred to as the step pattern. The correct sequence is crucial for operating the motor precisely and efficiently. The most common step patterns are “full step” and “half step”, in which either only one coil or two neighboring coils are activated simultaneously.

A special stepper motor controller or driver is required to operate the stepper motor. This driver supplies the necessary electrical impulses to activate the coils in the correct sequence and thus carry out the desired steps.

Material:

The 28BYJ-48 stepper motor on the Arduino UNO

Let’s now do a practical example with the Arduino UNO and the stepper motor, which is supplied via the ULN2003 module. Since the motor draws a lot of current, it is very important that we NEVER supply the motor directly via the Arduino pins. In addition, a motor can generate inductive electrical currents that would damage the Arduino.

The standard stepper library that is pre-installed with the Arduino IDE only supports the full-step method and has limited functions. The 28BYJ-48 motors are intended to be operated in the half-step method and therefore do not run as efficiently in full-step mode. We therefore use the AccelStepper Library, which allows us to control several motors simultaneously. We can also specify values for acceleration.

				
					#include <AccelStepper.h>
const byte Fullstep = 4;
const byte Halfstep = 8;
const short fullRevolution = 2038;
const float SteppDegree = 11.32; // Half/Full 11.32 / 5.66

// Pins IN1-IN3-IN2-IN4
AccelStepper stepper1(Halfstep, 11, 9, 10, 8);

void setup(void) {
  stepper1.setMaxSpeed(1000);     // set the maximum speed
  stepper1.setSpeed(200);         // set initial speed  
  stepper1.setAcceleration(50);   // set acceleration
  stepper1.setCurrentPosition(0); // set position
}

void loop(void) {
  float degree = 45;  // im Uhrzeigersinn
  float moveRev = degree * SteppDegree;
  stepper1.moveTo(-moveRev);  // - für Uhrzeigersinn
  stepper1.run();
}
				
			

Two further practical examples

Click here for the sketches on Github

Watch the video

★☆★ If you want to support the channel via ★☆★

or via

Twint Spenden Code

Letzte Aktualisierung am 2024-02-20 / Affiliate Links / Bilder von der Amazon Product Advertising API