Im using the driver A4988 together with stepper 28byj-48. Ive read somewhere that the correct current limit on 28byj-48 is somewhere between 0.1-0.15 v. However if I feed it with 12 v there is a high frequence noise that wont go away untill I turn my powersupply down to around 9 v. However if I adjust the current limit to around 0.2 v the noise goes away. I wounder it this is to high value for my stepper. How do I know?
How can I calculate the correct value on the current limit?
Here is the specs for 28byj-48:
Voltage 5V
Current 0.26A
Do I need different current limits depending on how much voltage I feed to the driver? On 9 v the stepper sometimes fails to hold its position on high speed.
I have never used the 28byj-48 stepper motors with the A4988, but have used the A4988 with several NEMA17 motors.
To properly set the coil current on the A4988 drivers you first must know the value of the sense resistors on the board to insert into the formula Vref = 8 * Imax * Rcs where Vref is the desired reference voltage to set, Imax is the coil current and Rcs is the value of one current sense resistor.
The current sense resistors can be 0.05Ω, 0.068Ω (Pololu) or 0.100Ω (chinse) or ??, you need to look at what you have. The Pololu page on the A4988 explains how to locate the sense resistors and a detailed procedure for setting the current limits.
How did you connect the motor to the driver? Out of the box the 28byj-48 cannot be connected correctly to an A4988 as it is a 5 wire unipolar stepper with a common Vin for all coils. The A4988 needs a 4 wire bipolar stepper.
Ok. In what way are they inefficient? The most importen for me is that they are not producing noise and that I can drive a stepper with two pins instead of four. I cannot find any decent instruction telling me how to drive my stepper with L293 with only two pins from arduino. Is it possible? On a4988 im using step and dir. Can I use L293 in a similliar way?
Interesting. However I cant find anyone how documented that they actually succeded to drive the stepper with just two pins. Only with four pins like here
What's the problem with the links from @groundFungus ?
If you drive the stepper in full step and use 4 pins, then there are two pairs where one pin is always the inverted one of the other. You don't need an extra pin on the Arduino for that, you can do that with an inverter. And this is what can be seen in the links from @groundFungus.
Hi,
This VERY basic circuit of the 293 may help.
When conducting current it has to flow through 2 BJTs.
They each drop a minimum of 1V across their Collector -Emitter, this is lost power.
I have now made the circuit@groundFungus suggested. I works fine running ULN2003 with only two pins.
The noise is gone when it is idle but the motor gets very hot!
However I have some problems with the changing of direction which is not relieable and only works 3 times out of 5. Any suggestions to improve the code?
Your stepping is not correct. coilA and coilB should be driven like this:
00 -> stepdelay -> 01 -> stepdelay -> 11 -> stepdelay -> 10 -> stepdelay -> 00 ...
To change the direction of rotation, the coils must be driven in reverse order.
Which voltage do you apply to the coils? With the ULN driver this must not be more than 5..6 Volt.