Arduino, GRBL, Tb6600, and old motors

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!

Katemonster33: 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

I found a product datasheet: http://www.e-engraving.com/machines/new_hermes/img/New_Hermes_Vanguard_3400_Spec.jpg

But nothing about the motors (other than spindle)…

Bit of googling showed these spares: http://q1engravers.com/index.php?main_page=product_info&cPath=1849&products_id=3095&zenid=e159b58de4821475af3b9b0860b959ea

But no specs for it…

Robin2: 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.

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.

Katemonster33: 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

Robin2:
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 :slight_smile: )

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

…R
Stepper Motor Basics

/* 
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.

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?

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

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.

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.

If I understand things correctly the motor has worked with the motor shield but NOT with the TB6600

...R

Robin2: 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.

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.

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

MarkT: 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.

Katemonster33: What I was able to do is hook up the "Enable" pins

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

...R

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?

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

...R

The resistance is about 7.5 ohms.

Katemonster33: 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

Robin2: How have you adjusted the current (amps) limit on the TB6600 stepper driver?

I tried 2, 1.5, 1, and 0.5 .... at 0.5 the noise was a little better but I was completely unable to drive the motor.

What size is the motor?

I can try to measure it when I get home.

How many steps per revolution?

the data sheet says 1.8 degree per step so 200.

Katemonster33: the data sheet says 1.8 degree per step so 200.

Because your Title says "old motors" I assumed you did not have a datasheet.

Post a link to the datasheet so we can see what you can see.

...R

Robin2: Post a link to the datasheet so we can see what you can see.

all I did was Google the part number, the one I posted before.

http://www.datasheetspdf.com/mobile/918417/PH268-21.html it's just the one page.

I also found this image of the back of the motor https://gsaauctions.gov/clsauctions/regn8/81QSCI17088021D.jpg

Katemonster33:
The resistance is about 7.5 ohms.

Well the motor plate says its 3.6 ohms (5.4V / 1.5A), but I think that’s when used unipolar (its a 6 wire
motor?), so its 3.6+3.6 = 7.2 ohms when used bipolar.

For bipolar use it will need 18V or higher supply for a chopper driver because the IR product is 11V,
giving no voltage headroom at all for the chopper - that’s why its misbehaving with the chopper driver I think,
the current feedback isn’t working properly due to insufficient supply voltage.

It also explains why it hasn’t completely fried the DC motor shield.

Many steppers are more like 1 to 3 ohms and don’t work without choppers from reasonable supply voltages.

BTW if you want a more professional way to control this machine LinuxCNC is probably the way to go, see https://forum.linuxcnc.org/forum