The nema 23 works properly but has little holding torque. I can make it skip around by turning it with my hand when it is supposed to be holding position. I've dealt with similar steppers before so I know this shouldn't be the case but I cannot figure out why it is not giving maximum holding torque. Read somewhere else that higher voltage might be needed, somewhere around 36-40V? Or is the lack of holding torque due to some internal wear in the stepper? Specs of my electronics are below. Anyone have any suggestions?
Nema 23 specs:
Rated current: 2.8A
Resistance per phase: 0.9 ohm
Step angle: 1.8 deg
Holding torque: 1.3 Nm
Tb6600 specs:
DC input: 9-42V
Output current: 0.5-3.5A (set to 2.8A for my purposes)
Power supply is 24V, 6.5A
No, 24V will work fine.
You are doing something else incorrectly, but did not provide enough information for anyone to guess what that might be. Take a look at the instructions in the "How to get the best out of this forum" post.
My bad, here's some more. Using Arduino MKR zero. Wired the stepper as shown in the provided wiring chart that came with the motor. Works perfectly besides the torque. I tried switching these wires around and was able to get it to work with other configurations but it didn't fix anything. I've tried running it in full step mode as well as microstepping, but there is little difference between the two in terms of holding torque.
Pretty certain the DIP switches on the tb6600 are set correctly for the current limiting. S6 is on for 2.8A, S1 and S2 are on for full step mode.
I am currently running the stepper in full step mode. When stationary and powered, stepper draws ~0.48A. Running the program below peaks the current at ~1.2A (obtained this value from power supply).
#include <AccelStepper.h>
const int enaPin = 0;
const int dirPin = 1;
const int stepPin = 2;
const int mit = 1;
int msMultiplier = 1;
int spr = 200 * msMultiplier;
AccelStepper stepper = AccelStepper(mit, stepPin, dirPin);
void setup() {
Serial.begin(9600);
pinMode(enaPin, OUTPUT);
digitalWrite(enaPin, LOW);
stepper.setMaxSpeed(50000);
stepper.setAcceleration(5000);
}
void loop() {
stepper.moveTo(spr);
stepper.runToPosition();
}
Reduce these numbers by a factor of 100 and see what happens.
This does not belong in loop(). Please spend more time with the AccelStepper docs and examples. For constant speed, try the ConstantSpeed example.
stepper.moveTo(spr);
Did what you recommended. Stepper still spins, but now exhibits odd behavior where it jumps back some number of steps opposite of the direction of rotation. This happened 2-3 times during a single rotation.
Updated code:
#include <AccelStepper.h>
const int enaPin = 0;
const int dirPin = 1;
const int stepPin = 2;
const int mit = 1;
int msMultiplier = 1;
int spr = 200 * msMultiplier;
AccelStepper stepper = AccelStepper(mit, stepPin, dirPin);
void setup() {
Serial.begin(9600);
pinMode(enaPin, OUTPUT);
digitalWrite(enaPin, LOW);
stepper.setMaxSpeed(500);
stepper.setAcceleration(100);
stepper.moveTo(spr);
stepper.runToPosition();
}
void loop() {
}
Try reducing acceleration by at least another factor of 10. And do try the constant speed example, with a low speed. It is a bit early to try for a stepper-driven dentist's drill.
A reasonable overview and guide to AccelStepper can be found here: AccelStepper - The Missing Manual | Details | Hackaday.io
Ran the code below as recommended. Stepper rotates fine with no step issues (albeit jittery due to full step mode) and I'm still able to stop it easily with my hand.
#include <AccelStepper.h>
const int enaPin = 0;
const int dirPin = 1;
const int stepPin = 2;
const int mit = 1;
int msMultiplier = 1;
int spr = 200 * msMultiplier;
AccelStepper stepper = AccelStepper(mit, stepPin, dirPin);
void setup() {
Serial.begin(9600);
pinMode(enaPin, OUTPUT);
digitalWrite(enaPin, LOW);
stepper.setMaxSpeed(1000);
//stepper.setAcceleration(100);
stepper.setSpeed(50);
//stepper.moveTo(spr);
//stepper.runToPosition();
}
void loop() {
stepper.runSpeed();
}