Stepper Motors with Arduino – Controlling Bipolar & Unipolar stepper motors
Full Article with Code at https://dbot.ws/stepper
More projects at https://dronebotworkshop.com
Today we will be working with stepper motors, a versatile yet often misunderstood electromechanical component used in a variety of devices.
After examining how stepper motors work and what the difference is between a “Bipolar” and “Unipolar” stepper is I will show you how three methods of controlling a stepper motor with an Arduino:
1 – A common 28YBJ-48 Unipolar Stepper with a ULN2003 driver board. These inexpensive stepper and driver combinations are very common and are available on eBay, Amazon and probably in your local electronics store. I’ll show you two different ways to use these with two different Arduino libraries.
2 – A NEMA 17 Bipolar stepper motor with an L298N dual H-Bridge driver board. We’ve used the L298N driver board in another video to control a pair of brushed DC motors but it also makes a good driver for a bipolar stepper motor.
3 – The same NEMA 17 Bipolar stepper motor controlled by an A4988 stepper driver. This common driver board is used in many 3D printers and CNC machines and simplifies the control of one or several stepper motors with an Arduino.
I’ll also discuss concepts like microstepping and I will show you how to understand some of the many parameters that are included on stepper motor specification sheets.
If you’d like to jump ahead to a particular section in the video here is the table of contents:
Stepper Motor Theory – 1:34
Bipolar vs Unipolar Steppers – 4:21
Common Stepper Specifications – 8:18
NEMA motor sizes – 11:32
28YBJ-48 Unipolar Stepper with ULN2003 – 13:41
NEMA 17 Bipolar with L298N – 28:16
NEMA 17 Bipolar with A4988 – 36:41
As always you can get all of the code I use in this video by visiting the DroneBot Workshop website and looking at the article at https://dbot.ws/stepper. You’ll find code listings and hookup diagrams and well as a convenient ZIP file containing all of the Arduino sketches.
Hopefully this video will inspire you to start using stepper motors in your own designs. If you have any questions please let me know in the comments below.
Now let’s get stepping!
source