Stepper Motors with Arduino – Controlling Bipolar & Unipolar stepper motors
|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!
Stepper Motors with Arduino – Controlling Bipolar & Unipolar stepper motors
Stepper Motors with Arduino – Controlling Bipolar & Unipolar stepper motors
How long have you been coding for?
Amazing explanation, very simple and clear teaching. Thank you for your effort.
Great tutorial. Lots of applications to think about. Thank you sir..
You are the best teacher ever! Step by step, in logical progression. With a companion website. Please continue to make these Fantastic videos!
Amazing video sir, can you make a video on how to make CNC using Arduino and CNC shield V3 drivers .
Excellent tutorial. veryy clearly illustrated and explained and , although long, was very easy stay with until the end. I look forward to viewing your other videos.
Thank you for another great video. My kids and I are building a robot, this has been very helpful!
You are amazing ! Thank you.
I appreciate the work you put into this!
Absolutely brilliant. Just what I have been looking for in a tutorial. Very easy to understand
Am enjoying your tutorials very much ..👏🏻..
please make a tutorial on potentiometer controlled stepper motor for diy election throttle body.. and please use XOD for programming if possible. Thank you in advance
Thank you for a great video.
I am working on A4988 to drive stepper motor as my application has more than 25 steppers running. I have had problem controlling my stepper's micro step. Also if you know about wemos d1 r2 (ESP8266 Wifi module) then i need your help controlling my stepper using my wifi module.
Please help and reply ASAP!
Best teacher ever! Thanks, GOD for your creation! Huuuuuuup!
po-tent-i-o-me-ter made me leave
amazing video. can the uno drive 3x these steppers? does it have enough pins to do that? i wonder why small diy cnc laser engravers dont use these motors , is seems very cheap and easy to use than standard steppers,any idea?
Brilliant video, I have purchased all I need to make a safe combination dialer now all I need is a sketch to program it, brain matter is now under pressure.
can you please tell me about stepper Logic Voltage? current per phase? continuous current per phase? and Operating voltage?
nice workshop
you're a genius, keep 'em comin'…..
The best explanation ever seen on stepper motors. thanks
this is how to control the ULN2003 with an arduino, not how to control steppers per say.
stepper motor
Hello. I want to thank you for such a good video. At last a could understand Steppers with a nice explanation. I have one question: You said that next instruction is not executed until the stepper finishes moving. Can I use "interrupts" to stop the stepper anytime; for example if a sensor is activated while the stepper is moving? Thanks a lot and greetings from Ecuador.
I appreciate the work you put into this tutorial. I know it's a lot of work. Thank you.
This is one of the best tutorials I've ever watched. Thank you so much!
sir i need a help in sketch
sir ,in first case – two stepper motors(motor A and motor B) rotate together at different speeds, its ok i can do this.
in Second case – two stepper motors A and B, motor A rotates but at same time motor B at rest position and after completing motor A its rotation, motor B starts its rotation and motor A on rest position, ok i can also do this
but problem is here
lets take a example i want motor A and B rotates 360degrees
motor A start to rotate and motor B start its rotation when motor A competed 180degrees and then both motor are rotate and complete their one rotions
Amazing video
Very professionally done! Love the voice clarity and pace of your videos and the support material, links, etc. Kudos to how clean and organized your shop is! You give me inspiration to up my game, thanks for all the work you put into these videos.
Hi, Why can't you use the 5V power supply on the arduino?
Thank you for another excellent video!
Beautifully narrated and easy to understand content – Always looking forward to your video! you are a teacher thank you.
Excellent work, this will be my first Arduino project driving a stepper motor, you have made it very understandable, thank you for your time and effort.
how to find gear reduction
I took stepper motor from hard disk haw do i know what driver do i use??
Thank you for sharing videos of this quality. You explain things clearly! This is one of the best, maybe the best tutorial(s) on this subject. I subscribed to the channel. I discovered the website this evening, great job!!
At first I looked at the time for the video and thought this is way too long, especially for the attention deficit modern populace including myself, and maybe should be broken into smaller segments. But I see that, within the very good documentation, you have links to specific segments of the video so one can view a particular segment of interest.
Great speaking, pace and instruction.