for anyone that is having problems with a buzzing or freaking out motor, try to connect reset and sleep pins to 5v instead of each other, that worked for me.
I cannot thank you enough for this. Every time I setup a new stepper, I use your video again! My last comment is 1 year old, in the meantime I started my own channel : )
Max Maker sir, my stepper motor is 17ha0403-32n........it is not completing a revolution even after 700 steps....... How to know whether there is a problem in stepper motor or driver
@@aneeshvempa8122 check the microstepping pins. it might be set to do microstepping. also check that you have pulled the sleep & rest pins high. if they are floating they can chop your movement up. also ensure you have the direction pin connected to something & not floating. that has no pullup or pulldown so it definitely will make your stepper wobble wrong
It's now 2020 and still this comes in veeeeery handy for someone never built a 3D printer on his own - which is now my current task ( Removing all the crap electronics from an Anycubic Predator ). Thanks a lot, appreciate the info!
Simply amazing. I followed you video and now I have my motor working exactly as I needed it. I just had to modify your code just a bit. Thank you very much.
I believe you should use pololus current limit formula which is current limit = VREF/ 8 * RCS in this case: current limit = 0.6/ 8 * 0.1 for the fullstep mode current limit = 0.6/ 8 * 0.1 * 70/100 = 0.525 A im still new to this, but it seems more accurate in this and in my case. this video still helped, thanks!
hi, does current limit mean that the provided current(to the a4988 motor driver) should at least be 0.5A, or does it mean the current should be higher than 0.5A?
00:00 Video Intro 00:18 A4988 Introduction 00:40 Microstep Resolutions - "The driver provides 5 stepper resolutions: Full Step, Half Step, ..." 00:49 A4988 General Specifications 01:15 Pinout Of The Driver 04:41 Complete Circuit Schematic 07:15 The Example Code 09:01 Demonstration Of Code & Parts In Practice 09:15 One More Example 09:25 Thanks For Watching & Outro
@@fxsrider Glad to be of help. As I found these timestamps useful in other videos, I decided to do it so that others and myself can benefit from this. Hope it helped
Thank you. This is a very good video. I just build the circuit and it works. Only had to increase the delay from 500 to 1000 microseconds. Otherwise the Nema 17 won´t move.
I followed this tutorial with all required hardware. I had issues with buzzing and losing consistent position. I used a NEMA17 stepper from an old 3D printer. I solved my issue by connecting sleep/reset pins, adjusting steps to 400 and 800 (0.09deg IPO 1.8deg), and slowly adjusted timing within loops (ended with 660ms). Hope this helps!
Look, I come from Uruguay, I've been searching for a video (in spanish) to understand those fucking drivers and I couldn't find any video to get its function... When I searched for it in english I found this video, I could understand it very quickly. Thank you very much! I wouldn't be able to keep my project without you
great video! i like a detailed explanation of each step, its perfect for a beginner like me. hopefully, in the next one hour my motor will start rotating!
During this lockdown I'm trying to make a focusing rail for macro photography, fortunately I have all the elements that you used. I still have some doubts about the code, but I will give it a try and then will make some twiking to make it to work in my project. Thank you very much!
I had identical parts and it took days of research to figure out why mine wasn't working. My motor would beep and whine and struggle to move, but in the end I solved this by adding one wire. All I had to do was apply 5V to the linked RESET and SLEEP pins. This can be done by running one wire from the same breadboard row as the A4988 VDD pin and running it to the RESET row. Hope this helps someone!
I made all the connections you showed but my engine was vibrating or doing crazy moves. I solved the problem by reversing the two middle wires of the motors in the a4988 inputs.
What may be obvious but wasn’t to me… Arduino needs to have 5v power not just power from usb connection. I spent two hours finding this out the hard way and wondering why stepper motor wasn’t going what it should and just making a single step 😢. Hopefully it’ll help others or maybe it’s just my stupidity 😂
i tried this with a low-profile 400-step 36mm printer motor (36H12HM-0304A), and found that you can drive it from a 6 ~ 6.5 volt supply (ex., four AA batteries). although the driver says the minimum supply voltage is 8v, it still worked fine, down to pulses of approximately 700 us (ie, delays of 350 microseconds, using the example in this video). below 600 us (300 us delay), the motor started to skip. I also tried driving it from 4.7v (three AA batteries), but it did not work. there was still come current reaching the motor (i could feel the coils buzzing), but the voltage on the coil wires was very low (less than 2.5 volts), and not enough to turn the rotor. even a 3.3v micro motor would not run.
thats good to know. i found this out as well but i had been nervous because my batteries would eventually go below the lovely 4v (got two, so 8v) and i had been concerned.
Great video. I did a few setups like that and it works nicely. But here is a question I cant solve: Using an ESP8266, how can I control the motor as an IOT device?
Hi, thanks for this great tutorial. Is there any solution to use only 1 power plug? Now you use one for powering the motor and one for the arduino. Thanks, Juris
Hey man...great video. Thanks for sharing. Quick question. What size battery would I need in order to power this setup? I want to build something like this, but I won't have a power outlet where I will be using it so I wanted to use batteries.
I need to generate 32 individual steps in one rotation of the stepper. Would the A4988 be the best choice for doing this? I like the fact it only deals with two perimeters - rotation and speed. Your video is probably the most clearly explained on this specific topic. Thanks.
Well this stepper motor needs 200 steps to make a 360 degrees cycle in full step mode. 200/32 is 6.25, so would need to progress 6.25 steps in order to make 360 degrees cycle in 32 steps. However you cannot use such values for driving the stepper, only full numbers. Still there is way, and that's if you would use a different stepping resolution. For example if you use 1/8th stepping resolution, you would need 200*8 = 1600 steps for 360 degrees cycle. So now, 1600/32 is 50 steps. In this case you can achieve you 32 steps for making 360 degrees with progressing 50 1/8th steps each step.
Thanks a lot for this tutorial. It helped a lot. I have a question. If I try to run the program as is on an at tiny the motor behaves different than it does, when connected to the Arduino. It has less torque and runs not as smooth. Suggestions ?
Nice tutorial. Question, the stepper I am using rotates smoothly in one direction and vibrates the other direction but I have the code to have the same delay and steps, so why does it vibrate in one direction and not the other? Cheers.
Hi, very nice informative vid. Just wanted to ask if you have experience jitter when turning on the arduino the first time on stepper? Mine jitters when turning on the arduino the first time. What could be wrong on what I am doing, I followed your circuit diagram.
Problem solved by adjusting vref to .5v, but still seeing a little, one step movement before full movement, maybe a little mechanical load will eliminate it completely.
The schematic at 5'00" is supposed to be the complete schematic, but the next picture shows two more wires. I assume this is the bridge between RESET and SLEEP?
This is a great tutorial and I followed it when I setup mine. Problem is that my motor only turns clockwise and I don't understand why... I got arduino Uno, A4988 driver and Nema 17 motor with 1.8 deg /step Rated current per winding is 1.4A. If I flip the orientation of the 4 motorwires going to a4988 , the motor turn counterclockwise, but when I run the code it only rotates to one direction and the direction it rotates depends on how I have connected the wires to the a4988.
+Dejan Nedelkovski It should, dir and step are connected to unos 12 and 13 pin and they are defined the same in the code aswell. I'll do some tinkering tonight to see if I get it going.
+Dejan Nedelkovski Got it sorted out. The reason why it was only rotating to one direction was a faulty or loose jumper wire between arduino's pin 12 (dir) and the dir pin of the a4988. After I replaced the wire it started working as it should.
Quick question, you send 200 pulses to achieve a full revolution at full step. So that means i would have to sent 400 at half step, 800 pulses at 1/4 step and so on?
the 200 you are talking about is the number of steps it takes for your stepper to make one full revolution... Micro-Steppers do exactly as you are describing but most people fail to understand why! The best way to explain it is to IMAGINE drawing a circle using only 4 points.. Draw a straight line between all four points and you get a square. Keep scaling that up in your mind until you get to 16k points... Basically what you are doing is creating a higher resolution.. Most desktop machines will never need anything more than what is called a half step. When you start getting to the Larger machines like a 4foot by 8foot then you will need more, MAYBE.. If you are cutting squares all day then you do not need any. Creators who make their own PCB might get some advantage from microstepping but to be honest bit run-out on small cuts is the biggest hit to quality so a good set of precision collets and chucks are their best investment! To get a good mental picture of run-out put a really long bit in your drill and spin it and real high speeds. look at the tip of the bit when it is spinning and you will see it does not spin as much as it goes in a circle. Getting that bit to sit in exact Zero so it spins dead straight is called run-out. Everyone who has ever drilled a hole has experienced run-out. When you put the bit to the surface and turn it on and the bit just walks away from where you are drilling! That is why center punching is used to to create a depression and keep the bit from "WALKING" When you get that in a CNC machine it creates CHATTER and that sends vibrations to your entire machine. Not to mention the final results of the cut under magnification looks more like someone chewed it rather than it being a polished finish. No amount of microstepping can fix this!
ALL YOUR TUTORIALS ARE GREAT.......but the current limiting equation makea a confusion. according to the datasheet it is, To calculate the current, A = VREF / (8 * RS). where the rs( sense resistor ) is different for many manufactures . the china board is equipped with 0.1 ohm resistors so the equation will be A = VREF / 0.8. pls comment on this finding ....
I have another question though. If I was to do microstepping, say 1/2 microstep, so I only need to connect MS1 to +5v but leave MS2 and MS3 un connected or should I connect them to ground as well? I don't want to make a mistake in connecting microstepping pins coz it may fry my board. Thanks.
+Ritvars Cipkins With a PWM motor drive you ignore a stepper motor's voltage rating, and just set your driver to your motor's current rating. Then you run as high voltage as you can into your drive. How high you can input voltage is limited by the motor driver, not the motor. The motor drive will handle current limiting for the stepper motor then.
Paul Frederick When i mention A4988 logic power and operating power, i mean two power inputs. Chip itself is powered from one, which is 3.3 to 5V and his output stage can be powered from different power source to be compliant with motor specification. Video author gives the perfect schematic in his site. Drawed perfectly correct. Just misspelled in voice track.
Ritvars Cipkins I must have missed that. Because it looked like he got it right to me. Although I am not sure about his decision to leave some inputs floating, but it did appear to work for them.
for anyone that is having problems with a buzzing or freaking out motor, try to connect reset and sleep pins to 5v instead of each other, that worked for me.
Spent a day trying to figure that out, lol.
thanks sir, it's work for me
I cannot thank you enough for this. Every time I setup a new stepper, I use your video again! My last comment is 1 year old, in the meantime I started my own channel : )
Max Maker sir, my stepper motor is 17ha0403-32n........it is not completing a revolution even after 700 steps....... How to know whether there is a problem in stepper motor or driver
max maker i need ur help regarding stepper motor
@@aneeshvempa8122 check the microstepping pins. it might be set to do microstepping. also check that you have pulled the sleep & rest pins high. if they are floating they can chop your movement up. also ensure you have the direction pin connected to something & not floating. that has no pullup or pulldown so it definitely will make your stepper wobble wrong
@@aneeshvempa8122 yours might be precise mine takes 4096 steps per rotation
It's now 2020 and still this comes in veeeeery handy for someone never built a 3D printer on his own - which is now my current task ( Removing all the crap electronics from an Anycubic Predator ). Thanks a lot, appreciate the info!
I'm glad to hear that. Have fun building!
Thank you! I tried following other tutorials that included strange libraries but this worked flawlessly. You're the best!
this channel is like a gold mine!
Simply amazing. I followed you video and now I have my motor working exactly as I needed it. I just had to modify your code just a bit. Thank you very much.
Glad it helped.
how to edit code for 5 stepper motors?
Does it hot easily?
I believe you should use pololus current limit formula which is
current limit = VREF/ 8 * RCS
in this case:
current limit = 0.6/ 8 * 0.1
for the fullstep mode
current limit = 0.6/ 8 * 0.1 * 70/100 = 0.525 A
im still new to this, but it seems more accurate in this and in my case.
this video still helped, thanks!
hi, does current limit mean that the provided current(to the a4988 motor driver) should at least be 0.5A, or does it mean the current should be higher than 0.5A?
Your direct and complete explanation along with great video quality is the best I’ve seen on Arduino so far. Thanks for posting.
This is the best explanation for the A4988 on UA-cam. Thanks.
Thanks!
00:00 Video Intro
00:18 A4988 Introduction
00:40 Microstep Resolutions - "The driver provides 5 stepper resolutions: Full Step, Half Step, ..."
00:49 A4988 General Specifications
01:15 Pinout Of The Driver
04:41 Complete Circuit Schematic
07:15 The Example Code
09:01 Demonstration Of Code & Parts In Practice
09:15 One More Example
09:25 Thanks For Watching & Outro
Thank you for taking the time to do that!
@@fxsrider Glad to be of help. As I found these timestamps useful in other videos, I decided to do it so that others and myself can benefit from this. Hope it helped
@@threefour1598 It helps everyone that dives into the comment section.
Great tutorial ! Straight to the point without a lot of distracting information. Thank you. I'm looking forward to setting up my system.
Thank you. This is a very good video. I just build the circuit and it works. Only had to increase the delay from 500 to 1000 microseconds. Otherwise the Nema 17 won´t move.
A really helpful and informative video. I was struggling with running my stepper motor and I found this. You saved my lot of time.
Glad it helped.
I followed this tutorial with all required hardware. I had issues with buzzing and losing consistent position. I used a NEMA17 stepper from an old 3D printer. I solved my issue by connecting sleep/reset pins, adjusting steps to 400 and 800 (0.09deg IPO 1.8deg), and slowly adjusted timing within loops (ended with 660ms). Hope this helps!
Look, I come from Uruguay, I've been searching for a video (in spanish) to understand those fucking drivers and I couldn't find any video to get its function... When I searched for it in english I found this video, I could understand it very quickly. Thank you very much! I wouldn't be able to keep my project without you
I'm glad you found this video helpful!
As usual, your tutorials are unbelievable. Your rock.
Thank you!
This video is still helpful, even after 5 years. Thanks!
Glad to hear it!
great video! i like a detailed explanation of each step, its perfect for a beginner like me. hopefully, in the next one hour my motor will start rotating!
The way of your Explanation was too good.i can understand entire thing,thanku dejan.
its very useful to me..
I`m back again using your advice. This time for a telescope EQ drive. Thanks again.
During this lockdown I'm trying to make a focusing rail for macro photography, fortunately I have all the elements that you used. I still have some doubts about the code, but I will give it a try and then will make some twiking to make it to work in my project. Thank you very much!
I used a 180 degree servo motor to control my telescope focus. No wobble even with a 5 x barlow. I used hot glue to stick it all together lol.
I had identical parts and it took days of research to figure out why mine wasn't working.
My motor would beep and whine and struggle to move, but in the end I solved this by adding one wire.
All I had to do was apply 5V to the linked RESET and SLEEP pins.
This can be done by running one wire from the same breadboard row as the A4988 VDD pin and running it to the RESET row.
Hope this helps someone!
bro you're a lifesaver ! can't thank you enough for this
@@woodstock5056 Pleased I could help! There really was nowhere else on the internet explaining this.
Is there a way I could get the motor to cycle a number of times at certain time of day every day?
what a great video! Thanks for the careful explanation. The voltage limiting bit was super helpful.
just a brilliant video for beginners!
Excellent presentation. Flows well, I wasn't bored! Thanks for posting.
Very good description & demonstration! It is very use full & helpful for many projects ! Thank you so much Sir for your beautiful presentation .
Advice: by-polar not be-polar. Thank you for your excellent video.
bipolar actually
Mega geiles Tutorial. Funktioniert wunderbar ya salamander.
Thanks for sharing your work, you really helped me in this one, excellent step by step
I made all the connections you showed but my engine was vibrating or doing crazy moves. I solved the problem by reversing the two middle wires of the motors in the a4988 inputs.
current limit = vref * 2.5
depends on the controller. on the last ones i got from ebay, it seem to be about 1.75 x vref.
What may be obvious but wasn’t to me… Arduino needs to have 5v power not just power from usb connection. I spent two hours finding this out the hard way and wondering why stepper motor wasn’t going what it should and just making a single step 😢. Hopefully it’ll help others or maybe it’s just my stupidity 😂
A very good explanation. Keep up the good work, Dejan!
i tried this with a low-profile 400-step 36mm printer motor (36H12HM-0304A), and found that you can drive it from a 6 ~ 6.5 volt supply (ex., four AA batteries). although the driver says the minimum supply voltage is 8v, it still worked fine, down to pulses of approximately 700 us (ie, delays of 350 microseconds, using the example in this video). below 600 us (300 us delay), the motor started to skip.
I also tried driving it from 4.7v (three AA batteries), but it did not work. there was still come current reaching the motor (i could feel the coils buzzing), but the voltage on the coil wires was very low (less than 2.5 volts), and not enough to turn the rotor. even a 3.3v micro motor would not run.
thats good to know. i found this out as well but i had been nervous because my batteries would eventually go below the lovely 4v (got two, so 8v) and i had been concerned.
thank you from information it's helpful
exelente tutorial despues de mucho consegui entender muchos detalles que no sabia gracias exito y salud
Really nice tutorial ! Thanks for sharing :)
Thank you for tis amazing and verry clear video with lots of great information!!
I second that. Vref is explained piss poorly by almost everyone
Best tutorial thank you very much sir
Excelent explanation and everything, thanks Dejan, I used it a lot!
Great video. I did a few setups like that and it works nicely. But here is a question I cant solve: Using an ESP8266, how can I control the motor as an IOT device?
Thanks! Yes, you should be able to control the motor in that way, though I currently don't have such a tutorial.
@@HowToMechatronics Maybe an idea for a future tutorial....
Thank you sir, for the excellent website. Great teaching and knowledge sharing
Works great! Thank you for this very helpful video!
Thanks Dejan - very clear - I have different hardware so I will work though your example first......but i guess it might be easier to get some A4988's
Cool. I have a stepper motor with three coils do you have a recommendation to what driver to use?
Very complete thank does your motor heats up?
Really REALLY good video - can’t thank you enough. You have my 👍 and subscription. Thank you.
Thanks! I'm glad you found it useful.
Excellent guide. Do you know of any stepper driver library that can control motors easily?
What is the minimum delay i can input? Can it be instant? like 200 miliseconds instead of 1000 miliseconds?
Thank you 4 this excellent explanation
Hi,
thanks for this great tutorial. Is there any solution to use only 1 power plug? Now you use one for powering the motor and one for the arduino.
Thanks,
Juris
sir please include
which Arduino,potentiometer,stepper motor can be use ?
Hey man...great video. Thanks for sharing. Quick question. What size battery would I need in order to power this setup? I want to build something like this, but I won't have a power outlet where I will be using it so I wanted to use batteries.
I uses 1.5a 12 v regulated.its enough
Perfect - Thank you sir !
Thank you so much for this tutorial!
Great!! Can we connect 6 or 6 step motors Nema 17 for example?
I need to generate 32 individual steps in one rotation of the stepper. Would the A4988 be the best choice for doing this? I like the fact it only deals with two perimeters - rotation and speed. Your video is probably the most clearly explained on this specific topic. Thanks.
Well this stepper motor needs 200 steps to make a 360 degrees cycle in full step mode. 200/32 is 6.25, so would need to progress 6.25 steps in order to make 360 degrees cycle in 32 steps. However you cannot use such values for driving the stepper, only full numbers. Still there is way, and that's if you would use a different stepping resolution. For example if you use 1/8th stepping resolution, you would need 200*8 = 1600 steps for 360 degrees cycle. So now, 1600/32 is 50 steps. In this case you can achieve you 32 steps for making 360 degrees with progressing 50 1/8th steps each step.
very good video, thank you
Perfect video! What camera aru you use?
absolutely nice video
wow perfect tutorial...
thank you alot for this nice guide!!
Thanks..It helps me a lot
Thanks a lot for this tutorial. It helped a lot. I have a question. If I try to run the program as is on an at tiny the motor behaves different than it does, when connected to the Arduino. It has less torque and runs not as smooth. Suggestions ?
Pouvez-vous télécharger une vidéo montrant l'accélération et la décélération avec un moteur pas à pas, en utilisant la direction et les pulse
💝👍Excellent Tutorial
Nice tutorial.
Question, the stepper I am using rotates smoothly in one direction and vibrates the other direction but I have the code to have the same delay and steps, so why does it vibrate in one direction and not the other?
Cheers.
Great vid!
Thanks for the great tutorials. I recommend subscription.
This is a blocking code. This won't work with other motors or sensors.
Hi, thanks for this tutorial, is a 100 microfarad 25v capacitor ok for the circuit power?
Thanks a lot its very useful :)
i wanna ask, can we control the step of motor at 2 degree each step with this method??
Awesome video Dejan, thank you sooo much. Is there a way to control speed (angular velocity) with software only (no potentiometer)?
Just change the delay time between digital writes.
Do you think there'd be many issues if we didn't put in the capacitor?
Thank a lot for a good guide but it's so complicated for me
Hello, can I run a servo ac motor with the same program that starts the stepper motor(dir pulse)?
Hello, have u ever burn ur A4988 and how many have you burn if u did? Important for me, need your answer.
What would be a recommended stepper motor for a GAF 3000s Super 8 projector so i can use it to do frame by frame capture.
Can i control it with BTS7960? Which cable is the negative or positive?
Excellent. Thank you!
Hi, very nice informative vid. Just wanted to ask if you have experience jitter when turning on the arduino the first time on stepper? Mine jitters when turning on the arduino the first time. What could be wrong on what I am doing, I followed your circuit diagram.
Problem solved by adjusting vref to .5v, but still seeing a little, one step movement before full movement, maybe a little mechanical load will eliminate it completely.
you might need to increase the delay (microseconds), some motors will skip if you send step commands too fast.
Can u suggest max torque (540 above ) stepper motor with full ,half and micro stepping control unit
Great job
The schematic at 5'00" is supposed to be the complete schematic, but the next picture shows two more wires. I assume this is the bridge between RESET and SLEEP?
Do u connect the motor power and stepper while measuring the voltage?
This is a great tutorial and I followed it when I setup mine. Problem is that my motor only turns clockwise and I don't understand why... I got arduino Uno, A4988 driver and Nema 17 motor with 1.8 deg /step Rated current per winding is 1.4A. If I flip the orientation of the 4 motorwires going to a4988 , the motor turn counterclockwise, but when I run the code it only rotates to one direction and the direction it rotates depends on how I have connected the wires to the a4988.
+Dejan Nedelkovski It should, dir and step are connected to unos 12 and 13 pin and they are defined the same in the code aswell. I'll do some tinkering tonight to see if I get it going.
+Dejan Nedelkovski Got it sorted out. The reason why it was only rotating to one direction was a faulty or loose jumper wire between arduino's pin 12 (dir) and the dir pin of the a4988. After I replaced the wire it started working as it should.
Thank you very much, it's very work!
Hi if this setup can drive bigger stepper motor? I want to mount motor to lathe carriage...
What do you use to draw out wiring diagrams
Quick question, you send 200 pulses to achieve a full revolution at full step. So that means i would have to sent 400 at half step, 800 pulses at 1/4 step and so on?
the 200 you are talking about is the number of steps it takes for your stepper to make one full revolution... Micro-Steppers do exactly as you are describing but most people fail to understand why! The best way to explain it is to IMAGINE drawing a circle using only 4 points.. Draw a straight line between all four points and you get a square. Keep scaling that up in your mind until you get to 16k points... Basically what you are doing is creating a higher resolution.. Most desktop machines will never need anything more than what is called a half step.
When you start getting to the Larger machines like a 4foot by 8foot then you will need more, MAYBE.. If you are cutting squares all day then you do not need any.
Creators who make their own PCB might get some advantage from microstepping but to be honest bit run-out on small cuts is the biggest hit to quality so a good set of precision collets and chucks are their best investment!
To get a good mental picture of run-out put a really long bit in your drill and spin it and real high speeds. look at the tip of the bit when it is spinning and you will see it does not spin as much as it goes in a circle. Getting that bit to sit in exact Zero so it spins dead straight is called run-out.
Everyone who has ever drilled a hole has experienced run-out. When you put the bit to the surface and turn it on and the bit just walks away from where you are drilling! That is why center punching is used to to create a depression and keep the bit from "WALKING" When you get that in a CNC machine it creates CHATTER and that sends vibrations to your entire machine. Not to mention the final results of the cut under magnification looks more like someone chewed it rather than it being a polished finish. No amount of microstepping can fix this!
thank you, I just fried 4 drivers.
very happy about it
Hai sir Can we change the direction of steeper rotation (ie Clockwise n CounterClockwise)using A4988 driver.
How you connect potentiometer ?
diagram or arduino pin numbers please? thanks for sharing
Could I skip wiring the 12v power supply to the board if I just want to use a stander 12v adapter that plugs into the the barrel jack on the arduino?
Thanks a lot its very useful.
ALL YOUR TUTORIALS ARE GREAT.......but the current limiting equation makea a confusion. according to the datasheet it is, To calculate the current, A = VREF / (8 * RS). where the rs( sense resistor ) is different for many manufactures . the china board is equipped with 0.1 ohm resistors so the equation will be A = VREF / 0.8. pls comment on this finding ....
pls add this detail to your tutorial. it may be helpful for others....anyway your efforts are great...
Nice tutorial, just wondering, does the stepper need two PWM pins or can it operate off of two digital input/output pins?
+Dejan Nedelkovski thx
I have another question though. If I was to do microstepping, say 1/2 microstep, so I only need to connect MS1 to +5v but leave MS2 and MS3 un connected or should I connect them to ground as well? I don't want to make a mistake in connecting microstepping pins coz it may fry my board. Thanks.
A4988 Vref. 0,6V and Rs 0,1 Ohm = 0,75A; 0,75A @ 71% = 0,5325A
For A4988: I_TripMax= Vref/(8*Rs)
Dejan, operating power is not the same as logic power. So, LOGIC power is from 3 to 5.5 volts. Operating power depends from motor used in application.
+Ritvars Cipkins With a PWM motor drive you ignore a stepper motor's voltage rating, and just set your driver to your motor's current rating. Then you run as high voltage as you can into your drive. How high you can input voltage is limited by the motor driver, not the motor. The motor drive will handle current limiting for the stepper motor then.
Paul Frederick When i mention A4988 logic power and operating power, i mean two power inputs. Chip itself is powered from one, which is 3.3 to 5V and his output stage can be powered from different power source to be compliant with motor specification. Video author gives the perfect schematic in his site. Drawed perfectly correct. Just misspelled in voice track.
Ritvars Cipkins
I must have missed that. Because it looked like he got it right to me. Although I am not sure about his decision to leave some inputs floating, but it did appear to work for them.
+Dejan Nedelkovski can the capaciyor be 100uf 50v
If I control more than 1 will I need a capacitor fir each driver?