I bought a Dual Stepper Motor shield (ITEAD). It is plugged into an Arduino Mega 2560.
I have hooked it up, checked and re-checked the wiring but I just get buzzing from both X and Y, when I use the test program. I set the pin call outs for X and then change them for Y. I get about the same thing for both of the two different stepper motors. I know that the extension wiring and motors work fine with other driver boards.
I tried to tune the pot on the Y axis but that didn't help. There doesn't seem to be any difference when I plug in a 2 amp, 30 volt power supply either. It does not run any better or buzz louder. I just get the same rhythmic buzzing sound as it cycles through the three step modes, only the pitch changes from low to medium to high.
I tried reversing the 2A and 2B on each channel. I get the same buzz when I do but it is not as strong. I also verified that the power select switch is on 5V.
The X motor is a Stepper Motor: Bipolar, 200 Steps/Rev, 28×32mm, 3.8V, 0.67 A/Phase
Pololu - Stepper Motor: Bipolar, 200 Steps/Rev, 28×32mm, 3.8V, 0.67 A/Phase
The Y motor is a 57byg stepper motor:
Attachment 192134
No. of phase 2
Voltage 1.5 current 2.2
resistance 5.2
Holding Torque (Kg cm) 6.4
size LO 2.09" Lf 1.61"
I just bought this dual driver shield because I wanted to consolidate and simplify the project.
In light of what I have done so far, what should I check first?
I added a picture of the wiring, minus the extensions. I have tested the continuity of the wiring with the meter and each of the two motors (with the extension wiring) run fine with either of two other stepper motor drivers.
I have added this for reference but I tried other code as well.
Code:
// ******************************************************
// Micro Robotics
// Test Procedure to test Y channel
// www.robotics.org.za
// written by : Frikkie du Toit
// For Stepper Shield ver 1.0
//
// To test Y Channel To test X Channel
// STEP_PIN 6 STEP_PIN 2
// DIR_PIN 7 DIR_PIN 3
// YMS1 8 YMS1 4
// YMS2 9 YMS2 5
// ******************************************************
#define STEP_PIN 2
#define DIR_PIN 3
#define YMS1 4
#define YMS2 5
void step_mode(byte yms1, byte yms2)
{
// Set the pins to select the step mode
digitalWrite(YMS1, yms1); // Set pin YMS1 to the parameter given
digitalWrite(YMS2, yms2); // Set pin YMS2 to the parameter given
}
void step(int steps, float speed)
{
// Take the amount of steps specified
// Negative value for opposite direction
byte dir;
float micro_sec_delay;
if (steps > 0) // If steps are positive
{
dir = HIGH; // Set direction
}
else // If steps are negative
{
dir = LOW; // Set direction
}
steps = abs(steps); // Set steps to absolute value
digitalWrite(DIR_PIN, dir); // Set the direction pin to dir
micro_sec_delay = 1 / (speed / 100) * 70; // Calculate delay between step pin toggles
for (int i = 0; i < steps; i++)
{
// Takes all the steps in the specified direction
digitalWrite(STEP_PIN, HIGH);
delayMicroseconds(micro_sec_delay);
digitalWrite(STEP_PIN, LOW);
delayMicroseconds(micro_sec_delay);
}
}
void setup()
{
// Set all the pin modes
pinMode(STEP_PIN, OUTPUT);
pinMode(DIR_PIN, OUTPUT);
pinMode(YMS1, OUTPUT);
pinMode(YMS2, OUTPUT);
}
void loop()
{
step_mode(HIGH, HIGH); // Set step mode to Eighth Step mode
step(1600, 25); // Take 1600 steps (1 revolution) with speed set to 25
delay(1000); // Delay one second
step_mode(LOW, HIGH); // Set step mode to Quarter Step mode
step(800, 25); // Take 800 steps (1 revolution) with speed set to 25
delay(1000); // Delay one second
step_mode(HIGH, LOW); // Set step mode to Half Step mode
step(400, 25); // Take 400 steps (1 revolution) with speed set to 25
delay(1000); // Delay one second
}