Unable to control a stepper motor with multiple processors in parallel

Papabravo

Joined Feb 24, 2006
21,159
In order to move from one place to another you have to know where you are. If you know where you are you can compute the number of steps required and the direction, clockwise or counter clockwise. This implies that all three boards have to know where the motor is at all times. How do you propose that multiple boards acquire and maintain this information. As I have already pointed out, with a single board controlling the motor you do not have this problem.
 
Last edited:

Thread Starter

sheel

Joined Aug 22, 2016
12
Same in all three is good.



You could go away with just one pin sensing the results of the 3 boards (its own one included). As I see it, you need to solve two things:

a) In software, some code skipping the polling to avoid recognizing its own signal as coming from any of the other two. After all, the board who found a matching scene, knows it, thus why to poll?

b) In hardware, how to bring safely to a common point the signal from 3 boards. Think of this: they are always 0 or 1 so if two output pins are low and the third goes high, somebody is going to suffer. The solution is a wired OR. Google and see where the diodes would go. By any chance, do you have any pin with an open collector output? That would fit here.

When you have the above solved, not before, consider the logic to control the motor.

Question: do the boards know at any time the position of the stepper? How?

If I recall it right, Papabravo suggested one of the boards in charge of the motor. Not sure but could help depending of the answer to the above question.
I am even trying the single processor control by transmitting the data to the leader board. But I would still like to know about the issues in this method.
I am not sure whether I understood your second suggestion of OR connection right. Is it the one that I have attached (the diode circuit) in reply to Bloco
 

Thread Starter

sheel

Joined Aug 22, 2016
12
In order to move from one place to another you have to know where you are. If you know where you are you can compute the number of steps required and the direction, clockwise or counter clockwise. This implies that all three boards have to know where the motor is at all times. How do you propose that multiple boards acquire and maintain this information. As I have already pointed out, with a single board controlling the motor you do not have this problem.
I am not concerned with the initial and final positions of the motor. The only point of concern is the distance between the two points. Thus, it should not matter what my current position is as it is a stepper motor and not a servo.
 

Papabravo

Joined Feb 24, 2006
21,159
I am not concerned with the initial and final positions of the motor. The only point of concern is the distance between the two points. Thus, it should not matter what my current position is as it is a stepper motor and not a servo.
Well good luck with your project then.
 

atferrari

Joined Jan 6, 2004
4,764
I am not concerned with the initial and final positions of the motor. The only point of concern is the distance between the two points. Thus, it should not matter what my current position is as it is a stepper motor and not a servo.
I suspect that the above could be true if the stepper is modified to turn with no limits so any board could take charge without actually knowing the current position. But I could be wrong.

/Edit to add.

You should solve the logic, as I said, prior even thinking of driving the motor.

Do not ask me about the wired OR. Take the pain to Google.

Edit/
 
Last edited:
Top