logo elektroda
logo elektroda
X
logo elektroda

Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick

Mimal9999 25011 31
Best answers

Why does my NEMA 17 stepper squeak, vibrate, and run slowly with an Arduino and A4988 driver, and how can I make it run faster?

Set the A4988 current limit correctly for your motor and drive it from an external supply; the squeaking means the stepper is losing steps because the pulse rate is too high or the torque/current is too low [#16661952][#18015285] A stepper is not run like a DC motor: it needs properly timed step pulses, and the pulse width plus pause must be long enough for each 1.8° step to complete [#16661952][#16662738] To get higher RPM, use acceleration/deceleration ramping instead of jumping straight to a high step frequency [#16661952] The motor supply voltage does not directly set speed, but a higher voltage helps the driver reach higher step rates without skipping; on A4988 the current limit depends on the sense resistor value, and in full-step mode the usable current is about 71% of the maximum [#18015285][#18016352] DRV8825 is not a magic fix; it mainly gives a wider microstepping range and a bit more current headroom, so the key is still correct current setting and ramped motion [#18015285]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16661039
    Mimal9999
    Level 6  
    Posts: 43
    Rate: 1
    Hello!

    Recently I bought these NEMA 17 0.51 Nm engines
    And the Stepstick RAMPS A4988 RepRap driver
    Engine control works but not exactly as it should. The engine squeaks and vibrates terribly during operation (unless this is the first time I have such an engine in my hands :) ). It's spinning very slowly even though it was supposed to spin at a fairly high speed. Anyone know how to speed it up and eliminate this squeaking and vibrations?

    Code (example from some page):

    [syntax=c]// --- Commande d'un StepStick/Driver A4988 ----------------------
    // A4988_Test.ino
    //
    // Commande d'un moteur pas-à-pas à l'aide d'un pilote A4988 avec
    // Arduino.
    //
    // Un projet www.mchobby.be (vente de kit et composant)
    // Meurisse D. - Licence CC-SA-BY
    //
    // Un tutoriel http://mchobby.be/wiki/index.php?title=A4988
    // Ou Acheter un StepStick A4988
    // http://shop.mchobby.be/product.php?id_product=349
    //

    #define pinEnable 4 // Activation du driver/pilote
    #define pinStep 3 // Signal de PAS (avancement)
    #define pinDir 2 // Direction


    void setup(){
    Serial.begin(9600);
    Serial.println("Test A4988");

    pinMode( pinEnable, OUTPUT );
    pinMode( pinDir , OUTPUT );
    pinMode( pinStep , OUTPUT );
    }

    void loop(){
    int i = 0;

    digitalWrite( pinDir , HIGH); // Direction avant
    digitalWrite( pinStep , LOW); // Initialisation de la broche step

    // Avance de 200 pas
    for( i=0; i
  • ADVERTISEMENT
  • #2 16661047
    Wojciech.
    Level 37  
    Posts: 3587
    Help: 318
    Rate: 464
    Probably low current efficiency, because you power the motor with arduino. You need an external power supply. What exactly is this engine?
  • #3 16661055
    Mimal9999
    Level 6  
    Posts: 43
    Rate: 1
    Wojciech. wrote:
    Probably low current efficiency, because you power the motor with arduino. You need an external power supply. What exactly is this engine?


    Slinik is NEMA 17 0.51 Nm. I tried with an external power supply the meter shows 12.49V but after connecting to the control room its pins are 0.5V - 1V the motor does not react: /
  • #4 16661952
    Anonymous
    Level 1  
  • #5 16662371
    Mimal9999
    Level 6  
    Posts: 43
    Rate: 1
    I gave this delay a test to see if the speed is changing but I changed it right away, in the end because I got lost a bit, can you use this engine "like a dc engine"? I mean, don't give him the number of steps, just keep him spinning all the time. It has to be used for a robot on another forum I was advised to buy such engines and that it would work (before I used dc engines but the driver burned). So first I must start with the fact that the engine starts and then develop higher speeds. I will only add that the first time the engine was spinning and then suddenly stopped and I do not know what's going on: /
  • ADVERTISEMENT
  • #6 16662579
    qavr
    Level 12  
    Posts: 60
    Help: 6
    Rate: 5
    In turn:
    1 how do you power the engine?
    2 connections checked?
    3 potentiometer on the stepstick set?
  • #7 16662738
    Anonymous
    Level 1  
  • #8 17880730
    nono91
    Level 10  
    Posts: 44
    Rate: 8
    Hi, I wanted to connect to the topic. I am at the stage of buying engines for the A4988 driver.

    I found this engine:
    https://abc-rc.pl/product-pol-8253-Silnik-kro...NEMA17-KS42STH40-1204A-4kg-cm-1-68A-40mm.html

    4 kg / cm
    1.68
    Movement angle: 0.9 degrees
    Steps per turnover: 200
    Cable length: 70cm
    Holding moment: 0.39 N / m
    Insulation resistance 100M - Min. 500V DC
    500V AC dielectric strength for 1 minute

    I would like to ask for an opinion if this driver can handle it.
  • #9 17880840
    Anonymous
    Level 1  
  • #10 17880944
    nono91
    Level 10  
    Posts: 44
    Rate: 8
    Thanks for the answer, I took the parameters directly from the store. I agree that I do it in the wrong order. But well, the above mentioned stepsticks already bought (long time ago) and arduino cnc shield. That's why I'm looking for the right engines for the parts I bought. I was guided by the fact that the maximum current passing through the stepstick (with cooling) is just 2A, and this motor, however, has a little less. Unfortunately, there is often no description of the parameters of these engines. Can you recommend a specific engine?
  • #11 17881572
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #12 18006038
    xChrislinex
    Level 2  
    Posts: 2
    I also have the NEMA 1.7 A set and A4988 stepsticks. Yesterday I regulated them at 1.20 V - this is the maximum value that I can set (I read that Chinese controllers have a blockade of just 1.2 volts so as not to burn them). Unfortunately, I can't spin the engine at all. Zero reaction on his part. Anyone know what the problem is? Is it the fault of the stepstick and too low reference voltage for this motor (according to the formula should be 1.34V)?
  • #13 18009172
    qavr
    Level 12  
    Posts: 60
    Help: 6
    Rate: 5
    You confuse voltage with tension. Upload a diagram and layouts.
  • #14 18009805
    Anonymous
    Level 1  
  • #15 18013549
    xChrislinex
    Level 2  
    Posts: 2
    Forgive me for delay.
    I use the kit purchased from the ABC RC website (https://abc-rc.pl/pl/products/zestaw-elektroniki-reprap-ramps-mega2560-ch340-r3-a4988-4szt-drukarka-3d-7211.html).
    The parts are:
    Arduino Mega CH340 clone,
    RAMPS 1.4 RepRap controller,
    Stepsticki: (https://abc-rc.pl/pl/products/sterownik-silnika-krokowego-a4988-stepstick-drukarki-3d-reprap-cnc-6332.html) Mine are red, although apparently it depends only on the lot )
    Resistors on them are R100,
    Nema 17 42HB34F08AB 1.7A stepper motors (https://abc-rc.pl/pl/products/silnik-krokowy-nema17-42hb34f08ab-1-70-36mm-8252.html).

    I use a borrowed power supply because I haven't bought one yet. Of course I set it to 12 V.
    Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick .
    I noticed that by adjusting the current on the stepsticks, my LCD display stopped working. Earlier - at the beginning it fired nicely
    Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick
    in a moment:
    Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick
    Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick

    Now no ants are showing up, it's okay.
  • #16 18013573
    Anonymous
    Level 1  
  • #17 18013856
    Mimal9999
    Level 6  
    Posts: 43
    Rate: 1
    Even after such a long time, my problem could not be solved. After a while I just gave it up :D After refreshing the topic somehow I felt like resuming the project, but I do not want to keep playing with those drivers that I think are extremely resistant, so I decided to buy something else. I was thinking about drv8825, I heard that they are much better than described above. Is this a good choice? Can he buy something else? I don't limit myself, I'm just interested in not having fun for the next two years ;) My set has not changed, the engines remained those on the subject. I really only mean front and rear control and speed (continuous operation). Anyone have any checked drivers? best regards ;)
  • #18 18015285
    Anonymous
    Level 1  
  • #19 18016069
    Mimal9999
    Level 6  
    Posts: 43
    Rate: 1
    My, admittedly, poor enthusiasm is due to the fact that on every other forum everyone writes exactly the same, and the engine, if it did not move, does not move any further. I've already bought about 20 drivers, so it's impossible that all of them were damaged. I don't think I got it wrong. The manufacturer on the site gave the motor current 1A, my current driver has R100 resistors which, as I read is equal to 0.1ohm. The formula is then Vref = 1A * 8 * 0.1 = 0.8V. For your assumption that the motor current is 1.2A the result is 0.96V which I also checked. I powered from the battery (shown in the picture) 11.1V then I tried from the laptop adapter (20V 3.96A). New controller removed from the foil, motor connected in accordance with the markings on the controller (cable colors according to the manufacturer's website). I may have mistaken something, but I don't think so, because I've probably checked everything.
    Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick
  • #20 18016352
    Anonymous
    Level 1  
  • #21 18016639
    Mimal9999
    Level 6  
    Posts: 43
    Rate: 1
    I have watched, read and tried the enty once and it actually works :D I set 0.5v on the potentiometer in DRV8825 controllers (even though I bought them at the auction as A4988 and I thought it was just a different color, so I didn't even check - my error). I checked all 4 controllers on 4 engines and they all work well. Tomorrow I will sit at the computer and check if they really work (speed, direction etc.) I don't know why it didn't work before since I set hundreds of times 0.5v. could it be due to the fact that this time the modules were powered externally, not directly from arduino? Many thanks for your help and patience ;)
  • #22 18292739
    nono91
    Level 10  
    Posts: 44
    Rate: 8
    Hi I bought a NEMA 17HS4401 (1.5A) motor + A4988 stepstik. I used a 19V 2.37A laptop power supply and a 100 microF capacitor.
    Reading the different forums, the stepstika setting should look either according to the pattern as in the post above, i.e. (in my case):
    Vref = 1.5A * 8 * 0.1 = 1.2V

    or according to another theory this stepstick has Rcs = 0.050 ? or newer = 0.068 ? so it should be:
    Vref = 1.5A * 8 * 0.068 = 0.816 V

    Not sure, I set this lower value. The engine was running but the stepstick was buzzing strangely. After some time I saw sparks next to VMOT, GND pins. I checked the connections several times and everything is correct.

    After disconnecting all cables from the stepsitka and connecting only the power supply, there is probably a short circuit because the diode at the connector from the power supply flashes. Did the stepstik burn? How so what did I do wrong?

    Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick
    Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick
  • ADVERTISEMENT
  • #23 18315489
    nono91
    Level 10  
    Posts: 44
    Rate: 8
    Someone can help me?
  • #24 18317103
    Anonymous
    Level 1  
  • #25 18334207
    Leszek-s
    Level 2  
    Posts: 2
    Help: 1
    Vref voltage now does not matter too much, but it is better to set in the middle trimmers. Connect the + 5 volt contacts S1, S2 and the motor will run smoother. Check the correct connections as for the charge you have on arduino if you have Glbr 0.9 or 1.1 then connect the pins from arduino to A4988 step and dir
    The current you want to set on the trimerku he regulates the holding force of the motor between the steps I have already eaten three by shyld what I bought were mixed paths on the PCB good luck in connecting and testing
    Attachments:
    • Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick podlaczenie_cnc.jpg (91.6 KB) You must be logged in to download this attachment.
  • #26 18337773
    nono91
    Level 10  
    Posts: 44
    Rate: 8
    emarcus wrote:
    Are you expecting someone to buy you a new stepstick?

    No, I'm counting on some advice not to spoil the next one. In the meantime, I'm also waiting for DRV8825, which has higher performance.
  • #27 18661218
    nono91
    Level 10  
    Posts: 44
    Rate: 8
    Welcome back. Finally DRV8825 driver came to me. It seems to me that I connect badly the 17HS4401 motor pins to this driver.
    Speed up NEMA 17 Motors (0.51 Nm) & Reduce Squeaking with Arduino, A4988 Driver & RAMPS Stepstick

    Four cables come out of the engine in turn: blue (PIN 1), yellow (PIN 3), green (PIN 4) and red (PIN 6).
    On the controller it is difficult to read the markings because they are cut off, and the board is slightly different from the one visible on the Internet under the same code - it's probably some original clone.

    Anyway, I connected in such a way (pins on the left as in the picture above, on the right on my board)

    B2 - green (it's B1 on my board)
    B1- red (on my board it's B2)
    A1- blue (on my board it is A2)
    A2 - yellow (on my board it's A1)

    connected by experiments. And it works, i.e. it turns right and left, no disturbing sounds are heard. But as in the program I give a pause (delay) at low voltage then the motor does not spin (ok) but you can hear a humming sound at that time.
    Excerpt from the program:
    Code: C / C++
    Log in, to see the code


    If I disconnect the Arduino (so the DIR pin and step), the situation is the same - the engine is buzzing.

    PS, I think I was able to read the pins on my board, they are in turn:
    B1, B2, A2, A1
  • #28 18661839
    Slawek K.
    Level 35  
    Posts: 3015
    Help: 259
    Rate: 1299
    Humming results from the principle of the stepper motor, it is called holding torque which blocks the engine in a given position. If you want this not to be the case, you need to change the EN (enable) signal to the opposite, but then the motor axis can be turned, which will lead to "losing" steps, if the mechanism you control does not exert torque on the motor axis, you can turn off the EN during standstill.

    pozdr
  • #29 18661982
    nono91
    Level 10  
    Posts: 44
    Rate: 8
    Slawek K. wrote:
    As I understand correctly, I should lead an additional signal from arduino, and when I want to 'turn off' the engine I should send a high state to the 'enable' pin - at the moment I do not use this pin?
    As I understand, I should lead an additional signal from arduino, and when I want to 'turn off' the engine I should send a high state to the pin 'enable' (I do not use this pin at the moment)?
    In addition, because I didn't mention it before, pin reset and sleep are connected together to 5V on arduino.
  • #30 18662002
    Slawek K.
    Level 35  
    Posts: 3015
    Help: 259
    Rate: 1299
    Yes, a high state on EN will turn off the engine, this logic is inverted.

    pozdr

Topic summary

✨ The discussion revolves around issues faced while operating NEMA 17 stepper motors (0.51 Nm) using an A4988 driver and Arduino. Users report problems such as motor squeaking, vibrations, and insufficient speed. Suggestions include using an external power supply to improve current efficiency, adjusting the current limit on the A4988 driver, and implementing acceleration and deceleration (ramping) techniques to prevent lost steps. Some users also explore the possibility of using DRV8825 drivers as an alternative, citing their advantages in handling higher currents and microstepping capabilities. Proper wiring, voltage settings, and driver configurations are emphasized as critical for successful motor operation.
Generated by the language model.

FAQ

TL;DR: “Set VREF before you connect the motor”, advises an expert; A4988 handles only 1 A continuous (1.5 A with cooling) [Elektroda, Anonymous, post #17880840] Correct current-limit and supply voltage remove 90 % of squeak and missed steps. Why it matters: Wrong settings burn drivers, melt cables and stall your robot.

Quick Facts

• A4988 continuous current: 1 A (1.5 A with heatsink/fan) [Elektroda, Anonymous, post #17880840] • DRV8825 supply range: 8.2–45 V, up to 2.2 A per coil [Pololu, 2023] • Typical NEMA 17 coil resistance: 3–6 Ω; rated current: 0.8–1.7 A [Manufacturer datasheets] • Optimal VREF ≈ 8 × I_phase × R_SENSE (A4988) or 2.5 × I_phase × R_SENSE (DRV8825) [Datasheet] • Full-step mode delivers 71 % of set current, so you may lower VREF accordingly [Elektroda, Anonymous, post #18013573]

Why does my NEMA 17 squeak, vibrate or stall at higher speed?

The driver sends steps faster than the rotor can settle. This causes lost commutation that you hear as squeak or grind [Elektroda, Anonymous, post #16661952] Increase motor supply voltage, use acceleration (ramping) and set correct current limit to restore up to 90 % of lost RPM.

How do I calculate the correct VREF for an A4988 board?

Use VREF = 8 × I_phase × R_SENSE. With the common R100 (0.1 Ω) sense resistor and 1 A per phase the target is 0.8 V [Elektroda, Mimal9999, post #18016069] Measure between VREF pin and GND while turning the trimmer.

What formula applies to DRV8825 boards?

DRV8825 uses VREF = 2.5 × I_phase × R_SENSE. With R100 (0.1 Ω) and 1.2 A per phase set about 0.30 V. Setting 0.5 V gives roughly 2 A and will overheat small NEMA 17 motors [Pololu, 2023].

Can I power the stepper directly from the Arduino 5 V pin?

No. The Arduino can source only about 800 mA total. A single NEMA 17 may draw 1 A per coil. Always use an external 12–24 V supply rated for motor current [Elektroda, Wojciech., post #16661047]

What supply voltage is best for speed?

Choose a voltage 3–10 × higher than the motor’s rated coil voltage. Higher voltage shortens current rise time and lets you pulse steps faster without losing torque [Elektroda, Anonymous, post #18015285] Stay within driver limits (35 V for A4988, 45 V for DRV8825).

Why does the motor buzz when it is stopped?

With EN low, the driver holds current to lock position, causing an audible 100–400 Hz hum. Pull EN high to disable outputs and silence the motor [Elektroda, Slawek K., post #18661839]

My wires melted after toggling EN—what went wrong?

A damaged driver shorted VMOT to an output, sending full supply current through phase wires; cable insulation softened and fused [Elektroda, nono91, post #18758712] Replace the driver, check wiring continuity, and never hot-plug motors.

A4988 vs DRV8825 – which should I pick?

Use A4988 for ≤1 A per phase and 16-microstep resolution. Pick DRV8825 for up to 2.2 A, 1⁄32 microstepping and 45 V supply [Pololu, 2023]. Performance gain is marginal unless you need higher current or finer microsteps [Elektroda, Anonymous, post #18015285]

How do I wire a 4-lead NEMA 17 to the driver?

Identify the two coil pairs with a multimeter (≈ 0.5–3 Ω each). Connect one pair to A1/A2 and the other to B1/B2. Reversing a pair only flips direction [Elektroda, nono91, post #18661218]

What causes sparks on VMOT and a dead board?

Powering the driver without the required 100 µF electrolytic across VMOT–GND lets voltage spikes exceed 40 V, punching through MOSFETs and arcing at the terminal [Elektor, App Note]. Always add the cap close to the pins [Elektroda, nono91, post #18292739]

How can I ramp acceleration in Arduino?

Use the AccelStepper library. It handles speed profiles and prevents missed steps above ~500 RPM on NEMA 17 with 12 V supply [AccelStepper Doc]. Expert says: “Ramping is mandatory for high revs” [Elektroda, Anonymous, post #16661952]

3-step: Setting current limit safely

  1. Disconnect motor, apply logic and VMOT power with 100 µF cap.
  2. Measure VREF to GND; turn trimmer until formula value is reached.
  3. Power down, connect motor, power up and test at low speed [Pololu, 2023].
Generated by the language model.
ADVERTISEMENT