Hi all! I have a tiny 8mm stepper motor (2-phase, 4-wire). Each coil draws current about 35 mA. I want to use driver A4988 with arduino nano to drive the motor. As it draws pretty little current, I want to power it only from arduino (USB). I have managed to make it work without the driver. But, I do not have much luck with the driver - the motor does not rotate at all. Can anyone help me, please? Any advice will be much appriciated.
That driver has a minimum motor supply voltage of 8V, won't work with 5V.
This should work
The A4988 is not designed to work with high impedance, low current motors. Use a dual brushed DC motor driver instead, like this one:
Thank you for your suggestion, I have ordered the drivers ![]()
That seems no problem for a 5volt Arduino pin.
What could be a problem is your code (that you did't post).
Direct drive (from an Arduino pin) needs different code from an A4988.
Direct pin drive (or TB6612) needs drive signals, the A4988 needs step/dir pulses.
Maybe you're waiting for that TB6612 for nothing.
It all depends on the resistance of the coils, which you also didn't post.
Leo..
The inductive spikes certainly would be a problem, if the OP attempted to drive the motor directly from the Arduino pins.
Thynk you for your answer.
The resistance of the coils is 40 Ohm. Here is the code:
#define STEP 2
#define DIR 3
void setup() {
pinMode(STEP, OUTPUT);
pinMode(DIR, OUTPUT);
digitalWrite(DIR, HIGH);
}
void loop() {
digitalWrite(STEP, HIGH);
delayMicroseconds(1000);
digitalWrite(STEP, LOW);
delayMicroseconds(1000);
}
Hi, @silentreader98
Welcome to the forum.
I assume these are the type of stepper.
I have a collection of them without leads or gear on the shaft.
Tom....
![]()
You are welcome. Make sure you read all the documentation on how to use it with the Arduinio
No, that code will not work with that driver,
Please read all the documentation on how to use that driver on the provided webpage
That is step/dir code for the A4988 and is not suitable for direct drive with an Arduino pin or TB6612.
Try the Stepper.h library for the 4-wire motor on this page (second diagram).
That means 5volt (125mA) is too much for this motor.
Resistors must be included in the motor wires to the TB6612 to reduce current to 35mA.
That works out to two 100 Ohm resistors, one in series with each coil.
Leo..
Where did you get that number, and with what circuit? Please post a link to the details.
