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...

КОМЕНТАРІ • 137

  • @ecofuelbox
    @ecofuelbox 3 роки тому +3

    Great video as always.

  • @tedwakefield1085
    @tedwakefield1085 4 роки тому +1

    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.

  • @SrkLarblack
    @SrkLarblack 3 роки тому

    love your videos, I've learned a lot with em 🙌

  • @dsbupadrasta2385
    @dsbupadrasta2385 2 роки тому +1

    Kudos to you. Really informative.

  • @petergrant430
    @petergrant430 2 роки тому +1

    Great video.

  • @rawcow2496
    @rawcow2496 4 роки тому +2

    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?

  • @Psihopatim
    @Psihopatim 4 роки тому +1

    Hello. Thank you very much for the tutorials!!! I learned a lot from your videos and sketches you make!

  • @jasenolan7357
    @jasenolan7357 Рік тому

    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.

  • @apdevoocomany1179
    @apdevoocomany1179 4 роки тому

    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

  • @zachshellouff7205
    @zachshellouff7205 3 роки тому

    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

  • @adriaja5561
    @adriaja5561 3 роки тому +1

    terimakasih banyak atas tutorialnya

  • @kavorka8855
    @kavorka8855 3 роки тому

    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.

  • @fooballers7883
    @fooballers7883 Рік тому

    Thank you...much appreciated.

  • @kamleshpanchal8661
    @kamleshpanchal8661 2 роки тому +1

    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

  • @leefish1981
    @leefish1981 21 день тому

    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.

  • @rjayabharath

    HI, Just a question, is it possible to use the acceleration and deceleration in example. seems the setspeed() is not using it.

  • @ahm7373
    @ahm7373 4 роки тому +1

    Thanks so much for great work

  • @zachshellouff7205
    @zachshellouff7205 3 роки тому

    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?

  • @danilobelen1586
    @danilobelen1586 3 роки тому

    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.

  • @freytube1

    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