Raspberry Pi Stepper Motor Tutorial

  Рет қаралды 500,393

rdagger68

rdagger68

Күн бұрын

This tutorial demonstrates how to control bi-polar stepper motors on a Raspberry Pi in Python using a DRV-8825 stepper motor driver.
Notes, schematics, code, updates and other resources are available on my website: www.rototron.in...

Пікірлер: 400
@boatalarm5920
@boatalarm5920 4 жыл бұрын
OMG... This guy KNOWS HOW TO MAKE A GREAT TUTORIAL! Fast, concise and NO music!!! FIVE STARS!!!!!
@VincentFischer
@VincentFischer 3 жыл бұрын
Who doesn't like some loud energetic dubstep when you try to memorize stuff
@codingwithbarnes2619
@codingwithbarnes2619 3 жыл бұрын
Yag
@davidbotham7090
@davidbotham7090 2 ай бұрын
It seems the depth of his abilities is simply crazy. His site is down. I am really bummed! I bet there is a pot of techy gold buried there.
@thebunyip
@thebunyip 7 жыл бұрын
You do a fantastic job of presenting a complex (probably not for you) system. I am an old school mainframe programmer from the 60's-70's. I have two Raspberry Pi's and am programming the hell out of them but you put my playing to shame. Kudos and love your tutorials
@akshayd211
@akshayd211 5 жыл бұрын
I am 100% sure that this is the best video tutorial on this topic in the WORLD.
@neoc03
@neoc03 6 жыл бұрын
This is far and away the best tutorial on this! Thank you so much for being so clear and concise.
@furman87
@furman87 6 жыл бұрын
Agreed. I learned more about stepper motors and how to control them in this tutorial than anywhere else I looked. After mocking up something on a breadboard and getting it working, I transferred that onto a Raspberry Pi HAT breadboard and it works fantastically
@eilunhtau
@eilunhtau 5 жыл бұрын
May be, but I can not understand the language of this video. For me it is therefore useless.
@bobluby2962
@bobluby2962 3 жыл бұрын
Thk u
@almostcool9216
@almostcool9216 3 жыл бұрын
I also agree A+++ on raspberry code explain and wiring info
@jozefsoucik3115
@jozefsoucik3115 2 ай бұрын
comparing your explanation and knowledge compared to tons of india tech guy....it cannot be compared in any way....fulll explanation in all aspects..thanx for that
@FabricioRWitt
@FabricioRWitt 10 ай бұрын
This is an exceptionally excellent tutorial and class. Thank you so much for sharing your knowledge! I'm currently studying stepper motors for usage on precision peristaltic pumps for prototyping a dosing machine. Thank you once more, you're great!
@tomd7841
@tomd7841 3 жыл бұрын
One of the clearest tutorials I've ever seen. Great work. Thanks very much!
@pranavsreedhar1402
@pranavsreedhar1402 3 жыл бұрын
This is so informative that it should reach every stepper motor enthusiast out there....
@JimEckhardt
@JimEckhardt Жыл бұрын
Best stepper vid I've come across yet! So many useful little nuggets in there.
@sandro-nd6ir
@sandro-nd6ir 2 жыл бұрын
This is simply one of the best tutorials I have ever seen. Thank you so much :)
@graceyee9067
@graceyee9067 3 жыл бұрын
Wow, this is the most concise and informative tutorial I've ever watched, thank you for taking the time to make it!
@chop661
@chop661 5 жыл бұрын
Perfect explanation, concise, to the point and well presented. Thank you!
@aaronacj
@aaronacj 5 жыл бұрын
Why can't every tutorial video be this good?
@johnrobie9694
@johnrobie9694 4 жыл бұрын
A lot of clever little tricks sprinkled throughout this video. Thanks!
@y2ksw1
@y2ksw1 3 жыл бұрын
This is the best tutorial I have ever seen!
@blackmennewstyle
@blackmennewstyle 4 жыл бұрын
By far one of the best tutorial about the Raspberry Pi and Stepper motor i have seen
@eajinarc4425
@eajinarc4425 5 жыл бұрын
After watching this video... Me: "OK, I got it, let's try it" My Raspberry Pi: "No, you didn't"
@gizehtriana9569
@gizehtriana9569 5 жыл бұрын
same to me but maybe its the version that we use... depend on version tha for i in range( in my case) is different to python 2.7
@baresrs7367
@baresrs7367 4 жыл бұрын
For real cuz . exactly how I feel Xd
@ThomasAndersonbsf
@ThomasAndersonbsf 6 жыл бұрын
thank you for this work as it did open some aspects of the PI to me, but also covered the method of telling what your stepper driver is doing, so that you can set it ahead of time to around what you need with a lot less fidgeting to get the output for a given motor, (if you know the values it is supposed to receive) to get it set up, the first time. Again thank you.
@aaronjs99
@aaronjs99 6 жыл бұрын
Hey... Gotta say that this video was worth watching!!!
@ghost2coast296
@ghost2coast296 5 жыл бұрын
thank you! I really like how you took the time to walk through all the code and explain it to us
@parameciumcheese
@parameciumcheese 6 жыл бұрын
Fantastic video! Thanks for taking the time to make this. Answered all my questions and more.
@drm42
@drm42 6 жыл бұрын
Awesome tutorial with a great amount of details shared. Thank you!
@subodhawanasundera3957
@subodhawanasundera3957 7 жыл бұрын
Great tutorial, very clear explanations. Easy to understand & well structured. Thanks heaps!
@arbjful
@arbjful Жыл бұрын
Nanotec makes some really great stepper motors and drivers, we use these a lot for our industrial applications
@QuarrySteam
@QuarrySteam 3 жыл бұрын
Brilliant tutorial, to the point and no waffling. Really useful thanks very much
@balajitj
@balajitj 7 жыл бұрын
Excellent tutorial, explanations are just crisp and clear.
@kylevasulka8568
@kylevasulka8568 Жыл бұрын
Wow. Such a clear explanation 👏 excellent job!
@zosxavius
@zosxavius 7 жыл бұрын
This was exactly what I needed to see. Thank you so very much!
@dannyarroway4187
@dannyarroway4187 2 жыл бұрын
Excellent tutorial! Clear and concise! bravo!
@tomrouillard3908
@tomrouillard3908 6 жыл бұрын
Excellent job - hugely informative and useful. Thank you.
@magna59
@magna59 7 жыл бұрын
Great work & nice to see something without having to listen through background music .
@boredbritgamercouk
@boredbritgamercouk 4 жыл бұрын
Hi, firstly this code (including the micro-steps) all worked great for me. I was just wondering if you could further customise the code to allow manual control of the motor (ie typing a positive or negative value into terminal so motor moves clockwise or anti-clockwise a number of steps) and then controlling multiple motors at once? I'd love to run up to 4 motors and I think this is such a solid base setup for code but looking for some help! Thanks :)
@mo_adventures
@mo_adventures 5 жыл бұрын
You are a hero! Thanks a lot for explaining this to us this clearly! I needed someone to explain this to me like I'm braindead!
@barirwin8559
@barirwin8559 5 жыл бұрын
me too! I'm really good at blinking a lot
@newideas3249
@newideas3249 Жыл бұрын
EXcellent video, just what I needed 😄
@maiodab670
@maiodab670 9 ай бұрын
Hi I starting my small project with stepper motor and I found your solution for controlling it , I am very impressive of you work , The last part using hardware_PWM is great and doing exactly what I need , but one thing :) how to change the direction instead slowing down. I mean the motor will do one ramp on CW direction then another ramp but on CCW direction .
@rdagger
@rdagger 9 ай бұрын
I'm not sure I understand your question. It has been a long time since I used this library, but you should be able to set the direction using pi.write(DIR, 0) or pi.write(DIR, 1).
@maiodab670
@maiodab670 8 ай бұрын
@@rdagger Thanks a lot, I have solved my problem .
@anactualmechanic2058
@anactualmechanic2058 6 жыл бұрын
This is an awesome video. I have been struggling to use a RPI with a serial port HAT to control bipolar stepper motors using old Shopbot control boards and the Shopbot DOS program through an emulator. It works, but the DOS emulation is not powerful enough to run the motors at full speed. It looks like I need to try a DRV-8825 and learn some Python. Thank you!
@georgkettele6911
@georgkettele6911 3 жыл бұрын
Best tutorial ever!
@allaryyan6608
@allaryyan6608 6 жыл бұрын
thank you for this tutorial! your effort is deeply appreciated.
@stephmo371
@stephmo371 4 жыл бұрын
This has been so helpful. Thank you for this
@KingGrio
@KingGrio Жыл бұрын
This is an awesome tutorial
@DenfordBerriman
@DenfordBerriman 7 жыл бұрын
Great tip using the LED to figure out the pairs. I had headers wired the wrong way till I tried this. Thanks.
@johnerickson6765
@johnerickson6765 5 жыл бұрын
Excellent tutorial. Would also like to see one with C++ control.
@TheHoinoel
@TheHoinoel 3 жыл бұрын
Wow this is really dense. Great tutorial, thank you :)
@miebmieb6543
@miebmieb6543 4 жыл бұрын
This video will help me so much, Thank you!
@PhG1961
@PhG1961 2 жыл бұрын
Great video !!
@jashan9845
@jashan9845 Жыл бұрын
This was super helpful!! Thank you
@vladimirpotapov7050
@vladimirpotapov7050 2 жыл бұрын
Nice tutorial, thank you a lot !
@djtyros
@djtyros 2 жыл бұрын
HELP PLEASE. Yes I love the presentation as everyone else has mentioned. However, I'm at a loss here... I've hooked everything us as seen, and my motor wont move at all. There's no resistance either, just as though the power is off completely... So It's a sl42sth34-1334a stepper motor I 'borrowed' from my Flyingbear 3d printer. The stepper driver is a generic pololu ripped from a ramps board (i tried two, same issue) When measuring the v.ref pot, I'm getting a range from 0.00v to 0.20v (on both drivers) The driver is green, with a small square chip. The text on the chip is: 4988ET A1640 990L Tested motor with the LED coil test, both coils are generating power, and lighting the led. The cap i'm using is 24v 100uF The External PSU is 12v If you have any suggestions, please let me know. Thank you :)
@heyisforhumans
@heyisforhumans 2 жыл бұрын
Excellent video!
@rongrongwu
@rongrongwu 4 жыл бұрын
Very good video, very helpful! Thanks you.
@kentharris7427
@kentharris7427 2 жыл бұрын
I am wanting to use a Raspberry Pi Pico to run a NEMA 34 stepper motor. IMO using a raspberry pi to run a stepper motor is like driving an 18 wheeler to the store to buy milk and eggs. Granted the Pico was released after this video was made. The problem with the Arduino is the frequency is not high enough to run the NEMA 34 at maximum speed. I am going to experiment with the DRV-8825 Controller since it takes up less Real Estate then a standard Stepper Controller.
@AeroLens_by_SP
@AeroLens_by_SP 3 жыл бұрын
Great Video, I need to move my stepper motor as a function of sine wave lets say for time in incrementing from 0to 100s y=amplitude*sin(2*pi*frequency*t) so displacement of stepper motor should as per change in y could you help me in that
@AliSaldin
@AliSaldin 7 жыл бұрын
every time you upload amazing video thank you for your affairs
@Daniel.DAgostino
@Daniel.DAgostino 3 жыл бұрын
Wonderful video. Engaging and informative.
@davidcross3075
@davidcross3075 6 жыл бұрын
First off thank you for such a clear and detailed explanation of this process. I have been successful in performing your steps. My application has a need for switch controlled movement with a pair of momentary buttons. ex. button 1 press moves ccw until released and a press of button 2 moves cw until released. Any guidance for this capability would be appreciated. I don't want to have to change over to an Arduino solution if i don't have to. My application is for a Z-axis bed for a laser engraver that will be controlled separately. Again thanks for your videos..
@rdagger
@rdagger 6 жыл бұрын
My example with the toggle switch would work. You just need to change the main loop to something like: dc = 128 if pi.read(SWITCH1) == 0: pi.write(DIR, 0) elif pi.read(SWITCH2) == 0: pi.write(DIR, 1) else: dc = 0 pi.set_PWM_dutycycle(STEP, dc) sleep(.1)
@davidcross3075
@davidcross3075 6 жыл бұрын
@@rdagger thanks for the head start... i'll be giving this a try soon.
@Migueldeservantes
@Migueldeservantes 3 жыл бұрын
can I setup a set of If then commands to follow up with an small toy machine?? like an small excavator???
@pgtips4240
@pgtips4240 2 жыл бұрын
Hi, this video is a bit over my head. Can you recommend a video that explains all the things you are doing and why? Thanks.
@ColeLashley
@ColeLashley 3 жыл бұрын
Hello, I am a software engineer looking to make a cnc machine and I'm a bit confused on some of the electrical engineering aspects of this. Could you explain how I could use a capacitor to ensure that my power supply is safe if I am soldering directly and not using a breadboard? Thanks!
@rdagger
@rdagger 3 жыл бұрын
The capacitor is to protect the DRV8825 board from LC voltage spikes. You should put a minimum 47 µF electrolytic capacitor rated for at least 50 V across motor power (VMOT) and ground somewhere close to the DRV8825 board. Please see the Pololu Robotics DRB8825 product page for more details: www.pololu.com/product/2133
@Q24H
@Q24H 7 жыл бұрын
Great tutorial, was just planning on playing with some stepper motors! For the current limiting calibration, if I'm using a 12V 0.4A Nema, I should set the Vref to 0.2v?
@rdagger
@rdagger 7 жыл бұрын
Yes, the maximum Vref would be 0.2V because Current Limit = Vref × 2 Actually, if you are only running in *full step* mode the maximum Vref would be about 0.28V because there is an additional 71% limit. It's always a good idea to monitor the motor and driver temperature. I like to use a 5 second rule. If I can touch the motor and driver for at least 5 seconds without burning my fingers then the current is probably OK. Please note that the current can also be limited by the coil resistance. If your coil resistance is greater than 30 ohms then your current won't exceed 0.4A at 12V because of Ohm's law.
@Chevo210
@Chevo210 6 жыл бұрын
Thank you this fixed my problem!
@aboudezoa
@aboudezoa 2 жыл бұрын
Very well explained
@gregpetryk1696
@gregpetryk1696 2 жыл бұрын
I followed this to the letter looking for answers why my stepper motor does not turn smoothly, but is very erratic and jumps in both directions. I've been hoping to find out why I'm having this problem.
@venkateshyadla9503
@venkateshyadla9503 5 жыл бұрын
THAnk you boss... thanks for deep explanantion..
@Stat1onary
@Stat1onary 3 жыл бұрын
IT WORKS thank you.
@larbigueraiche6721
@larbigueraiche6721 5 жыл бұрын
This is the best tutorial I have seen. However, could you tell me please how the code becomes if we want adjust the speed of a stepper motor by selecting a specific frequency (example :1010 Hz) using hardware_PWM(18, frequency, duty cycle) and then rotate the motor with a specific angle at that speed ?
@rdagger
@rdagger 5 жыл бұрын
To accurately control both frequency and steps, I think you would need to use the PiGPIO _generate_ramp()_ method. I’m not sure if it supports the hardware PWM which would afford more precise frequency control. It might automatically switch to hardware if you use GPIO 18. You would have to hook up a scope to determine if you are getting the correct frequency. You could also ask Joan the creator of PiGPIO. She is very good about responding to questions and she might have additional recommendations.
@ownage3523
@ownage3523 Жыл бұрын
Hey great video! Would you have any advice on using the TB67S128FTG instead of the DRV8825? I love the wiring diagram you show with the RPi, motor driver, and stepper motor. However, I can't find a similar one for the TB67S128FTG.
@rdagger
@rdagger Жыл бұрын
Haven't used it but Pololu has some resources: www.pololu.com/product/2998/resources
@cscnacht9292
@cscnacht9292 5 жыл бұрын
Sir, please make a video that control stepper motor using LCD touch screens.
@philiplubduck6107
@philiplubduck6107 5 жыл бұрын
did you ever find a way to use the touch screen for stepper motors? I want to do the same but with up and down arrow to lower and raise rpm rate and maybe another set of arrows with time setting then a simple play/stop button to start and stop the program
@yeplol1367
@yeplol1367 5 жыл бұрын
Awesome tutorial! Thanks much! One question, if I want to run 2 stepper can I use 14,15,18 for both stepper to set the resolution? Or does each motor need extra 3 pins for resolution?
@rdagger
@rdagger 5 жыл бұрын
You can share the pins.
@yeplol1367
@yeplol1367 5 жыл бұрын
rdagger68 thanks!! And another question :-) .. can you recommend any node.js module to run steppers instead of using python?
@rdagger
@rdagger 5 жыл бұрын
Sorry I don't have any node.js recommendations other than just searching npmjs.com for stepper motor.
@NothingMuchhere2see
@NothingMuchhere2see 3 жыл бұрын
can you make a video on how to control a motor using serial communication with modbus rtu rs485 usb converter and python
@robsciuk729
@robsciuk729 7 жыл бұрын
Timely, succinct and complete ... *THANKS*
@sridharg6618
@sridharg6618 5 жыл бұрын
Great video with clear explanation. I have one question. If we are going to create 3d printer setup can we use any six GPIO pins for step and direction(2 pins for each driver)..
@rdagger
@rdagger 5 жыл бұрын
Yes.
@sridharg6618
@sridharg6618 5 жыл бұрын
@@rdagger Hello sir, I Will try with the code which you shared for single motor. If i need to run 3 motors with 3d printer setup, do we have any reference code available. Appreciate your great help on this:)
@rdagger
@rdagger 5 жыл бұрын
I haven't tried it, but I think you should take a look at PyCNC. Otherwise it would be difficult to achieve the precise timing required for 3d printing. github.com/Nikolay-Kha/PyCNC
@sridharg6618
@sridharg6618 5 жыл бұрын
@@rdagger thank you. Will take a look
@RixtronixLAB
@RixtronixLAB 2 жыл бұрын
Nice info, thanks :)
@ronpearson1912
@ronpearson1912 6 ай бұрын
I wonder if its possible to integrate PID control in this as well
@angelplack76
@angelplack76 3 жыл бұрын
Hi guy thanks for your explain is vero complete congratulations
@michaelmckiernan4061
@michaelmckiernan4061 6 жыл бұрын
Very Good.You have solved many questions. The BIG AH HUrH. THANK YOU.
@sphereintelligence
@sphereintelligence 4 жыл бұрын
First example which actually made my motor run using Python on the Raspberry, a lot of other tuts did not make my motor run. I used Livecode too, which also works, but the graphic interface interferes with the motor strangely. With the GPIO i got errors like: please use GPIO.setmode(GPIO.BCM) which i did, so i don't understand this error, also it also run only CW and not CCW, could see the motor react on it and stalled.
@taylorhoward3624
@taylorhoward3624 6 жыл бұрын
I found this video to be incredibly helpful. I'm currently working on a project that requires me to drive 5 NEMA​ 17 motors. I was wondering if I would be able to use 5 of these drivers for this task. If so, would I just need to wire each driver to its own pin and then connect them all to the same 3.3 v and ground pins on the pi? Thanks for the help.
@rdagger
@rdagger 6 жыл бұрын
Yes in theory you should be able to control multiple stepper drivers depending on your timing requirements. At least 1 pin would be required per driver (2 if direction required.)
@rs9130
@rs9130 7 жыл бұрын
Nice work. How any stepper motors can be controlled using this driver?
@rdagger
@rdagger 7 жыл бұрын
Generally speaking, one stepper motor per stepper driver. In theory you could run 2 motors but I haven't tried it. You would probably need to double the current if running in parallel or double the voltage if running in series. I've heard there are issues using the DRV8255 in parallel so series would probably be the best bet.
@dadasstobadass4536
@dadasstobadass4536 7 жыл бұрын
We are looking to control two steppers with a raspberry pi and have them open and close doors on a building. Is it possible to use a single dial of some sort to control the opening and closing of the doors. As a matter of fact, the doors only have to open and close about 15-20 degrees . So, we want to be able to turn the dial and move both steppers (one to the right and one to the left) at the same time. Can this be done with raspberry pi? Can this be done by incorporating an arduino with the pi? We really need to use the pi
@rdagger
@rdagger 7 жыл бұрын
Yes, it could be done. The Raspberry Pi doesn’t have an analog input so you would need an analog to digital converter to connect the pot. I have a video on connecting ADC’s: kzbin.info/www/bejne/rXvKqqawhLiih7c Potentiometers often have jitter so you would need code to smooth out the rotation and prevent unwanted movement. Depending on the size and weight of the door, you might need an industrial stepper motor, driver and power supply. I don't think the 2A driver used in the video would work. There are more pitfalls as you scale up and you could be dealing with potentially dangerous voltages. I would use end-stops to limit the range of motion. I would also add sensors to detect if something or someone is blocking the path of the door. You could also go with a closed-loop system to accurately track the position of the door. Please check your local building and fire codes to ensure you comply with all safety ordinances.
@grahamb007
@grahamb007 2 жыл бұрын
One other question... What is supplying power to the 3.3V rail on the breadboard. Is it coming from the raspberry pi? The breadboard I purchased came with a generic power supply circuit board with pins aligned to supply 3.3V and ground to the outer rails of the breadboard. Could that be used with this type of setup or is it obsolete since we're using the raspberry pi? Thanks again
@rdagger
@rdagger 2 жыл бұрын
The 3.3 V power is coming from the Pi. At 5:54 I connect a 3.3 V pin from the Pi to supply logic power to breadboard's power rails. You can use your breadboard's power supply assuming it is 3.3 V. However, you still need to connect a ground from the Pi to the breadboard's ground rails to establish a common ground because voltage is relative. I would not use the breadboard's power supply because it adds another potential failure point, and it doesn't provide any benefit other than saving 1 wire.
@KangJangkrik
@KangJangkrik 2 жыл бұрын
Is it a good idea to connect STEP pin to hardware PWM pin on RPi? Thanks!
@rajwaghmare8547
@rajwaghmare8547 5 жыл бұрын
Hello, what would be the ideal voltage of drv 8825 driver if usinf a nema stepper with 1.5A current at 12V. I want to make a button presser to press button of 1.6N in a full step mode but its skipping a step while pressing a button thus not presing it all the time
@1Sweet__
@1Sweet__ 6 жыл бұрын
Hello, very good tutorial, hepled me a lot! I just have one problem, I wanted to build a robot and use the stepper motor for the movement but your tutorial show the stepper driver still connected to a power supply, which is impossible for a robot. How can I bypass this problem?
@rdagger
@rdagger 6 жыл бұрын
A 12V battery should work similarly to a 12V bench power supply assuming the battery can provide the necessary current. Please note that stepper motors draw power continuously regardless of motion which may not be optimal for a battery powered application.
@marktumwesigye5262
@marktumwesigye5262 7 жыл бұрын
Great tutorial. I followed it to the dot. Unfortunately, I have failed to get my motor running. I am using a NEMA 17 motor with a rated current of 1.2A per phase, after some troubleshooting, I measured the GPIO output signal and it was 1.6V for the STEP pin, the DIR pin gives 3.3V. Im not sure if this could be the problem. If you have any pointers please help.
@rdagger
@rdagger 7 жыл бұрын
The voltages on the DIR and STEP pins are not the issue. The DIR pin would only change the direction of the motor. The STEP pin is being pulsed so a meter is not going to give you any meaningful numbers (you would need a scope to look at the waveform). As long as the pulses are not too fast, you should get movement. Did you set the current limit on the driver to 1.2A (a value of .6V on the Vref)? Is your motor power supply adequate? It's always possible that you got a bad DRV8825. Is the motor or the driver getting hot?
@traceyparker7772
@traceyparker7772 6 жыл бұрын
Very informative video. I hope you keep it up.
@KAFA2020
@KAFA2020 7 жыл бұрын
Dear respected sir, I'm very happy for your awesome video. I trying to control my CNC machine by Raspberry pi where I need to use 3 stepper motor. Please could you help me?
@rdagger
@rdagger 7 жыл бұрын
I don't have any experience using a Pi for CNC. I use Mach3 with a dedicated controller board for my CNC machine which uses Geckos. There are numerous examples of using the Pi for CNC such as: blog.protoneer.co.nz/raspberry-pi-cnc-board-hat github.com/Nikolay-Kha/PyCNC hackerspacepardubice.cz/cnc/
@KAFA2020
@KAFA2020 7 жыл бұрын
Thanks a lot for your information. You know arduino is much slower than Raspberry pi. Therefore, If I use Raspberry pi instead of arduino, Will it be much faster?
@rdagger
@rdagger 7 жыл бұрын
I don’t know. Perhaps it’s an ambiguous comparison because many solutions off-load the processing to external hardware. For example, the Protoneer Pi CNC hat uses an embedded Arduino for its micro-controller. Again, I haven’t done any CNC with the Pi.
@Bidouillerfr
@Bidouillerfr 4 жыл бұрын
Hello, I am trying to do the same with a raspberry pi zero, a nema 17 stepper motor and an L9110S controller but without success, the motor vibrates and spins randomly. can you help me ?
@Duriel1000
@Duriel1000 4 жыл бұрын
Is there anyway to code to get the stepper motor back to a "starting" point? Meaning, like a watch with arms, after runnning many different directions, is there a way to get the stepper motor back to 12 O'clock?
@rdagger
@rdagger 4 жыл бұрын
You could keep count of the number of steps or if you concerned about lost steps you could use a closed-loop stepper motor. Another simple option is to use a limit switch such as on a 3D printer.
@grantmonast9294
@grantmonast9294 7 жыл бұрын
I am building a cnc and want to use raspberry pi 3 to control it, I have the gecko type drivers. Any diagrams for how that would hook up? Great info 👍🏼
@rdagger
@rdagger 7 жыл бұрын
The hook up should be similar to the video but it is very important to read all the application notes on Gecko's website because the Geckos are easy to damage (depending on the model). You'll want to use 3.3V for the direction and step pulse because the Pi's GPIO pins will not tolerate 5V. I don't have any experience using a Pi for CNC. I use Mach3 with a dedicated controller board for my CNC machine which also uses Geckos.
@salukikev
@salukikev 6 жыл бұрын
I loved the clarity and completeness of this tutorial, but I still have a question as I'm new to this and using an unlikely motor combination (bipolar micro steppers- 20steps/5v/up to 25ma). Do I need to use a separate power source for these controllers (or is there an alternative?). My RP Zero-W and everything else involved runs at 5v and I'm tight on space. Thanks for any advice!
@rdagger
@rdagger 6 жыл бұрын
The DRV-8825 requires a minimum supply voltage of 8.2V.
@salukikev
@salukikev 6 жыл бұрын
@@rdagger Ok. So Yes, I need a separate power source or a different controller. Thanks! One final (dumb?) question. In this tutorial you cite the latest version of Raspberry- Jessie. The latest version is now Stretch- so I plan to use that now, and assuming everything else is the same.
@rdagger
@rdagger 6 жыл бұрын
You can ask Pololu tech support if they have a driver that's a better fit. At the time of the video Jessie was the latest. Stretch is fine. I should have said latest version of Raspbian.
@barath2474
@barath2474 5 жыл бұрын
this tutorial was of great help,thanks i have question.if i need to control three nema 17 steppers using raspberry pi and python,how should i do it? will i able to add three no of DRV8825 controllers to raspberry pi and do it?
@rdagger
@rdagger 5 жыл бұрын
You can drive multiple steppers, but it depends on the type of precision and timing you need. For example, CNC or 3D printing would probably require dedicated controller hardware in addition to the Pi. On the other hand, if you're making a robot or a cat feeder then the Pi alone should be OK. Each stepper will need it's own DRV-8825 and separate GPIO pins. There are many existing libraries available depending on your project goal.
@barath2474
@barath2474 5 жыл бұрын
@@rdagger my purpose is to build a 3d printer.may I know what controller stuff I will need to make it other than raspberry pi and drv 8825?
@barath2474
@barath2474 5 жыл бұрын
Since drv8825 has microstepping I will be able to do it right?will the precision will be enough?
@rdagger
@rdagger 5 жыл бұрын
Please take a look at: github.com/Nikolay-Kha/PyCNC
@remcovanwoerkom2016
@remcovanwoerkom2016 5 жыл бұрын
very clear, thank you
@amiaynarayan516
@amiaynarayan516 5 жыл бұрын
I am using nema 17 and the torque reduced substantially compared to when I ran the stepper with 12V with arduino uno.... any help is appreciated
@gian3458
@gian3458 5 жыл бұрын
Hi! Thanks for the tutorial! I'd like to ask how I would implement multiple motor controllers to the Pi. Would I be able to use the multiple GPIO ports and establish what ports I am using in the code?
@rdagger
@rdagger 5 жыл бұрын
I’ve been asked that questions multiple times and I will probably address it in another video when I have more free time. The short answer is yes, but it depends on the type of precision and timing you need. For example CNC or 3D printing would probably require a dedicated controller. Please take a look at github.com/Nikolay-Kha/PyCNC
@trixond9211
@trixond9211 5 жыл бұрын
Hi Nice tutorial, I also want to ask if it is possible to control 4 or more stepper motors in a raspberry pi?
@rdagger
@rdagger 5 жыл бұрын
Yes, but it depends on the type of precision and timing you need. For example CNC or 3D printing would probably require a dedicated controller. If you're making an automated cat feeder, then it's no problem.
@herantd
@herantd 3 жыл бұрын
If you have A4988 it needs to be wired a bit differently
@georgejbaker
@georgejbaker 6 жыл бұрын
Amazing video, very informative
@kevinrogers8563
@kevinrogers8563 7 жыл бұрын
hi there, as I've been working through stepper motor control for some time yours is possible the best set of code, thanks. But I've come across a problem code seems not to recognized the DIR even though I've typed it in correct and down loaded the current version . any thoughts. Kevin
@rdagger
@rdagger 7 жыл бұрын
Which code are you using RPi.GPIO or Pigpio? Are you trying to set the direction from code?
@sridharg6618
@sridharg6618 5 жыл бұрын
My motor is not running with DRV8825 driver but running successfully with L298D. i double checked the connections for DRV8825. not sure what the problem is. Motor is just giving the vibration effect. What could be the problem? My motive is to develop 3d printer structure. So please advise which is the best driver for stepper motor. Thank you for your help!!!
@rdagger
@rdagger 5 жыл бұрын
I recommend you post your question to the Pololu tech support forum: forum.pololu.com/
@BLau-oi4zc
@BLau-oi4zc 4 жыл бұрын
It worked! Thank you very much!!
@alexturanski1995
@alexturanski1995 2 жыл бұрын
will this tutorial work with the new Raspberry pi 4 and current updated software?
@rdagger
@rdagger 2 жыл бұрын
It should work.
The Ultimate Guide to using Motors in Robotics (including ROS, Raspberry Pi)
25:56
Big Stepper Motors with Arduino
29:43
DroneBot Workshop
Рет қаралды 1,2 МЛН
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 3,5 МЛН
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
Raspberry Pi Pico Stepper Motors via PIO
25:17
Tinker Tech Trove
Рет қаралды 62 М.
What Makes TMC2208 Stepper Motor Drivers Silent?
9:07
Michael Klements
Рет қаралды 306 М.
Unboxing the Raspberry Pi CM5 Development Kit
11:36
Level 2 Jeff
Рет қаралды 37 М.
Using LinuxCNC on My CNC Router Using a Raspberry Pi 5
9:31
Byte 2 Bot
Рет қаралды 39 М.
Raspberry Pi: Using GPIO Inputs
18:41
ExplainingComputers
Рет қаралды 584 М.
Raspberry Pi Servo Motor Control
17:36
ExplainingComputers
Рет қаралды 394 М.
Stepper Motors and Arduino - The Ultimate Guide
29:57
How To Mechatronics
Рет қаралды 1,2 МЛН
Servo Motors, how do they work?
15:12
The Engineering Mindset
Рет қаралды 2 МЛН
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 3,5 МЛН