Hello, I'm new to Arduino and stepper motors, I'm trying to familiarize myself on controlling the stepper motors for advancing projects .... I used a Nema 23 stepper motor 3A + driver st330-v3 and an Arduino uno.
.... when I linked all the materials with each other ...and I ran a test program I got only one direction run smoothly and the other direction either doesn't run at all when I put < 500 ms delay or it doesn't run smoothly on higher speeds.
this is my code for the test
// defines pins
#define stepPin 2
#define dirPin 4
void setup() {
// Sets the pins as Outputs
pinMode(stepPin, OUTPUT);
pinMode(dirPin, OUTPUT);
pinMode(7, OUTPUT); // the pin for EN
digitalWrite(7, HIGH);
delayMicroseconds(10);
}
void loop() {
digitalWrite(dirPin, HIGH); // Enables the motor to move in a particular direction
// Makes 200 pulses for making one full cycle rotation
for (int x = 0; x < 800 ; x++) {
digitalWrite(stepPin, HIGH);
delayMicroseconds(500); // by changing this time delay between the steps we can change the rotation speed
digitalWrite(stepPin, LOW);
delayMicroseconds(500);
}
delay(1000); // One second delay
digitalWrite(dirPin, LOW); //Changes the rotations direction
// Makes 200 pulses for making two full cycle rotation
for (int x = 0; x < 800 ; x++) {
digitalWrite(stepPin, HIGH);
delayMicroseconds(500);
digitalWrite(stepPin, LOW);
delayMicroseconds(500);
}
delay(1000);
}
Please identify the motor power supply, and give its voltage and current capabilities.
Your circuit diagram does not show the required common ground connection with the Arduino.
Keep in mind that breadboards are designed for low power logic circuits and cannot support motor currents. The tracks burn, leading to intermittent connections that can instantly destroy a motor driver.
Wiggling loose motor connections, or changing wiring while the power is connected, can also destroy motor drivers.
Oh i didn't know that is a thing.
I used a laptop ps, 19v 4.3 A
about the breadboard, i won't use it again, i found that its max is about 12V 2A , thanks for the advice you may saved my driver))
Update : i tested the the amperage in the circuit and it's at 4.3 A .
but when i tested the voltage of the laptop charger , it gives strange values .
I will explain how i did to power up the driver and the motor ... i removed the charger connector , i found 3 wires, i guessed that one of them is the ground ...
I tested them breifly at first to know +V -V and gnd .... i didn't care lot about the values (they didn't pass the 20v which is ok)
i tested them now i found that the voltage between the ground and the +V isn't nul ... it's about 8V. And the voltage between the +V and -V is the strage thing , it start from 16v then go down slowly to 9v and then come back to 16v and continue like that .
Is the ac adapter faulty? Is it the cause for the problem of the motor ?
Thanks for the help in advance
update: I bought an unregulated power supply 24V 6A , the problem continues to appear ...
after rewiring all the circuit and attaching the wires between the motor and the driver, this time I made sure that the wires isn't loose at all ... it worked and the speed of the two directions is the same.
if someone has the same problem in the future check the wiring before anything else and make sure that the connection isn't loose.