Nema 14 and A4988

Hi,

I was using a tmc2130 to drive my nema motors. It worked well, except for the fact that the motors and the chip got extremely hot. So I decided to try A4988 sice the motor datasheet recomended to use a driver with 2A ratings.

I am using a teensy 3.2 as controller and my code is very simple:

// defines pins numbers
const int stepPin = 5;
const int dirPin = 1;

void setup() {
  // Sets the two pins as Outputs
  pinMode(stepPin,OUTPUT);
  pinMode(dirPin,OUTPUT);
}

void loop() {

  // // Makes 200 pulses for making one full cycle rotation
  digitalWrite(dirPin,LOW); // Enables the motor to move in a particular direction
  for(int x = 0; x < 200; x++) {
    digitalWrite(stepPin,HIGH);
    delayMicroseconds(500);
    digitalWrite(stepPin,LOW);
    delayMicroseconds(500);
  }

Now I have two problems. The torque is less than the tcm2130 even though I have set the current limiter to 1A which is the ratings of the motor. The other problem is when I try to drive the motor at lower speed, the motor just vibrates and does not make any rotation. and for my application, I need very low speed.If I set the delayMicroseconds(800), or anything above, does not work.

I have tried with all the different steps by pulling MS1, MS2, MS3 to high. No change. I also tried pulling ROSC to ground shorting the resistor like here:

A4988 doesn't microstep properly
Also no change.

Here is some info about the motor:
-24V
-1A ratings
-nema 14
-datasheet: https://www.boxerpumps.com/fileadmin/dateien/peristaltic/9QX/Peristaltic_Pump_9QX_Stepper.pdf

Any help would be appreciated.

Hello.

Thanks for posting that datasheet. How do you have the mode pins configured when you run that code? Is our driver getting hot in that configuration? Can you post pictures of your connections including any soldered connections you made? Which current sensing resistors does your board have and what did you set VREF to?

-Nathan

How do you have the mode pins configured when you run that code?
For that code I have the pins configured in fullstep mode.

Is our driver getting hot in that configuration?
Yes.

Can you post pictures of your connections including any soldered connections you made?
This is how I grounded ROSC:

This is how I connected everything and the equivalent schematic:


This is the code I run for 1/16th step mode:

// defines pins numbers
const int stepPin = 5;
const int dirPin = 1;

void setup() {
  // Sets the two pins as Outputs
  pinMode(stepPin,OUTPUT);
  pinMode(dirPin,OUTPUT);
}

void loop() {

  // // Makes 200 pulses for making one full cycle rotation
  digitalWrite(dirPin,LOW); // Enables the motor to move in a particular direction
  for(int x = 0; x < 200; x++) {
    digitalWrite(stepPin,HIGH);
    delayMicroseconds(500/16);
    digitalWrite(stepPin,LOW);
    delayMicroseconds(500/16);
  }

Which current sensing resistors does your board have and what did you set VREF to?
Current sensing resistor is 68 mΩ and I set Vref to 540 mV.

What kind of power supply are you using (what is its voltage and maximum current)? Are you using the same power supply to compare the A4988 to the TMC2130? I do not see any obvious problems with your code and connections. The inductance of the motor coils limit the current at higher step rates, and the motor vibrating could be consistent with the behavior we would expect if the driver is overheating and resetting itself. Could you try setting a slightly lower current limit (maybe 800mA) and remove the load to see if the motor moves at low speed?

The TMC2130 driver you mention has a lot of features to change the output current based on things like the load. We have not done any direct comparison against the A4988 driver, but it is not surprising that the drivers would perform a little differently with a similar current limit setting. Also, we expect stepper drivers to run pretty hot near their current limit. Is that your only reason for looking into an alternative for the TMC2130?

-Nathan