Arduino - Homing Stepper Motors using the AccelStepper Library - Tutorial

preview_player
Показать описание
Follow us on Facebook and Twitter to get notified when we post new stuff!

Home stepper motor at startup using the AccelStepper Library and control movement using the Serial Monitor.
Рекомендации по теме
Комментарии
Автор

This tutorials has helped me understand a lot about the accel. library,
I was stuck how to do a proper homing with a limit switch and you saved my life !!!

AmmarLegato
Автор

Thank you for making the video and sharing the knowledge, the comments in your code are very nice!

brasilma
Автор

Im working on an arduino based analog gauge cluster and this exactly the code architecture i was looking for, great video and explaination, keep up the good work!

thatbluebugguy
Автор

Hi @BrainybitsCanada! Thanks for the tutorial! As a very, very new Arduino tinkerer trying to learn code, etc, this has helped me a ton! I have started a project where I am using 2 mini micro stepper motors (X axis & Y axis) which are to be moved by a user into possibly 10 different pre-determined positions each. So when a user enters number 7 into serial monitor, Stepper X moves to step position 300, stepper Y moves to step position 120. Then if the user enters number 4, stepper X moves to step position 1250 and stepper Y moves to step position 800, and so on. Eventually I would like to use a keypad for the user's input. I have been able to modify your awesome code to get headed in the right direction but so far when I input step locations individually for stepper X and stepper Y, it works well for the most part. The issue I have - when serial monitor displays Move Stepper X To What Position, after input, sometimes stepper Y moves rather than stepper X, and vice versa. Would you be able to help me with this? I could send you the modified code and my fritzing diagram if I knew where to send it. Any help you can provide would be greatly appreciated!

codycanuck
Автор

I don't know if I'm doing something wrong, but this isn't working for me. I copied the code from your website and built the hardware just like you did. When I power up the arduino, the motor starts homing until it triggers the switch. It then asks to enter a travel distance. So far, everything is ok. When I enter a valid distance, the motor doesn't move. Instead, I get the message "Moving stepper into position: (whatever I entered)" and almost immediately after that ""Moving stepper into position: 0" followed by "COMPLETED!" It then again asks for a travel distance. I get the idea that the code is somehow not reading any serial and interpreting that as a zero?

ltdeditions
Автор

Many thanks for this; it's very useful.
I only have one problem: after the switch has been touched, the motor doesn't return correctly to 0 position: too slow, it takes about 15 seconds for about 20 steps (microsteps) until the switch is released.

panoramas
Автор

Thanks for your Fantastic work! Had hepl me a lot. I tried your Code and the homing works perfect! But when i want to enter e new travel distance the motor doesn't move. But it tells me that that:
Moving stepper into position: 500
Moving stepper into position: 0
COMPLETED!

But it doesn't move. Do you have an idea what could be wrong? (Using A4988 driver & a NEMA 17)

Freakazoooid
Автор

Hello Brainy - Bits, I'm new to all of this but I wish to learn so I'll check out your tutorials. P.s, I'm trying to create a miniature Fallout vault and need parts for the gear door in order to move it inward/ outward and from side to side, do you have motors, wiring, etc. for this?

Zeronial
Автор

Omg this is fantastic work Ivan .. thank you so much .. one question ‘ how can I home more than one stepper ?

menukagamage
Автор

Great video using AccelStepper library.
Thank you.

juliomaruyama
Автор

Your Video is damn helpful for me to understand the accelStepper lib... But i still have open questions... Can you may explain how to do all this stuff with the AccelStepper lib by using the enable signal for the Stepper driver? I have some projects who not need to keep the StepperDriver enabled.. Just like that: enable the Driver, move & disable the driver until the next move... 
Maybe You can help with that?

Kind Regards..

dastiieto
Автор

I really like your tutorial, if I wanted to add a pair of buttons to turn the motor from left to right + the speed regulator, where would I have to connect it?
Could you provide an outline? I need it to control a milling machine

canario
Автор

this tutorial is very helpful, i tested on my fosus stacking rail, but despite i tried many times to check all the connection, only the part of homing is working, and i am not able to use the move to function. i mean i put a number in the serial monitor, he accept it and say that he reach that position but the motor is not moving at all! another question is this sistem work good when your max job is to rotate less than 360 degree. but if you are using a lead screw and you are many turns far for the home position, it is very slow to reach it. i tryed to change parameters but it remain always unacceptably slow despite i set up high max speed and acceleration in your schetch and i set the steps to full step. it takes 3-4 minutes to reach the home. what is my fault??

robertorusso
Автор

Well done
Thank you for your efforts
I'm one of your followers from Iraq

امينالخزعلي-خس
Автор

Great Video and very nice explanation. It looks like that's what I have been looking for. I have a Proaim Spark Slider, and the idea is to install a motor with a controller that can do an endless loop, and it looks to me that the arduino that you are using are capable of doing that. the problem is that I am very mechanical but have no electronic knowledge, .

orlandodasilva
Автор

Hi Ivan great video. I have two questions. How would I use three or four button to enter preset values? Also would I be able to make the stepper motor go past the position say clockwise then always come back several steps to the proper position to take out any slack in the gears? any ideas Thanks for any suggestions.

robbhalverson
Автор

Thanks for a great tutorial... much appreciated.

fooballers
Автор

I have the situation same as Jeff Para. it HOMES great, and then flunks; no further movement. I keep checking the code but cannot find any mistakes. Any help from Brainy Bits would be greatly appreciated.

rtalbot
Автор

Hi it’s perfect. Any chance can you do it with nextion screen. Thank you

erbulkahraman
Автор

Nice video man!
Greetings from Brazil!

sirtrustdw