28BYJ-48 Stepper Motor + Arduino + L293D Motor Shield + processing setup test run

28BYJ-48 Stepper Motor + Arduino + L293D Motor Shield + processing setup test run




Stepper Motor  is a motor controlled by a series of electromagnetic coils. The center shaft has a series of magnets mounted on it, and the coils surrounding the shaft are alternately given current or not.

creating magnetic fields which repulse or attract the magnets on the shaft, causing the motor to rotate.

This design allows for very precious control of the motor,There are two basic types of stepper motors, unipolar steppers and bipolar steppers .

In This post , I will show you how to connect 28BJY-48 Stepper motor with Adafruit l293d motor shield and control over gcode streaming via Processing software.

The unipolar stepper motor has five or six wires and four coils (actually two coils divided by center connections on each coil). The center connections of the coils are tied together and used as the power connection.

They are called unipolar steppers because power always comes in on this one pole.


Specification of 28BJY-48 Stepper motor

Rated voltage ——- 5VDC
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
Insulated resistance ————–>10MΩ(500V)
Insulated electricity power ——600VAC/1mA/1s
Insulation grade——————- A
Rise in Temperature————– <40K(120Hz)
Noise ——————————-<35dB(120Hz,No load,10cm)
Model ——————————28BYJ-48 – 5V


28BJY-48 Motor Pinout


Switching Sequence

Mechanical Data

This Motor has a Gear ratio of 64 , and Stride Angle 5.625°  so this motor has a 4096 Steps .

 steps = Number of steps in One Revolution  * Gear ratio   .

steps= (360°/5.625°)*64″Gear ratio” = 64 * 64 =4096 . this value will substitute it on The arduino Sketch 


Connection of 28BJY-48 and Arduino + Adafruit l293d motor shield

Motor connection


Arduino code

Click to download code

Processing Code

Click to download Processing code


Sample G-code

Clikc to download g-code



Low cost PCB on PCBWay - only $5 for 10 PCBs and FREE first order for new members

PCB Assembly service starts from $88 with Free shipping all around world + Free stencil 

PCBWay 2nd PCB Design Contest



Hobbiest Electrical DIY project passionate

1 Response

  1. Pingback: Milana Travis

Leave a Reply

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

Enter Captcha Here : *

Reload Image

Post comment