I have a stepper motor with driver tb6600, I want to stop with a limit switch and after stopping, it goes to their home location. Please help me out and tell me their code. Please...
Welcome to the forum
This forum works best when members use the forum for help and advice on project that they are having trouble with. This advice is provided free of charge. If you are prepared to pay for someone to write the code for you then there is a special forum section to ask for help
So, what have you tried so far ?
Which Arduino do you have ?
Which stepper motor do you have ?
How is the project, particularly the stepper, powered ?
Read this How to get the best out of this forum
Thank you for posting your code
Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'
Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination
What exactly do you mean by "it's not working" ?
Sorry, also my "comments":
It does not make sense to ask like: "I want to do this - please tell me!".
You can ask the forum to get opinions about a potential solution, to get help on a particular coding issue. But to let the forum code and solve your problem...? (even without a clear specification what to do, not a simplified software design diagram...)
Based on these two (ONLY) real essential sentences you have provided, here my thoughts:
-
develop a driver which steps your motor
-
develop a driver which can sense when "end stop" is reached
-
develop a main program where you start moving the motor, wait for the end stop, verify it stops at the end
-
extend the code by: when end stop is reached - go to home position.
BUT HOW DO YOU KNOW what home is?
Do you need another "home position" switch? Or do you assume N numbers of steps backwards brings it to home?
Do you see the "issue"? A software design is needed before asking questions if somebody else can solve your so "unclear" specification?
And have you already tried to implement the building blocks, e.g. the motor driver, to step your motor, to read the end stop etc.?
Do you know how the end stop switch would work (mechanical, optical, hall sensor)?
We can help you so that YOU can accomplish a "homework" - but people here (like me) are full time busy and would not be able to do YOUR "homework" (even not without any compensation).
Take a look at the MobaTools stepper library. There are some examples that might help you on your way.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.