Pages: [1]   Go Down
Author Topic: Robot - Controlling two steppers from two controllers in parallel concurrently  (Read 538 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: December 13, 2012, 05:46:34 am by RossA » Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2947
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You should find a motor shield that can control 2 stepper motors with one arduino.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1023
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

kf2qd,

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

New Jersey
Offline Offline
Faraday Member
**
Karma: 51
Posts: 3438
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Queens, New York
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2947
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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}
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Pages: [1]   Go Up
Jump to: