Author Topic: TB6600 stepper driver problems  (Read 24000 times)

0 Members and 1 Guest are viewing this topic.

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
TB6600 stepper driver problems
« on: December 07, 2015, 01:23:05 pm »
I'm making a stepper driver using the TB6600 driver chip.

When testing it with a small stepper it appared to work perfectly on the first try, but when doing some more testing I discovered two problems:

1. The stepper draws less current than I was expecting. Since the the chip limits the peak current, while the multimeter probably measures something close to the RMS current I was expecting the measured current to be ~.7 times the set curent. The current I measure is .45 to .5 times the set current, even when full stepping slowly or holding position. Not sure if this is a real problem or a bad assumption on my part.

2. If I limit the (measured) current to less than ~.7A everything appares to work correctly. It doesn't matter if I limit it using the Vref voltage or activating the current reduction. If the current is higher than this the motor loses steps, stalls or doesn't move at all. It doesn't just do this at high speed or high load but even when the unloaded motor is stepping very slowly.

Any ideas what might be causing this or suggestions for what I should be checking?

I have tried two power supplies 12V (14A max) and 36V (10A max) with the same result. Voltage in to the driver board does not drop under load.
I have tried two different TB6600 chips, same result.
The sense resistors are thick film resistors, so I don't think inductance should be a problem.
I didn't have a low ESR 47uF cap, so i used a low ESR 330uF 63V cap instead (EKYB630ELL331MJ25S).

A couple probably unrelated questions which I have not found clear answers to:
-The OSC frequency can be set from 20kHz to 60kHz, with the datasheet specifying 40kHz as typical. What would be the expected effects of using a frequency closer to 20 or 60kHz?
-The block diagram does not show any internal back-EMF diodes nor does the typical circuit diagram show any external back-EMF diodes. Does this chip require external back-EMF diodes?

Datasheet: http://www.mouser.com/ds/2/408/TB6600HG_datasheet_en_20140109-771376.pdf
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 952
  • Country: se
Re: TB6600 stepper driver problems
« Reply #1 on: December 07, 2015, 02:06:40 pm »
Hi,
Where are you putting your multimeter when you're measuring the current? In series with the supply or in series with the actual motor winding?

If it's in series with the supply then you have to realise that the drive pretty much acts as a step down converter. The power drawn from the supply will be equal (a bit higher due to losses of course) to the power being put into the motor but since the voltage at the supply is higher than the avergage voltage that the motor sees the average current drawn from the supply is lower than the average current in the motor winding. If you decrease the power supply voltage while the motor is running at a certain speed I think you'll see the current drawn from the supply will increase.

Increasing the chopper frequency decreases the current ripple and makes for a smoother average current but it increases the switching losses. High power supply voltage with low inductance motor windings makes the current increase/decrease faster which can warrant a higher chopping frequency. Decreasing the chopper frequency has the opposite effect. With that said "most" drivers I've come across use around 20kHz.

EDIT: What value are you using for the sense resistors?
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: TB6600 stepper driver problems
« Reply #2 on: December 07, 2015, 02:19:45 pm »
Where are you putting your multimeter when you're measuring the current? In series with the supply or in series with the actual motor winding?

Thank you for your reply.

In series with the supply, I will try to connect the multimeter in series with one of the motor phases.

Quote
EDIT: What value are you using for the sense resistors?

I use two 330mOhm resistors in parallel, so 165mOhm.
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 952
  • Country: se
Re: TB6600 stepper driver problems
« Reply #3 on: December 07, 2015, 02:33:50 pm »
Quote
In series with the supply, I will try to connect the multimeter in series with one of the motor phases.
It probably won't give you an accurate reading due the waveforms involved but give it a try. Otherwise, use a scope and look at the voltage across the sense resistors.

Quote
If I limit the (measured) current to less than ~.7A everything appares to work correctly.
Well, as before, you can't really get an accurate reading of the actual motor current by measuring the power supply current so that 0.7A figure doesn't tell you much.

Quote
I use two 330mOhm resistors in parallel, so 165mOhm.
OK, so then you need a voltage at VRef of ~0.5V/A of motor current. With the voltage divider values in your schematic you're should have a voltage at VRef of around 1V therefor asking for a peak current of around 2A. Does that match up with your expectations?

 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: TB6600 stepper driver problems
« Reply #4 on: December 07, 2015, 03:16:58 pm »
Quote
If I limit the (measured) current to less than ~.7A everything appares to work correctly.
Well, as before, you can't really get an accurate reading of the actual motor current by measuring the power supply current so that 0.7A figure doesn't tell you much.

I will make some measurements tonight so that I can answer your other two questions, hopefully I can get some good readings with the scope across the sense resistors. But I think it is significant that the motor loses steps/stalls/fails to run as the current is increased even if the measurement of the current when this starts to happen is innacurate.
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 952
  • Country: se
Re: TB6600 stepper driver problems
« Reply #5 on: December 07, 2015, 03:45:22 pm »
Quote
But I think it is significant that the motor loses steps/stalls/fails to run as the current is increased even if the measurement of the current when this starts to happen is innacurate.
I was thinking that you may be massively overdriving the motor windings into saturation or something which could cause it to not work reliably. You generally don't want the voltage at the VRef pin to be much higher than [motor rated current] x 3 x [sense resistance].
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: TB6600 stepper driver problems
« Reply #6 on: December 07, 2015, 08:27:21 pm »
H.O,

I see that the schematic I uploaded doesn't have the correct values for the voltage divider resistors: R12=4.7K and R10=3.3K.
This should give Vref=1.94V, measured Vref=1.91V.
Calculated peak current: (1.91V/3)/0.165ohm=3.85A
Measured +/- 600mV peak with the oscilloscope across the sense resistors: 0.6V/0.165ohm=3.64A, quite close to the calculated value.
(A multimeter in series with one of the motor's phases measured from 1.1A to 3.1A. The multimeter was all over the place while the scope gave consistent readings, so I wouldn't trust it much.)
The motor (23HS45-3008D) is an 8 wire type rated at 4.24A with the two windings in parallel.

I also measured with current reduction enabled. I got 210mV across the sense resistors on the scop, corresponding to a current of 1.27A.
When running the motor at full current it was very erratic, moving a bit then stalling then reversing direction several times. With current reduction enabled I ran smootly in one direction apparently without missing any steps. All measurements while fullsteping at ~100Hz. Chopper frequency 35.7kHz.

I think question 1 is solved, the current is as expected, I was just measuring it incorrectly.
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 952
  • Country: se
Re: TB6600 stepper driver problems
« Reply #7 on: December 08, 2015, 06:08:22 am »
Yes, those numbers makes sense and I think your circuit is working as expected.
At full current it MAY just be that the motor is resonating/ringing too much to be able to keep "in sync".
Have you tried to going to 1/2-step or 1/4-step and/or ramping the step frequency up past 100Hz, perhaps your right in the resonating zone at frequency.
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: TB6600 stepper driver problems
« Reply #8 on: December 08, 2015, 10:43:02 am »
At full current it MAY just be that the motor is resonating/ringing too much to be able to keep "in sync".
Have you tried to going to 1/2-step or 1/4-step and/or ramping the step frequency up past 100Hz, perhaps your right in the resonating zone at frequency.

At first I thought this was a mid band stability issue, but it seems completely independent of stepping frequency. Maybe there can be other resonance issues? I will read up on stepper resonance/ringing.

I have tried 1/2, 1/4, 1/8, 1/16-step and higher/lower steping frequencies. Normally I start it at the highest speed I can without stalling it and then ramp up, but I kept the speed constant while measuring current to remove one variable.

I think the next step is to try a different stepper. I have some 3A steppers (Edit: 2.12A, 3A is unipolar rating) on my CNC mill, I will try connecting one stepper to the TB6600 driver and see how it performs. (After changing the current to 2.12A.)
« Last Edit: December 09, 2015, 08:44:25 am by Emil »
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: TB6600 stepper driver problems
« Reply #9 on: December 09, 2015, 08:45:40 am »
I tested the driver yesterday with two other steppers:
One was a 1.68A NEMA17, which worked perfectly up to 2800rpm.
Then I tried it on a 2.12A NEMA23 motor (23HS30-3006D) which is mounted on the X-axis of my Taig CNC mill. It ran perfectly at 600rpm. I have not tried running it faster yet, but it will be interesting to compare the performance to what I get with the driver I normally use on the mill.

So it appares the driver is actually working, just not with the 23HS45-3008D motor. Maybe I will try a flywheel, might help if it is a resonance problem.

Thank you very much H.O for helping me with this.
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 952
  • Country: se
Re: TB6600 stepper driver problems
« Reply #10 on: December 09, 2015, 10:06:43 am »
Great  :-+
Another possibillity is of course electrical noise - which of course increases with increased current. I see on your PCB layout that your step-signal runs right next to the sense for the bridges. Perhaps noise is getting into the step and/or direction line or, since you're returning both power and logic signals thru the same ground plane, it might be noise on the logic ground. I don't THINK it is but it might be worth investigating.
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: TB6600 stepper driver problems
« Reply #11 on: December 14, 2015, 10:27:45 am »
Another possibillity is of course electrical noise - which of course increases with increased current. I see on your PCB layout that your step-signal runs right next to the sense for the bridges. Perhaps noise is getting into the step and/or direction line or, since you're returning both power and logic signals thru the same ground plane, it might be noise on the logic ground. I don't THINK it is but it might be worth investigating.

I'm redesigning the board to get more seperation between the signal lines and the sense resisitors / stepper output.

I noticed something interesting:
I get a voltage spike on the Vref pin with the same frequency as the chopper frequency. At the same time as the spike, the voltage on ouput 1A goes low and there is a delay before 1B goes high. At the time scale I was using both appared to happen at  the same time, but I will do some more measurements tonight to see if the spike happens before or after 1A goes low.

The spike (if I remember correctly) is -2V/+4V relative to the set Vreg voltage of 1.05V with enabled and the spike's amplitude increases when turning off current reduction or increasing Vref.

The Vref voltage comes from a voltage divider, dividing the output of a 3.3V linear regulator. I don't see how that could make the spikes, so I think it must come from the TB6600's Vref pin.

I have tried adding a ceramic cap from Vref to gnd, but it actually increases the amplitude of the spike. Maybe a zener or a MOV would work, but I would much rather find and eliminate the cause of the spike than trying to supress it.

 

Online wraper

  • Supporter
  • ****
  • Posts: 19512
  • Country: lv
Re: TB6600 stepper driver problems
« Reply #12 on: December 14, 2015, 10:55:01 am »
Didn't read the whole topic but you should get correct current waveform by trying different combinations on current decay mode inputs, it's very important.
page 6 http://www.glyn.com/data/glyn/media/doc/TB6560AHQ-E_en_090324.pdf

Sorry have read the chip model incorrectly  :palm:
« Last Edit: December 14, 2015, 12:00:49 pm by wraper »
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 952
  • Country: se
Re: TB6600 stepper driver problems
« Reply #13 on: December 14, 2015, 11:02:29 am »
In a circuit like this there are (relatively) high currents being switched fast. This generates noise and the high currents circulating in your ground plane can make "ground" jump "all over the place".
It's possible that the spike you see on the scope isn't actually there and is just a side-effect of HOW you're probing that node. The fact that a cap (which isn't a bad idea anyway) doesn't seem to help at all makes me suspicious...

If you're not already doing so, get rid of the ground lead of your probe and attach the little high freqency springy thingy to the probe. Now probe the Vref node again, prefferably with the probe ground attachement right on the logic level ground pin of the driver chip or, if that's not possible, as close to it as possible.

While redesigning the PCB you may want to try keeping the power ground and low level ground separate and attach them together at a single point only (the power inout terminal for example).
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: TB6600 stepper driver problems
« Reply #14 on: December 15, 2015, 09:56:29 am »
It's possible that the spike you see on the scope isn't actually there and is just a side-effect of HOW you're probing that node. The fact that a cap (which isn't a bad idea anyway) doesn't seem to help at all makes me suspicious...

You where right. The probe is just picking up noise.

Looking at the board I realised I could easily split the ground by making a few small cuts in the ground plane, cut a few traces and put in 2 jumper wires. I noticed the connections from the TB6600 gnd pins to the gnd plane where not as solid as they should have been because I had used spokes rather than solid connection when filling the gnd plane, so fixed that.

The result was interesting. When holding position at 1.3A I can't hear the motor until my ear is 10cm from the motor and it's still very quiet at 3.9A.
But still not running right at high current, randomly making a few steps while holding position. Since it never changes direction or step mode while holding position I think the problem is only with the CLK line.

So I added a cap between the CLK pin and sgnd, much better. Still some problems, but that really reduced it. I tried cutting the CLK trace at both ends and replacing it with a wire, on the assumption that the trace going right next to the sense resistors was the problem: no change or possibly a little worse. Maybe a wire is even better at picking up noise than a trace(?) I will try shielding it so I can be sure if this is really the cause of the problem before geting a new board, to keep the number of 3 week turnaround cycles to a minimum.
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 952
  • Country: se
Re: TB6600 stepper driver problems
« Reply #15 on: December 15, 2015, 11:24:49 am »
Is the MCU driving the CLK pin to both levels or is it possible that it's open source/drain, only driving high OR low and left floating in the other "state"?
The microcontroler driving the TB6660, is it a 3.3V or 5V device? If it's a 3.3V device it reduces the logic level margins since the TB6660 uses 5V logic levels?

More ideas on the layout:
Swap positions on J2 and C4 to get C4 close to U2. I think this will also help with the separation of the two grounds.
Try and see if you can get C2 and C3 closer to their respective pins, possible in between the two rows of pins of the IC (but that would suck from a service perspective) or behind the back row of pins, right next to the pins or at the bottom, or..... and use thinker traces. Their "low side" should be returned to PGND (if you split the grounds)
You could move the sense resistors to the bottom which will "move" the resistors away from logic level stuff and avoid the added indctance of the vias but will give you a double sided load but I don't think this will go to mass production?
Get C1 closer to pin 24 if possible and if you do split the ground C1 should be connected to SGND.

You're making progress, keep it up!
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: TB6600 stepper driver problems
« Reply #16 on: December 15, 2015, 01:22:52 pm »
Is the MCU driving the CLK pin to both levels or is it possible that it's open source/drain, only driving high OR low and left floating in the other "state"?
The microcontroler driving the TB6660, is it a 3.3V or 5V device? If it's a 3.3V device it reduces the logic level margins since the TB6660 uses 5V logic levels?

It's a 3.3V device (STM32F030K6T6). The I/O pins are push-pull capable and configured as push-pull in my firmware. I have not actually measured to verify that they are functioning as push-pull.

The TB6600 requires 2.0V for logic high and 0.8V for logic low so it's compatible with 3.3V logic. I don't think a 5V MCU would do anything to prevent false logic high(?), but should help preventing false logic low?
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 952
  • Country: se
Re: TB6600 stepper driver problems
« Reply #17 on: December 15, 2015, 05:41:02 pm »
Nah, you're probably right - if we're looking at the CLK line only when the circuit is "idle" (ie not stepping) but other signals may idle logic high which could make them more sensitive. I don't know or if it would affect the operation, I'm just thinking out loud. Either way I'd try to probe the signals both when the circuit works and when it doesn't and compare.
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: TB6600 stepper driver problems
« Reply #18 on: December 15, 2015, 08:55:40 pm »
I was thinking about logic levels and made a change in the firmware. I'v been holding CLK low between steps, then pulling high, short delay and low again to step. I changed to keping it high between steps, then pulling low, short delay and high again for each step. Makes a huge difference, I have not observed any problems after making the change.

Edit: Removed the cap from the CLK pin, still works.
« Last Edit: December 16, 2015, 08:14:11 am by Emil »
 

Offline EmilTopic starter

  • Regular Contributor
  • *
  • Posts: 164
  • Country: no
    • ZeptoBit
Re: TB6600 stepper driver problems
« Reply #19 on: December 21, 2015, 06:55:06 pm »
I have designed a new board which I think will be much better than the previous one.

I have seperated signal and power ground and moved all the decoupling caps right up to the pins. I have also added two 10uF ceramic caps at each Vcc pin. I have moved the current sense resistors away from the signal traces and widened all the signal traces.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->