Go Down

Topic: Robot - Controlling two steppers from two controllers in parallel concurrently (Read 883 times) previous topic - next topic

RossA

Hello,

I'm designing a robot that uses two 4-phase stepper motors and two stepper drivers (ULN2003).

The motors are mounted opposite each other and so to go forwards one motor has to go clockwise and the other anti-clockwise. I'm going to control the forward/backward motion with one stepper controller and wire them up either in series or parallel (ideally parallel) with the phase of one of the motors reversed. This works fine.

The problem however is that I want to turn the robot by running both motors either clockwise or anti-clockwise. This means wiring up the second stepper controller to both motors in parallel or series (ideally parallel again) but with the phases wired up the same.

Both these functions work fine on their own (ie. either stepper controller connected to both motors). However I can't seem to work out how to run both drivers and both motors since there would be a short circuit between both ends of the phases.

Any ideas?

HazardsMind

You should find a motor shield that can control 2 stepper motors with one arduino.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

kf2qd

What you are wanting to do makes no sense whatsoever. you have 2 motors and 2 controllers. Send control signals to each at the same time and they will move at the same time.

What type of controllers? step/direction or some other type?

RossA

kf2qd,

How do I send control signals to 2 motor controllers at exactly the same time?

wildbill

Generally, for applications like this, the Arduino is fast enough that you can send control instructions one after the other and they will appear to be concurrent. If that's not getting the job done, try direct port manipulation instead.

HazardsMind

I agree with wildbill, if you use port manipulation, you can send bytes to all 8 ports simultaneously.

These would be your sequences.
Both forward => {B10001000,B01000100,B00100010,B00010001}
Backward => {B00010001,B00100010,B01000100,B10001000}
360 left =>{B10000001,B01000010,B00100100,B00011000}
360 right=>{B00011000,B00100100,B01000010,B10000001}
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

Go Up