There is probably a few topics like this, but neither really answered my question.
I have a 4V; 0.95A; 4.2ohm; 2.5mH ; NEMA17 hybrid stepper motor that I am trying to drive with a Stepper 2-click A4988 driver (which is in 1/32 microstep settings). The driver gets 12v 0.4A from a wall plug.
I am using this as a test code
int dirPin = 2;
int stepPin = 3;
int stepsPerRes;
int Button_pin = A1;
int val = 0;
int timebetweensteps = 1000; // Dont go below 100
void setup() {
// put your setup code here, to run once:
pinMode(stepPin, OUTPUT);
pinMode(dirPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
// set spinning direction backwards - HIGH or forward - LOW
digitalWrite(dirPin, LOW);
// Button press
val = analogRead(Button_pin);
Serial.println(val);
if (val > 500) {
// STEP 1
digitalWrite(stepPin, HIGH);
delayMicroseconds(timebetweensteps);
digitalWrite(stepPin, LOW);
delayMicroseconds(timebetweensteps);
}
}
The code works fine, however, the motor makes a typical rattling sound. I have thought about having it wired wrongly but after testing multiple cable variation, neither have really worked.
Could it be the driver that is this noisy? Could I have wired it wrongly or wrote a code that promotes noise. Or did I not ground something properly?
Did you set the current limit on the A4988 board to the proper value?
Breadboards are for logic circuitry and cannot handle motor currents. The tracks will burn, so you need to either solder or jumper the motor power supply+ground and motor wires directly to the motor driver.
Is this powerful enough for your "4V; 0.95A; 4.2ohm" motor in your application? It looks like the motor would drop the wall plug's voltage to 0.4A * 4.2 ohm = 1.68V
Good point. The motor is rated for 8 W and the OP's power supply can provide at best 5 W. But the driver current limit can be set much lower than 0.95 A and the motor should still run, if unloaded.
Unfortunately, many beginners do not realize that they need to set the current limit.
A couple of people have mentioned it already, but you might not be getting enough amperage to drive your motor. I had an issue with a servo motor a couple of weeks ago - a lot of guys were telling me it wasn't getting enough power. It took me a disproportionate amount of time to accept that they were right. I also had a noise issue, but the bulk of my problem was the power.
Did you set the current limit on the A4988 board to the proper value?
There's no current limiter in my driver board and also as I am only using 5W's I was not expecting it to be a problem
Is this powerful enough for your "4V; 0.95A; 4.2ohm" motor in your application? It looks like the motor would drop the wall plug's voltage to 0.4A * 4.2 ohm = 1.68V
I don't really need a lot of torque, hence why I went for a lower voltage motor / lower power wall plug. However thank you, I did not know that the actual voltage of what the motor's getting is dependent on ohm's law. It IS WORKING, my problem is with the noise. I was looking for smoother operation. I also have a 18W 9V 2A PSU, would that help? Then the actual voltage would be 4.8 (Right?)
A couple of people have mentioned it already, but you might not be getting enough amperage to drive your motor. I had an issue with a servo motor a couple of weeks ago - a lot of guys were telling me it wasn't getting enough power. It took me a disproportionate amount of time to accept that they were right. I also had a noise issue, but the bulk of my problem was the power.
Indeed, but it is running. The thing that is not clear, if I supply more power to the motor, wouldn't it just heat more? Or have greater torque for actually moving objects.
I don't even think that I'd need that much torque.
Also
I have found that if I adjust the time in the code (delayMicroseconds) I can get differently sounding operations. HOW do I get the optimal times for X motor?
So to clarify and rephrase my question :
My problem is the Noise that it makes while it goes. I want smooth / silent operation.
Would more power solve the problem? or would I need more power AND a new driver?
Well indeed it seems that this boards sets the current fixed to 1.6A. I never saw a a4988 driverboard with a fixed current setting. So this board is only suitable for steppers with a 1.6A rated current, at this is too much for your 0.95A stepper.
The board and your stepper do not seem to be compatible.
On the other hand, your power source cannot provide the necessary power, so the A4988 is not able to regulate the current at all. After all no smooth operation of your stepper is possible.
Would the up mentioned new driver solve my problem?
Or would I need to get a new Wall Plug as well?
Or just a new Wall Plug?
How about the 18W 9V 2A Wall plug that I have?
Do you mean the link in your first post? I don't know this driver, but from the data in the link it should be fine. At least there is a potentiometer to adjust the current
Well 9V isn't really much for that driver, but it should work from 7V on. So you can give it a try.
I don't think it was specified for one stepper. I would assume that then it would have a more proprietary connector.
But still, couldn't the current limiter be avoided if you put sufficient heat dissipation on the chip?
Well there a lot of steppers that will work well with 1.6A. But not yours
I don't really understand what you mean. The A4988 is a current driver that works by regulating the current through the coils. You will only get a smooth operation if that works well and the regulated current fits to your stepper.
I have found out that the A4988 is one of the loudest driver according to multiple sources. < - This might be the original source of the problem.
A better PSU did not change a thing, I think that could be a wrong direction. I mean I cannot find an explanation on why increasing the current or the voltage would drive the motor more quiet. < - (anyone?)
However one with higher microstepping makes sense
I'll probably going to use a different driver for future projects but this is a good learning experience.
Yes higher microstepping is surely a means to drive the motor more quiet. And that's also what the TMC drivers do: They automatically insert additional microsteps between the steps from the processor.
But all this does not help if the base is not working properly. And that's controlling the correct current for your motor. All drivers depend on beeing able to do this properly.
Who talked about increasing the current for your motor? The current the driver tries to apply to your motor is too high! On the other hand your PSU cannot provide the necessary power. So your driver board doesn't fit to your stepper, and your PSU doesn't fit to your driver board. What do you expect? bad * bad != good.
A correctly configered A4988/stepper combination with 1/16 microsteps doesn't 'rattle'. It isnt' as silent as a system with a TMC driver, but it isn't really loud.
Who talked about increasing the current for your motor? The current the driver tries to apply to your motor is too high! On the other hand your PSU cannot provide the necessary power. So your driver board doesn't fit to your stepper, and your PSU doesn't fit to your driver board. What do you expect? bad * bad != good.
In the website it says it is limited to 1.6A, not fixed at... and if I give 2.1A it'll enable overcurrent protection. Wouldn't that mean... that
if I put in the 18W 9V 2A psu, it would just give out too much, which would cause the motor to heat up more quickly?
and if I put in the 12V 0.4A 5W psu, then that would just be too little
but my problem is, that with both, the symptoms are the same. Loud operation, with a roughish movement. Also, optimising the digital pulse width for the STEP pin helped to dampen a bit.
Actually
I've also found out that from the site that I ordered the default config said that it would be 1/16 microstepping but on the manufactuter's website it says the default is 1 whole. When I resoldered the resistors, I tried with 1/16 and 1/8, and then the motor was dropping steps. I could've imagined that with the weaker PSU but not the stronger.
But then, for next time, what parametered PSU and driver(doubt I'll get a new one, lab funds are exhausted for this project) would you suggest for this motor? 12-24V 1.5A?