I have a problem, i'm use stepper motor for robot car..motor is rotate but its wheel i touch then motor is stuck and vibration with noise..like this video left side motor AMCSTI - Source Two NeverStall Stepper Motor Controller vs Standard Driver Controller - YouTube please how to solve this problem..using A4988 driver.. (my english is not good )
motor spec :
2 phase NEMA17 42mm 4-wire stepper motor.
Rated voltage: 12-24V
Power: 5W
Current: 1.7A
Rated Speed: 0-1500 RPM
Rated torque: 0.42 NM
Step angel: 1.8°
Ambient temperature: -20 ℃ -50 ℃
Insulation resistance:100MΩmin.(500V DC)
Dielectric strength: 500VAC for 1 minute
Shaft Radial Play: 0.02 Max. (450g-load)
Shaft Axial Play: 0.08 Max. (450g-load)
Max. radial force: 28N (20mm from the flange)
Max. axial force: 10N
Motor length: 40 (L) mm
Rated current: 1.68A
Resistence per phase: 1.5Ω
Inductance per phase: 2.3mH
Holding torque: 4.2 kg.cm
Number of motor leads.: 4
Detent torque: 150 g.cm
Rotor interia: 54 g.cm
code
// Define Constants
// Connections to A4988
const int dirPin = 2; // Direction
const int stepPin = 3; // Step
// Motor steps per rotation
const int STEPS_PER_REV = 200;
void setup() {
// Setup the pins as Outputs
pinMode(stepPin,OUTPUT);
pinMode(dirPin,OUTPUT);
pinMode (8, OUTPUT);//ms1
pinMode (9, OUTPUT);//ms2
pinMode (10, OUTPUT);//ms3
digitalWrite(8, HIGH);//ms1
digitalWrite(9, HIGH);//ms2
digitalWrite(10, HIGH);//ms3
}
void loop() {
// Set motor direction clockwise
digitalWrite(dirPin,HIGH);
// Spin motor one rotation slowly
for(int x = 0; x < STEPS_PER_REV; x++) {
digitalWrite(stepPin,HIGH);
delayMicroseconds(500);
digitalWrite(stepPin,LOW);
delayMicroseconds(500);
}
// Pause for one second
// delay(1000);
// Set motor direction counterclockwise
// digitalWrite(dirPin,LOW);
// Spin motor two rotations quickly
//for(int x = 0; x < (STEPS_PER_REV * 2); x++) {
///digitalWrite(stepPin,HIGH);
//delayMicroseconds(500);
//digitalWrite(stepPin,LOW);
//delayMicroseconds(500);
// }
// Pause for one second
//delay(1000);
}