I am trying to figure out how to control a linear guide rail with arduino and a stepper motor. The basic functions I would like are
Set a Maximum and minimum stepper value (max and min of the rail)
Rotate to a given amount of steps relative to min controlled by a button
Set a start point (zero) at the current position of the stepper relative to min and controlled by a button. Also setting zero on a LED screen
Rotate up controlled by a button but limit at max and min. For a given amount of steps relative to zero, certain lights pop up on a LED screen indicating distance traveled
Rotate down controlled by a button but limit at max and min. For a given amount of steps relative to zero, certain lights pop up on a LED screen indicating distance traveled
Rotate a given number of steps controlled by a button while the number of steps relative to zero is displayed on a LED screen as distance traveled
A button that enters memory mode that activates another button to be pressed that will learn the amount of steps relative to min. All subsequent presses of this button will go to the same amount of steps relative to min until the button is relearned.
Rotate up until a circuit is connected then stop
Potentiometer controls stepper speed
Cycle through memory positions at the press of a button
Is this possible with arduino? Or how would I be able to control a stepper motor like this? Or is this too complicated for help on a forum for a newbie? it would be awesome if arduino had these functions already created but if not is their another programming language that does offer this capability?
Yes, but there are a few other considerations - most around the powe-off state losing awareness.
A good starter project to bring a fewv fundamental concepts together l
You asked what was possible and this is not possible because the Arduino has no clue where zero happens to be. Nothing can be relative, it can only be real.
The standard procedure for any stepper motor operation is to initially have the program physically determine ZERO. It does this using some type of indicator, usually a switch. The procedure is the test for the switch to be open and if not, move ONE STEP closer to the switch and repeat the test, looping here until the switch is NOT CLOSED. Then move the stepper back the other way one single step and this is the true zero for your project.
Even if there were such functions, they would still have to be tailored to each individual project. Then there would be NO flexibility to do things as the next person would need them done.
Do your project one device at a time and learn all you can about how to make it do things for you and tell you about it's current settings.
Do you have the necessary components for your project? Have you looked at some of the projects others have done that use the components you have?
one of the functions was to determine zero, this function was in reference to that one. I tried to make it clear but do understand its a lot to read
just trying to figure out what to read and wether going down this road is worth it. If an arduino can do these things which library has these functions? I can only find pretty basic functions for a stepper motor
This is for one device, is there a project similar to this one? Kind of the point of the question.
My question is concerning the viability of the project using an arduino, if you say the functions do not exist, then that would kill the project on an arduino and move to the second question... what coding language can?
If the functions do exist, what library are they in? Or even better their names?
If you cant answer then theres no need to try to put people down. Every forum has people like that and its annoying. Forums are a place for help not for peoples superiority complexes
I can go up, down, move a certain amount of steps and control speed
Haven't figured out the LED portion. With setting zero and translating steps into numbers with fractions.
Don't know how to set a max or min value
Don't know how to rotate to a value relative to min
Don't know how to set a memory of a step relative to min or how to cycle through it.
Don't know rotate up till a circuit is connected but I could always relay this out instead of coding it
Any body know these functions or the library they are in?
Looked at both of those and fount simple functions unless I'm missing something. I just listed what I don't know
I did the basics just with a stepper motor, C++ is something I haven't looked into at all and didn't know was possible. I used the arduino ide and thats about it
I'm currently looking into it, do you off hand know of a good guide to either implement it in arduino, understand the language structure, or know the functions that correspond to the ones I don't know or know the library?
I don't know of any library that has those functions. I guess one could be written quite easily. It would be great to have something like GRBL in a library.
Generally people write their own code to do these things, it's quite easy.