Coordinated stepper motor control (arduino)

Coordinated stepper motor control (arduino)

iforce2d

6 лет назад

352,473 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@DIVANEBABA
@DIVANEBABA - 06.11.2023 19:23

Best tutorial - I watched it several times and have downloaded the code and even the video.
Now it is my turn. Thanks to you, I think my task will soon be completed 😁😁
Without your code, it would certainly be a disaster 😂😂😂

Ответить
@phutan3230
@phutan3230 - 12.10.2023 12:58

I would be really appreciate if you can explain the formula for si.estStepsToSpeed, especially at m = ((a*a - 1) / (-2 * a)), I've been searching around but couldn't find anything useful, your channel help me alots, thanks

Ответить
@mohamedhammemi3246
@mohamedhammemi3246 - 02.10.2023 12:18

Thanks much for the obviously great amount of time you put in! i just want to know if the shield contain already the driver or not and where can i find this shield

Ответить
@waynedow9227
@waynedow9227 - 26.09.2023 18:57

Nice job in explaining your sketches and theory. I was wondering if you could, in your linear transition, instead of calculating the slowest movement to end all processes could you calculate for the fastest? For example when using two motors starting at “M1 pos 0 and M2 pos 0” to “M1 pos 20 and M2 pos 40” you are calculating so M1 finishes the same time as M2, where M2 would take longer to arrive at desired pos. In some cases I would think it would be more expedient to calculate for the faster motor, making both arrive at desired pos sooner.

Ответить
@sananabizada4928
@sananabizada4928 - 07.09.2023 14:56

Hi. I want to use Arduino due. Can you write this codes using ATSAM3X8E timers and interrupts ? Or can you give any source for converting timers and interrupts for due?

Ответить
@edimstory
@edimstory - 20.08.2023 08:49

hello, your code is very good. but how can we control more than one motor at the same time using joystick. can you help?

Ответить
@benbenameur8429
@benbenameur8429 - 04.07.2023 15:53

Hi
it's real time operating systeme RTOS THX

Ответить
@democracyslave2084
@democracyslave2084 - 11.06.2023 05:01

I need to switch the direction of the stepper motor at 1800rpm like forward and reverse required moving angle 90 degree only , required 7 cycle per second it's possible?

Ответить
@stephanc7192
@stephanc7192 - 25.05.2023 15:17

Good video

Ответить
@sananabizada4928
@sananabizada4928 - 22.05.2023 19:14

Thank you for this video, it is really interesting, helpful and great video. However I use DM320T stepper driver. So I need delayMicroseconds between Step High and Step Low . I solved it in stepper_interrupt by adding delay microseconds in ---STEP_HIGH
delayMicroseconds(d);
STEP_LOW . However in Stepper6_linearSpeedInterruptMultipleMotors I tried to add delayMicroseconds(OCR1A); between Step high and Step Low in step function of all 6 motors. But it skips steps. I tried in 3 then 2 motors only in case of insufficiency of current(Even though power supply can supply enough current for 6 motors). Still skips steps. Can I get help?

Ответить
@includemylog
@includemylog - 29.03.2023 12:39

IS there any difference which stepper type am I using
mine is nemo17 But it is not working as expected

Ответить
@arduinomaquinas
@arduinomaquinas - 27.02.2023 01:57

Like5.2👏👏👏

Ответить
@arduinomaquinas
@arduinomaquinas - 27.02.2023 01:55

👏👏👏

Ответить
@alizghoster
@alizghoster - 18.02.2023 12:43

most insane video ever! I tried to understand it when I was 18, 4 years ago, but I failed. So I came back today, and I have to say that you did an excellent job.

Ответить
@stefanoalfredolaspina8471
@stefanoalfredolaspina8471 - 25.01.2023 12:29

well done. really dense of concepts and best explained. Thank you. Instead of using already prepped libraries, gone under the hood and see how it's actually working. recommended for everyone who wants to understand more

Ответить
@exnihilo415
@exnihilo415 - 15.01.2023 09:50

Just in case this helps out any other rookie programmers here, I finally figured out why the final sketch wasn't working when more than 8 motors were added in the same manner in the code. It's because the left and right bitshift operators (<< and >>) would break the byte type for remainingSteppersFlag and nextStepperFlag. Just find "byte" and replace with "word" in the sketch and all is well. All you experts can tell me how obvious this was but it took me all day. I was sure something in the interrupts or timing needed to be adjusted given the extra overhead, but no. Live and learn!

Ответить
@insanet3
@insanet3 - 03.12.2022 14:33

its year 2022 and found this video very useful. im impressed the cheap A4988 could move that smooth with that algorithm, i though only the more expensive drivers with proper sinewave output like TMC2009 and similar could move like that.

Ответить
@TheSterlingwright1
@TheSterlingwright1 - 25.11.2022 23:42

Is it possible to get the wiring information as to what group of wires go where on the Adriano and the stepper driver?

Ответить
@rahulsuthar4650
@rahulsuthar4650 - 18.10.2022 07:39

how many synchronize axis possible to control by arduino megha board?

Ответить
@profBricks
@profBricks - 05.10.2022 17:21

I enjoyed the video a lot, quite followed it until the end, and I'm going to merge your last idea into the existing multistepper library

Ответить
@riehdjcnxnxdien3439
@riehdjcnxnxdien3439 - 26.06.2022 05:36

why accel = 0.01 ?

Ответить
@johnlocke9609
@johnlocke9609 - 25.05.2022 05:00

I'm using your simpleAccel for a 3 motor polisher, with 3 motors of 2HP, they move with the help of linear rails and servos back and forward to polish metal, is really really cool your video.

Ответить
@johnlocke9609
@johnlocke9609 - 08.05.2022 07:56

You are a very interesting person, and love the way you explain, when you said: Did I just hear somebody yawing? -- :D I was like: I SWEAR, it wasn't me, I'm very pleased with your lecture, who's yawing, God damn!?? haha!

Ответить
@amilcarmalave4115
@amilcarmalave4115 - 03.05.2022 21:58

this video deserves millions of likes

Ответить
@easycaed
@easycaed - 17.04.2022 14:37

Can we use both Nema 17 (DRV8825) and Nema 23 (TB6650) on same Arduino simultaneously?

Ответить
@sameerjeetsinghchhabra
@sameerjeetsinghchhabra - 14.04.2022 08:33

Hey, your work is awesome❣️, I really appreciate and I wanted to ask for help.
Actually I'm working on a project where I have to run 4 stepper motors together but at different speeds, this speed will be calculated by a math equation, the equation will result in speed (in steps/second) for each stepper motor & this speed will be changing with time also.
How should I accomplish this target, please help.

And you are able to do so much programing, and it really works, so does this require a great practice in C++ language or you had to work seperately for arduino programming.

Ответить
@gotmilkforme23
@gotmilkforme23 - 06.04.2022 07:59

Hello, love this project. I have a question there a way to modify this code to only run 2 stepper motor and have it return to a home position?

Ответить
@peta1001
@peta1001 - 01.04.2022 16:50

I did not really go beyond the point in video, where the author gives in sophisticated calculation and theory. The author had a very efficient approach in the first place. All I did was to base my acceleration function on incrementing the speed instead of incrementing delay. So here is my modified version of the author's good idea (it works, but it should be improved in a few ways...depending on the main application code):

void linAccel(int steps, int uSteps) { //we assume the uSteps (microsteps) are defined before calling linAccel(steps, uSteps)
int lowSpeed = 100; //rpm
int highSpeed = 400; //rpm
float speedIncr = (float) 2 / uSteps;
int rampUpStop = (highSpeed - lowSpeed) / speedIncr; //steps before highest speed achieved
int rampDownStart = steps - rampUpStop; //steps after highest speed starts to deccelerate
float d = 60000000 / lowSpeed / 200; //[us] lowSpeed Delay based on 1.8 degree steps ==> 200 steps per rotation
float curSpeed = lowSpeed;
// Serial.println("rampUpStop: " + String(rampUpStop));
// Serial.println("rampDownStart: " + String(rampDownStart));
// Serial.println("curSpeed: " + String(curSpeed));
// Serial.println("speedIncr: " + String(speedIncr));
// Serial.println("delay: " + String(d));
for (int i = 0; i < steps; i++) {
digitalWrite(stepX, HIGH);
digitalWrite(stepX, LOW);
delayMicroseconds(d);
// delay(10);
if (i < rampUpStop) {
curSpeed += speedIncr;
d = 60000000 / curSpeed / 200; //d += speedIncr;
// if (curSpeed > highSpeed) curSpeed = highSpeed;
}
else if (i > rampDownStart) {
curSpeed -= speedIncr;
d = 60000000 / curSpeed / 200; // -= speedIncr;
// if (curSpeed < lowSpeed) curSpeed = lowSpeed;
}
// Serial.print(String(i) + "," + String(curSpeed) + "," + String(d));
// Serial.println();
}
}

Ответить
@user-cj8iv5tj2i
@user-cj8iv5tj2i - 14.03.2022 22:23

thx!

Ответить
@hanfbrot
@hanfbrot - 01.02.2022 19:21

WHAT ARE YOU DOING STEP PIN, STEP PIN STOOOP

Ответить
@maheshshinde29
@maheshshinde29 - 23.01.2022 10:01

Can any one tell me which board and drivers( all electric components ) are used to run 6 stepper motors at a time

Ответить
@traceyflanders
@traceyflanders - 11.01.2022 21:37

Great explanation, appreciate it.

Ответить
@gusarw
@gusarw - 31.12.2021 03:47

Hello! Great video, and great work! Thank you!
I am trying to adopt your last sketch (Coordinated motion) to run under Arduino Uno with only 4 motors (CNC motor shield 3.00). Everything works great, except the Y-motor doesn't change its direction. I see with a meter that the DIR signal on pin 6 for Y-motor does go to HIGH after prepareMovement() - when it is time to change direction, but then it immediately goes to LOW when runAndWait() is executed. Do you know what within runAndWait() could possibly be resetting direction signal just for this one motor? (I am using Step/Dir pins: 5/2 for X, 6/3 for Y, 7/4 for Z, 13/12 for A). Thank you.

Ответить
@juliusaitken
@juliusaitken - 30.12.2021 22:59

Hello! With the knowledge and skills you demonstrate in this video I think you might be the genius to help me realise a project that has me stumped (total arduino noob). Please drop me a line if you have time to offer any help. Thank you.

Ответить
@huygia9652
@huygia9652 - 29.12.2021 11:35

Hi Sir. Can I do this with esp8266? it really hard to find documents about the timer of this microcontroller

Ответить
@TalibTahaYiwuchina
@TalibTahaYiwuchina - 23.12.2021 22:59

Nice video mate
Where can I get the program for step motor to run and can you send me the link please
I do appreciate your help mate

Ответить
@ozgedurgut
@ozgedurgut - 03.12.2021 11:30

how did c0 become 1600? in 22nd min

Ответить
@belray7939
@belray7939 - 28.11.2021 05:03

do you have a wiring on the multiple stepper motor?

Ответить
@brymx
@brymx - 20.11.2021 04:10

Is there a link to the program?

Ответить
@birthdaybuddies10
@birthdaybuddies10 - 16.11.2021 17:29

Hey what kind of stepper motors are these? I am looking for something more powerful than the one i got in my beginner kit because I need to create a circular motion to "stir" something these seem like they have a much greater rpm

Ответить
@carlosraulzavalaromero766
@carlosraulzavalaromero766 - 16.11.2021 00:03

I would like to know, what is the name of the shield that you are using on top of arduino mega??

Ответить
@Teach_EM
@Teach_EM - 02.11.2021 10:18

Thank you for this tutorial. It has been very helpful

Ответить
@letrung9199
@letrung9199 - 30.10.2021 05:21

Thank you so much. I’m looking for this video in quite a long time. This is super valuable for me!

Ответить
@neonvirus4731
@neonvirus4731 - 27.10.2021 18:42

witch driver are useing you bro

Ответить
@PauloRicardo-pp4ml
@PauloRicardo-pp4ml - 29.09.2021 01:42

Hi SR. I need to control 4 motor to clock wise position and 4 anti clock wise at the same speed 5 RPM. Is it possible with the cnc shield and a arduino nano?

Ответить
@mwright7251
@mwright7251 - 05.09.2021 01:14

Is there a parts list anywhere you could provide?

Ответить