Moving 4 stepper motors with data from 3 sensors.

Hello!
How would i approach reading the data from 3 sensors, and then moving simultaneously 3 stepper motors all to different positions(same speed, same step).
Basically two sensors give me values x and y. Out of x,y i calculate value z.
Now, if value z is 10 let's say, then move stepper1 by 2 degrees and stepper2 by 0.5 degrees.

That being said, the steppers only need to move in total 90 degrees maximum, but by at least 0.5 degrees steps.

Also, if the power goes out, how do i help the steppers know their position?

Ayce47:
That being said, the steppers only need to move in total 90 degrees maximum, but by at least 0.5 degrees steps.

Most stepper motors have 200 steps per revolution which give individual steps of 1.8 degrees. Most stepper motor drivers include the facility for microstepping which allows the standard step to be divided by 2, 4, 18 and 16. Dividing by 4 will give a step angle of 0.45 degrees which is as close as you will get to 0.5 degrees without using reduction gearing. You should also be aware that the position accuracy of microsteps is not as good as for full steps.

I presume you are aware that stepper motors have no sense of their absolute position and if that matters you will need a limit switch to detect when the motor is at the HOME or ZERO position.

It would be a good idea to get at least one stepper motor and stepper motor driver and experiment with some simple code to learn how it can be controlled.

If you are proposing to use rotary encoders for sensing position you should be aware that it may be difficult for a 16MHz Arduino to keep up if there is a very high pulse rate from the encoders. Which is another way of saying that you need to gives us a lot more detail about the project you are trying to create.

...R

Stepper Motor Basics
Simple Stepper Code

Robin2:
I presume you are aware that stepper motors have no sense of their absolute position and if that matters you will need a limit switch to detect when the motor is at the HOME or ZERO position.

It would be a good idea to get at least one stepper motor and stepper motor driver and experiment with some simple code to learn how it can be controlled.

I will look more into the limit switch, as for experimentig with one stepper motor, I would like to dive directly into using stepper motor drivers via shift registers, but i can't dinf any documentation on that.

Also, if the z value i described above changes by say 5%, all i would have to do to move the steppers is change their position by 5% from their current position, right?

Edit:I've seen projects on servo ball valve, which also do the trick, would you recommend them over steppers?

Thank you!

Ayce47:
I will look more into the limit switch, as for experimentig with one stepper motor, I would like to dive directly into using stepper motor drivers via shift registers, but i can't dinf any documentation on that.

I have no idea what you have in mind. What might be the advantage of a shift register? Also please post a link to the datasheet for your stepper motor and tell us what stepper motor driver you propose to use.

Have you carefully studied the links I gave you? I suspect not, as you replied about 30 minutes after I posted Reply #1.

I see that I omitted to answer your question about dealing with a power failure. The steppers won't know their position and it has to be re-established by triggering the limit switch.

Also, if the z value i described above changes by say 5%, all i would have to do to move the steppers is change their position by 5% from their current position, right?

It is more practical to think in terms of the number of steps the motor should move - that is what your program will need to do.

Edit:I've seen projects on servo ball valve, which also do the trick, would you recommend them over steppers?

"Servo ball valve" suggests something for controlling the flow of water - is that what your project is about? Please post a link to the datasheet for the valve you are thinking of using.

It will be very much easier to give useful advice if you tell us exactly what you are trying to create rather than only telling us about some possible components. At the moment this has all the hallmarks of an XY problem

...R