Homing with the AccelStepper library and a limit switch
Вставка
- Опубліковано 7 лис 2019
- In this video I show you an alternative way for homing using the AccelStepper() library. I use a TB6600 to drive a NEMA17 stepper motor and I use a microswitch/limit switch for the homing task.
To have a full understanding of the AccelStepper() library and the TB6600 driver, please check my video on that topic: • Arduino with TB6600 us...
If you liked my video, please subscribe to help my channel growing!
Source code: curiousscienti...
If you want to buy the gadgets shown in the video and support me at the same time, you can use the following affiliate links:
Arduino UNO: www.banggood.c...
Variable Power Supply (9-24V 3A 72W): www.banggood.c...
TB6600 Stepper Driver: www.banggood.c...
NEMA17 Stepper Motor: www.banggood.c...
Limit switch on PCB (1PCS): www.banggood.c...
Limit switch on PCB (5PCS): www.banggood.c...
Limit switch on PCB (10 PCS): www.banggood.c...
Limit switch (10PCS) Requires soldering and cables: www.banggood.c...
Aluminium profile 2020 T-slot: www.banggood.c...
Right angle joint for 2020 profile: www.banggood.c...
Various M5 screws for 2020 profile: www.banggood.c...
Sliding nut for 2020 profile: www.banggood.c...
T8 lead screw with anti-backlash nut: www.banggood.c...
T8 nut housing block: www.banggood.c...
KPxxx Pillow Bearing: www.banggood.c...
DJI OSMO Action Camera: www.banggood.c...
DJI OSMO Action Case: www.banggood.c...
Silicone Soldering mat: www.banggood.c...
Great video as always.
This code works with my a4988 driver and belt driven gantry (with tweaks for steps/mm) and thank you. I was pulling my hair out looking for exactly this functionality. I deleted the malarkey regarding LEDs. Anyone looking to control a linear actuator can take this code and run with it even if they're an arduino noob like me.
love your videos, I've learned a lot with em 🙌
Kudos to you. Really informative.
Great video.
Hi, Thank you for your 2 videos on this setup, it's pretty much what I have for my project. My question is how are the limit switch wired (can't make out from the vid), I have the same limit switches but can't make them work. I assume you are using just the green and red wires. Also, I want to use an external timer to start and stop the motor, opposed to using keyboard commands, to reverse the direction twice a day to open and close a small hatch (door), any suggestions?
Hello. Thank you very much for the tutorials!!! I learned a lot from your videos and sketches you make!
Thanks for sharing the video and your code. Would you be able to make a suggestion on how to adjust the code so that it works from buttons instead of the serial monitor? I just want to truncate it to a momentary button for homing, and one each for fast positive/negative movement and slow positive/negative movement while button pressed.
Hi I have tried your examples they are very good . But your last two examples where you have Changed to P, N etc i get a message on the monitor but the motor does not move . Have you made some other changes which effect the Accel Libaray ? Can you please help many thanks
you are correct, delay() does not work in an ISR function. I believe you can use delayMillis() or whatever function is closest to that spelling
terimakasih banyak atas tutorialnya
The wobbling, which is a huge issue, is actually because of the quality of the Chinese parts. I too have similar issue. I am not saying parts make in China are all the same, but these are the affordable ones from Amazon or Aliexpress.
Thank you...much appreciated.
Give me help , my question is that ln holding ( means stop ) condition stepper motor draw current which is not good for my product , my product has holding time 1 hrs and running time 3 second . So how to solve my problem please reply me
I have a problem where if the button is released slowly it counts as another button press which stops the movement. so it stops fine. the limit switch is held down. then you move away from the switch, it releases and stops again.
HI, Just a question, is it possible to use the acceleration and deceleration in example. seems the setspeed() is not using it.
Thanks so much for great work
i'm having issues in my code tho. I have a 2-axis system, 2 motors on y-axis and 1 motor on X-axis. I have 6 total limit switches attached for each end. I want my program to do the following: when the motors hit the limit switches, i want them to stop and then move in opposite direction a small amount to "De-press" the switch and then set that to my 0 position or Maxtravel Position. Any suggestions?
Curious scientist, Great work! I am very new with Arduino, I have used AccelStepper bounce example but I don't know to make the motor always start in one set place(Home or Cero if you will, at the very beginning) then go from point A to point B and vice versa until it is shot down. Please Help. can you give me some codes.
good video. i have been using your code thanks.. have not gotten over the limit switch bouncing issue yet. can you share where you bought the microswitch with its board? thanks