Go Down

Topic: Arduino, GRBL, Tb6600, and old motors (Read 443 times) previous topic - next topic

Katemonster33

Hi! First time poster, but not first time Arduino-er. I gave myself an interesting challenge, resurrecting an old engraving machine, a New Hermes Vanguard 3400, and putting it back to work. It's main job will be etching serial numbers into steel plates, but I had high hopes of using it for etching PCBs for my other Arduino projects. Anyway.

I'm attempting to reuse the old motors. They still work, and I was able to get them turning using an Adafruit driver, but not before realizing it was incompatible with GRBL. So now I am trying to use the Tb6600 and am running into an issue... The motors make this horrifying whining noise as soon as I turn on the power supply! The Adafruit driver didn't do that. Is there something wrong with the TB6600 or have I wired it wrong? I've left the enable pins empty, and when I'm driving the motors it's fine, no whine. But otherwise, the noise is unbearable! Do I need to only put power to the enable pin when I want to drive the motor? If so, how does that work with GRBL? Grbl only seems to have pins for direction and step. Would it be better if I just got new motors?

Also, maybe the question I should have asked before I started this, but is GRBL suited for commercial use? It's my dad who asked me to do this, and he doesn't mind how I get the thing working, but obviously it needs to work reliably. Is GRBL the right tool for the job here? Thanks in advance!

Robin2

or have I wired it wrong?
How can we know.

You have not posted a photo of a drawing showing how you have everything connected or the code you tried.

You have not posted the code, or the connection details, for the system that works.

Help us to help you!

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

MarkT

[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Katemonster33

#3
Nov 13, 2017, 09:05 pm Last Edit: Nov 13, 2017, 09:50 pm by Katemonster33
You have not posted a photo of a drawing showing how you have everything connected or the code you tried.
OK, TB6600 wiring goes like this...
ENABLE(+) - NC
ENABLE(-) - NC
DIR(+) - +5V
DIR(-) - pin 5 (Arduino)
STEP(+) - +5V
STEP(-) - pin 2 (Arduino)

VCC - +12V
GND - GND

The wiring of the motor pairs will have to wait until I get home. I'm using the original data connector from the Hermes and I have the reverse engineered pinout at home. The steppers are Vexta ph268-21-c68. The data sheet says it runs off 5.4 volts, but I got them to move with 12. The TB is rated for 9 volts minimum. I don't have the center wires from each coil plugged in.

Quote
You have not posted the code, or the connection details, for the system that works.
The board I was using was the Adafruit motor shield. https://www.adafruit.com/product/1438

Not much to say about connection since its mostly the motor wires, but the A and B pairs are the same as on the Tb6600. I was also using 12 volts. I didn't actually write any code, there was a library that I downloaded, and example code I inserted, called stepper test or something, it came with the library. Same with GRBL, it's all off the shelf.

Robin2

I didn't actually write any code, there was a library that I downloaded, and example code I inserted, called stepper test or something, it came with the library.
You still need to post it so we can see it if we are to make sense of your problem. (Don't bother with the GRBL code - it is too complex :) )

Try this Simple Stepper Code - it should work fine with a TB6600

...R
Stepper Motor Basics

Two or three hours spent thinking and reading documentation solves most programming problems.

Katemonster33

#5
Nov 14, 2017, 01:20 am Last Edit: Nov 14, 2017, 01:36 am by Katemonster33
You still need to post it so we can see it if we are to make sense of your problem. (Don't bother with the GRBL code - it is too complex :) )

Try this Simple Stepper Code - it should work fine with a TB6600

...R
Stepper Motor Basics


Code: [Select]
/*
This is a test sketch for the Adafruit assembled Motor Shield for Arduino v2
It won't work with v1.x motor shields! Only for the v2's with built in PWM
control

For use with the Adafruit Motor Shield v2
----> http://www.adafruit.com/products/1438
*/


#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield();
// Or, create it with a different I2C address (say for stacking)
// Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61);

// Connect a stepper motor with 200 steps per revolution (1.8 degree)
// to motor port #2 (M3 and M4)
Adafruit_StepperMotor *myMotor = AFMS.getStepper(200, 2);


void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Stepper test!");

  AFMS.begin();  // create with the default frequency 1.6KHz
  //AFMS.begin(1000);  // OR with a different frequency, say 1KHz
 
  myMotor->setSpeed(10);  // 10 rpm   
}

void loop() {
  Serial.println("Single coil steps");
  myMotor->step(100, FORWARD, SINGLE);
  myMotor->step(100, BACKWARD, SINGLE);

  Serial.println("Double coil steps");
  myMotor->step(100, FORWARD, DOUBLE);
  myMotor->step(100, BACKWARD, DOUBLE);
 
  Serial.println("Interleave coil steps");
  myMotor->step(100, FORWARD, INTERLEAVE);
  myMotor->step(100, BACKWARD, INTERLEAVE);
 
  Serial.println("Microstep steps");
  myMotor->step(50, FORWARD, MICROSTEP);
  myMotor->step(50, BACKWARD, MICROSTEP);
}


I actually unplugged the Arduino from the driver and the whine stayed going until I actually cut the power, so maybe it's got nothing to do with the code.

Katemonster33

A-ha! I plugged in the Adafruit shield, and measured voltages. All wires measured between 3 and 3.15 volts. HOWEVER! The TB6600 measured ~5V and ~7V between + and - on the pairs. Clearly, the motors don't like that at all.

I played with the DIP switches on the TB6600. They were originally configured for 8 micro steps / 1600 pulses per rev and 1.5 amps. I changed it to 0.5 amps and 1 micro step / 200 pulses per rev. The noise is quieter! But still very much there. The Adafruit shield is completely silent. I don't understand the reason for the voltage differential. Is there any way to change it?

Robin2

Measure the resistance of the motor coils. Measuring voltages is unlikely to be useful - especially if you are not using an oscilloscope.

What size is the motor?

Can you tell, by turning the motor by hand, or with the working code, how many steps the motor makes per revolution?

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

MarkT

Adafruit motor shield?  I thought we were talking about a TB6600 stepper driver?  You can't drive
a low-impedance bipolar stepper with anything but a stepper driver, DC motor shields are completely
unsuitable and will burn out.

What is the winding resistance and weight of the motors?  Should be able to figure out the rough
current requirements from that.

Its pretty normal for a stepper to make noise, BTW, even when stationary, due to the chopper
oscillator.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Robin2

Adafruit motor shield?  I thought we were talking about a TB6600 stepper driver?  You can't drive
a low-impedance bipolar stepper with anything but a stepper driver, DC motor shields are completely
unsuitable and will burn out.
If I understand things correctly the motor has worked with the motor shield but NOT with the TB6600

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

Katemonster33

#10
Nov 14, 2017, 10:20 pm Last Edit: Nov 14, 2017, 10:30 pm by Katemonster33
Measure the resistance of the motor coils. Measuring voltages is unlikely to be useful - especially if you are not using an oscilloscope.
Well, I'm talking about the voltage while the motors are idle, so they weren't really fluctuating much. There's quite a difference. It seems suspicious.

What I was able to do is hook up the "Enable" pins on the TB6600 to pin 8 on the Arduino, which makes the motors only get power when I send a G-Code command to GRBL. While moving, the motors are very quiet! Almost zero whine because GRBL cuts the power as soon as movement completes. This is a somewhat acceptable work-around for now... But I'd still like to work this out.
Adafruit motor shield?  I thought we were talking about a TB6600 stepper driver?  You can't drive
a low-impedance bipolar stepper with anything but a stepper driver, DC motor shields are completely
unsuitable and will burn out.
It's made for steppers and DC motors, which is why I was able to drive my steppers with it, like I said. Here's the link to it again: https://www.adafruit.com/product/1438
Its pretty normal for a stepper to make noise, BTW, even when stationary, due to the chopper
oscillator.
People say this.... but they made zero noise at idle when powered by the Adafruit motor shield, even though (it appeared) voltage was going to the coils, like I said in my previous post. Neither of the drivers made much noise while the steppers moved. Also, I'm not talking about like a quiet whine like a television... it's really loud. It genuinely makes me nauseous to be in the same room with it for too long.

Robin2

What I was able to do is hook up the "Enable" pins
Anything to avoid taking the advice to measure the resistance :)

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

MarkT

Sounds like you need a different stepper drive with ultrasonic chop frequency so its not audible,
but oddly the TB6600 datasheet seems to imply its range of oscillation frequencies is 20kHz upwards.

Perhaps something is malfunctioning with the drive, or some sort of sub-harmonic oscillation is happening
making things audible, and perhaps hitting a resonant frequency of some of the motor windings...
Can you record the sound?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Katemonster33

Anything to avoid taking the advice to measure the resistance :)

...R
The resistance is about 7.5 ohms.

Robin2

The resistance is about 7.5 ohms.
How have you adjusted the current (amps) limit on the TB6600 stepper driver?

And my other questions from Reply #7 ...

What size is the motor?

How many steps per revolution?

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

Go Up