Go Down

Topic: Microstepping with TB6600 - Problem (Read 140 times) previous topic - next topic

yesitbeme

Aug 14, 2019, 05:10 am Last Edit: Aug 14, 2019, 05:23 am by yesitbeme
Hello,

I am currently trying to use a microstepper motor driver (TB6600) with Arduino UNO. So far I got the motor to move, the problem is the microsteps. I'm using a stepper motor with 200 steps/rev. and the motor driver is set up to 32 microsteps/step, resulting in 6400 microsteps/rev.
With the attached code, the motor moves 16 microsteps, waits for 16 signals (it really doesn't move at all) and then moves another 16 microsteps. I want it to move continuously for one microstep every second without interruption for one revolution. My set up is currently to have PUL+, DIR+ and ENA+ all together on the 5V pin on the Arduino and PUL-, DIR-, and ENA- on pins 9, 10 and 11.
What seems to be another problem is the width of the steps. When the motor moves these 16 microsteps, it moves about 2 degrees, which would be the resolution of one normal step (360 degrees/200 steps/rev = 1.8 degrees/step). With a resolution of 32 microsteps/step it should only move about 1 degree (0.9 degrees) when taking 16 microsteps.
Does someone know where to start troubleshooting?

Stepper Motor: https://docs-apac.rs-online.com/webdocs/157a/0900766b8157a03e.pdf (I'm using the 191-8340)
Motor Driver is currently set to 1 Amp, peak 1.2 Amps. Unfortunately the motor driver itself has basically no datasheet.
Power supply is 12V - 1.25A DC

jremington

You forgot to post all the important information: links to the motor, motor power supply and driver, and exactly how you set the current limit on the driver (which is absolutely critical for proper microstep operation).

Robin2

It makes it much easier to help if you include a short program in your Post - like this
Code: [Select]
#define dirPin 10
#define stepPin 11

int z = 1;

void setup() {
  pinMode(dirPin, OUTPUT);
  pinMode(stepPin, OUTPUT);
  digitalWrite(dirPin, HIGH);
}

void loop() {
  for(; z < 6400; z++){
    digitalWrite(stepPin, HIGH);
    delay(500);
    digitalWrite(stepPin, LOW);
    delay(500);
  }
}



Why don't you have a normal FOR statement like this
Code: [Select]
  for(z = 0; z < 6400; z++){

A step interval of 1000 millisecs is very long for microstepping. And there is no need for the step pulse to be so long. 10 microsecs should be plenty - like this
void loop() {
  for(; z < 6400; z++){
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(10);
    digitalWrite(stepPin, LOW);
    delay(1000);
  }
}[/code]

Look at how the variables are named in this Simple Stepper Code


If you are getting short bursts of steps with your code then I suspect a power problem - and then Reply #1 is very relevant.

...R
Stepper Motor Basics
Two or three hours spent thinking and reading documentation solves most programming problems.

MarkT

In the first instance test the motor with the AccelStepper library, with modest settings for speed and acceleration.

If the progress is stuttering at low speed this could simply be you've connected the windings wrong.

Be careful never to disconnect or connect the windings to the TB6600 when it is powered, this usually
instantly destroys the chip.  For this reason the connections to the windings must be rock solid too.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up