+21622886281
Arduino Stepper Motor

Control a 28BYJ-48 stepper motor by the Arduino

The 28BYJ-48 stepper motor is a small, low-cost stepper motor that is commonly used in small hobby and robotic projects. It has a step angle of 5.625 degrees per step, and a maximum torque of 34.3 mNm. The motor is typically driven by a ULN2003 driver IC, which converts the control signals from an Arduino microcontroller into the appropriate signals for the motor to rotate.

To control the 28BYJ-48 stepper motor with an Arduino, you will need to connect the motor to the ULN2003 driver IC, and then connect the driver IC to the Arduino. The ULN2003 driver IC has four input pins and four output pins, so you will need to connect the input pins to four digital pins on the Arduino, and connect the output pins to the four wires of the stepper motor.

Once the connections are made, you can use the Arduino’s digitalWrite() function to send control signals to the ULN2003 driver IC, which will in turn control the rotation of the stepper motor. The Arduino IDE also has a stepper library which can be used to control the stepper motor with the help of the ULN2003 driver IC.

Purpose of this tutorial:

In this tutorial, we will control a 28BYJ-48 stepper motor by the Arduino board: the stepper motor turns clockwise then it turns counterclockwise.

Necessary components

Arduino UNO

The Arduino UNO is a microcontroller board based on the ATmega328P. It is a popular choice for beginners and hobbyists as it is easy to use and has a wide range of available libraries and tutorials. The board has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button. It can be programmed using the Arduino IDE, which supports C and C++ programming languages and has a simple and user-friendly interface. The board can be powered via USB or an external power source, and can be used to control and interface with various electronic devices and sensors.

28BYJ-48 stepper motor

The 28BYJ-48 stepper motor is a small, low-cost stepper motor that is commonly used in small hobby and robotic projects. It is a four-phase, five-wire stepper motor that is driven by a ULN2003 driver IC. The motor has a step angle of 5.625 degrees per step, meaning it takes 64 steps to complete a full rotation. The motor’s maximum torque is 34.3 mNm, so it is not suitable for heavy loads or high-precision applications.

The 28BYJ-48 stepper motor is relatively easy to control, as it only requires a simple ULN2003 driver IC. The ULN2003 driver IC is a Darlington transistor array that can drive the stepper motor with a maximum current of about 500mA. It has four input pins and four output pins, which makes it easy to connect to an Arduino or other microcontroller.

To control the 28BYJ-48 stepper motor, you will need to send control signals to the input pins of the ULN2003 driver IC, which will in turn control the rotation of the stepper motor. The Arduino IDE provides a Stepper library that can be used to control the stepper motor with the help of the ULN2003 driver IC.

ULN2003 driver IC

The ULN2003 driver IC is a Darlington transistor array that is commonly used to drive stepper motors and other devices that require high current and/or high voltage. It is a monolithic high-voltage, high-current Darlington transistor array. It consists of seven NPN Darlington pairs that feature high-voltage outputs with common-cathode clamp diode for switching inductive loads.

The ULN2003 driver IC has 16 pins with 4 inputs and 7 outputs. The 4 inputs are connected to the microcontroller, and the 7 outputs are connected to the stepper motor. The inputs of the ULN2003 driver IC are connected to the digital pins of the microcontroller, which is typically an Arduino board, and the outputs are connected to the stepper motor coils. The ULN2003 IC can drive up to 500mA of current per channel.

The ULN2003 driver IC is a simple and convenient way to drive stepper motors and other devices that require high current and/or high voltage. It is relatively easy to use, as it only requires a simple connection to a microcontroller and the device that it is driving.

Battery of 9V

A 9V battery is a type of primary (non-rechargeable) battery that provides a nominal voltage of 9 volts. It is commonly used in portable devices such as smoke detectors, remote controls, and small electronic toys. 9V batteries are also used in some low-power projects such as small robots and simple electronic circuits.

Connecting wires

Wires in a robotic system are used to connect and transmit electrical signals between different components of the robot. These components can include sensors, actuators, motors, and the microcontroller, such as an Arduino. The wires in a robotic system are typically made of copper and are insulated to prevent electrical interference and short circuits.

The type of wires used in a robotic system depends on the specific application and requirements of the robot. For example, a robot that requires high-current power transmission may use thicker, high-gauge wires, while a robot that requires a high degree of flexibility and movement may use thinner, more flexible wires.

Mounting the Arduino board with the 28BYJ-48 stepper motor

  • We connect the UNL2003 module to the stepper motor

  • We connect the IN1 pin of the UNL2003 module to pin N°8 of the Arduino

  • We connect the IN2 pin of the UNL2003 module to pin N°9 of the Arduino

  • We connect the IN3 pin of the UNL2003 module to pin N°10 of the Arduino

  • We connect the IN4 pin of the UNL2003 module to pin N°11 of the Arduino

Arduino program

Here is the program which allows to control the stepper motor by the Arduino card.




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top