Vous êtes sur la page 1sur 12

HY-DIV268N-5A Stepper Driver

These are my engineering notes when evaluating the HY-DIV268N-5A stepper driver. The performance of the
These are my engineering notes when evaluating the HY-DIV268N-5A stepper driver. The
performance of the driver was not what was expected. Therefore I did some reverse engineering
and modifications to see if I could rectify the situation. The bottom line is that this stepper driver is
a bit of junk. But with some persistency and work it is possible to make it work correctly.

The HY-DIV268N-5A can be seen in figure 1. The driver is based on the TB6600HG IC from Toshiba. See reference 1. The device can be purchased from eBay and Amazon among other sources.

can be purchased from eBay and Amazon among other sources. Figure 1, HY-DIV268N-5A device The problem

Figure 1, HY-DIV268N-5A device

Amazon among other sources. Figure 1, HY-DIV268N-5A device The problem I had with the driver was

The problem I had with the driver was missing/added pulses. The motor was also very noisy. The stepper motor did not position itself on the correct position. For example if I did rotate the motor X number of steps CW and then X number of steps CCW I expected the stepper motor shaft to be in the same position. That was not the case. If I repeated the movement X steps CW and X steps CCW a number of times I could note how the position did varied. Sometimes the offset was positive and sometimes the offset was negative. The conclusion was that steps was added or subtracted in a more or less random way.

I was using micro stepping with a factor 16 to get smooth movements. The stepper motor used need 200 pulses per revolution, so with micro stepping this becomes 3200 pulse/revolution. The pulse input train to the stepper driver was first examined. No missing steps, more or less perfect timing and smooth start and stop.

After some measurements I could conclude that the stepper motor had made up to +/- 180 steps wrong during the repeated movement for about 150 times. Therefore I looked into the stepper driver and disassembled it and found the picture to the right in figure 1.

The first thing I did was to make a check of the +5 Volt internal power supply provided by the

TB6600HG. I did measure the on pin 8 of the 6N137 opto coupler for the step circuit (the lower one in figure 1, right).

The power supply line for the opto coupler look like picture in figure 2. This is more or less a disaster. This was measured without any connection to the optocouplers, just the motors and the supply was connected. I tested a number of different 24 Volts power supply’s but the problem persisted.

24 Volts power supply’s but the problem persisted. Figure 2, voltage spikes on 5 volt power

Figure 2, voltage spikes on 5 volt power supply

All the time I used a 24 Volt external power supply for the device with sufficient current capacity. One I used could deliver up to 60 Amps at 24 volt.

Note that the frequency of the spikes are 41.9 KHz, this is the same as the IC chopper frequency.

I modified the circuit board and bypassed the power supply with 0.1 uF capacitors at strategic points. Then I redid the measurement above and got this picture, se figure 3.

the measurement above and got this picture, se figure 3. Figure 3, spikes after modification SM6FIE,

Figure 3, spikes after modification

The yellow trace is the 5 volt power supply and the blue line is the output from the “Step” opto coupler collector output. This is clearly much better but far from perfect.

The next thing I suspected was that there was ripple on the Vref signal. A check with the oscilloscope gave the picture as in figure 4.

check with the oscilloscope gave the picture as in figure 4. Figure 4, Vref pin signal

Figure 4, Vref pin signal

The voltage level, 1.94 volt is according to the datasheet for TB6600HG (0.3V ≤ Vref ≤ 1.95V). But the spikes shouldn’t be there. The Vref circuit looks like this, see figure 5:

be there. The Vref circuit looks like this, see figure 5: Figure 5, modified Vref circuit

Figure 5, modified Vref circuit

I added C5 and C6 to filter the reference voltage. I have also changed R11, R12, R13 and R14 so that the possible span of the Vref will be within the limits stated in the datasheet (0.3V ≤ Vref ≤ 1.95V).

After this and checking the Vref voltage again with the oscilloscope I got the waveform as in figure 6. This is clearly an improvement.

the waveform as in figure 6. This is clearly an improvement. Figure 6, Vref after adding

Figure 6, Vref after adding C5 and C6

I had the suspicion that the Vref have a limit current capability. Therefore I moved the supply of the LED2 to the 24 volt supply with an additional resistor of 8.1 K (R32). I also removed D1 from to be in series with the 24 volt supply line to be connected with the anode to ground and cathode to the +24 volt supply line. I also added 0.1 uF ceramic capacitors to the 24 volt line (C20, C21, C22) see figure 7.

capacitors to the 24 volt line (C20, C21, C22) see figure 7. Figure 7, modification of

Figure 7, modification of the supply

The above modifications had a profound influence on the Vreg and 24 volt supply ripple.

Finally I changed the supply of the LED’s (Power, Step). The LED’s where supplied by the Vreg +5 Volts. However, on good grounds you can suspect that the Vref has a very limited current capacity. Therefore I moved the LED’s to be supplied by the 24 Volt supply instead. To do this I had to add some resistors to limit the current. I found it easier to add resistors instead of changing the original ones.

Current Switch Settings

Switch settings label are wrong on the protection cover. The correct settings for S4/S5/S6 (step size) are as in figure 8. This manufacturing error is remarkable.

S6

S5

S4

 

On

On

On

Standby

On

On

Off

1/1

On

Off

On

1/2A

On

Off

Off

1/2B

Off

On

On

1/4

Off

On

Off

1/8

Off

Off

On

1/16

Off

Off

Off

Standby

Figure 8, S4/S5/S6 settings

Changes made (modifications)

Below is a summation of the changes that I made to the circuit. See the schematics in appendix. The schematics shall reflect the changes I made. I have tried to keep the same identifications for resistor, capacitors etc. as in the schematics that can be found on the net, see appendix (links).

that can be found on the net, see appendix (links). Figure 9, modifications, Top view Referring

Figure 9, modifications, Top view

Referring to figure 9 (top view of the PCB) I made the following modifications:

T1. Added decoupling capacitors to Vref C5, C6 T2. Changed LED2 to be supplied by +24 volt, added R32

T3. Added decoupling capacitor to +24V, C20 T4. Changed R23 to 15K T5. Changed D1 to be between ground and +24 Volt and placed a jumper between J3/1 and trace to Vcc-A and Vcc-B. T6. Ground test point for measurements T7. Test points for 6N137

Ground test point for measurements T7. Test points for 6N137 Figure 10, modifications, bottom view Referring

Figure 10, modifications, bottom view

Referring to figure 10 (bottom view of the PCB) I made the following modifications:

B1.

Added Decoupling capacitor C21

B2.

Added Decoupling capacitor C4

B3.

Added Decoupling capacitor C23

B4.

Added Decoupling capacitor C24

B5.

Added Decoupling capacitor C25

B6.

Replace resistor with 330 ohms

B7.

Added Decoupling capacitor C22

B8.

Replace resistors R24, R25, R26 and R27

B9.

Added Decoupling capacitor C20

B10.

Made a “heavy” ground connection

B11.

Added Decoupling capacitor C20

Summarize of changes:

1. Changed D1 to be not in series with power +24 Volts. Instead D1 is connected with cathode to +24 V and anode to ground.

2. Added C20, C21, C22 to +24 volt supply

3. Added C23, C24, C25, C26 to Vreg supply

4. Changed R3, R4, R5 to 330 ohm (was 51 ohms!), Important!!

5. Modified Vref circuit to be according to datasheet. R23 = 15K, R25 = 2.2K, R26=1.5K and

R27=1K

6. Changed LED1 (Step indicator) to be supplied by 24 Volt. Added R26=12K

7. Changed LED2 (Power) to be supplied by 24 Volt, added R31

8. I didn’t do this but changing R7 and R8 to 2.2 K is a good idea to increase noise immunity.

9. Ground all system devices (motion controller, power supplies, driver etc.) in a star fashion

(common point).

Test of modification

I did some measurements before and after the modifications. The test setup for the Y-axis is shown in figure 9. The stepper motor moves the Y-Axis sleigh between the A and B position. At the start the Y-axis is set to the A position, see figure 10. The indicator clock is set to zero at this position. A G code macro program is executed. The macro program moves the sleigh to the B position and waits there for one second. Thereafter the sleigh is moved back to position A. When it has stopped at position A the macro program sends a signal to the PIC32MX microcomputer to obtain the value of the indicator clock. Due the fact that the same distance is moved in the negative Y-direction as in the positive Y-direction the indicator clock should be zero.

the positive Y-direction the indicator clock should be zero. Figure 9, test setup If the stepper

Figure 9, test setup

If the stepper has jammed, pulses to the stepper has been missed etc. the value of the indicator clock will not be zero. That is to say that we have an offset error. The sequence above is repeated and each time the Indicator clock value is collected. Furthermore, the number of stepper pulses is counted by the PIC32MX as well as the timing for each pulse. The max and minimum periods for the pulse train is saved. This information is transferred via USB to the PC#1 and saved to a database for analyze.

Figure 10, Y-axis test movements Two tests were done. One test was done before modifications

Figure 10, Y-axis test movements

Two tests were done. One test was done before modifications and one after the modifications. The result can be seen in figure 11.

The ripple in the graph for the modification is maximum 4 microns (4E-6 meters). The setup is very sensitive to temperature, vibrations etc. So in reality the result after the modifications is almost a straight line, which is to say nearly prefect. The feedrate was as I remember 750 mm/minute during the test.

Error (Micron)

Test before and after Modifications

120

100

80

60

40

 

No Mod

20

 

With Mod

0

-20

-40

 

Test #

-60

0

50

100

150

200

Figure 11, tests before and after modifications

Stress Test

I decided to do a stress test and see how far I could go when setting feedrate and feed acceleration. I must admit that I got figures so high that I didn’t care to go further. The final feedrate I tested was at

4000 mm/min with an acceleration of 110 mm/s2, this without any significant errors. I’m impressed by this. See figure 12.

Note that the stepper pulses are about 10 uS in this case (with feedrate 4000 mm/min). So we have a frequency of about 100 KHz. The eCut motion controller is specified up to 200 KHz. However the TB6600HG IC, the brain in the stepper driver has a minimum pulse length of about 5 uS. SO we are approaching the specification limits.

The ripple of +/- 2 micron around the zero line is probably due to measurement errors induced by the sensor, temperature, vibration in the room when I am moving around etc. Remember 1 micron is

a very short distance. You have to have one million microns to get one meter.

Stress Test, eCut FR4000

Error Microns

20

15

10

5

0

-5

-10

-15

 

Test #

-20

0

100

200

300

400

500

600

Figure 12, Stress test

I made a video that I uploaded to YouTube that shows the measurement of the above graph. The link

is:

http://youtu.be/65_4ZUPfGNU

In the video you can get a feeling how fast the Y-axis is moving as well as the acceleration of the axis.

I did time how long it took to travel 30 mm, including acceleration and deceleration. I got the time to be more or less exactly one second.

Regards

/BG

Document version: 1.1 Date: 2015-04-08 16:43

Document name: HY-DIV268N-5A Stepper Driver.docx

6147

5464

2015-04-06 19:30 Create: 2015-04-03 01:48 Bo Gärdmark

Appendix

Good Links:

TB6600HG datasheet:

http://download.siliconexpert.com/pdfs/2012/7/3/0/23/22/201/tos_/manual/tb6600hg_summary_

en_20120119.pdf

Thread: Haoyu TB6600:

http://www.cnc-arena.com/en/forum/haoyu-tb6600--187150.html

Thread: TB6600 drive from EBAY, this is a very good discussion about the TB6600. I’m thankful for the input I got from reading this thread.

http://www.cnczone.com/forums/stepper-motors-drives/186930-tb6600-drive-ebay-15.html

Schematics Haoyu TB6600:

http://www.cnczone.com/forums/attachment.php?attachmentid=190090&d=1372455055

LeadShine, good Stepper Drivers:

http://www.leadshine.com/productdetail.aspx?type=products&category=stepper-

products&producttype=stepper-drives&series=DM&model=DM556

Video, Stress Test of HY-DIV268N-5A Stepper Driver:

http://youtu.be/65_4ZUPfGNU

Schematics of HY-DIV268N-5A Stepper Driver:

See last page in this document!

LED2 Vreg Vreg R26 Power LED1 12K R14 4.7K R29 C2 C4 R32 R6 R7
LED2
Vreg
Vreg
R26
Power
LED1
12K
R14
4.7K
R29
C2
C4
R32
R6
R7
R8
100u
0.1u
8.1K
+24V
Step
2K
4.7K
4.7K
10K
R15
U3
Enable
R3
C3
2K
J3
1
A
C
4
R25
10u
1
330
10K
2
2
3
R9
Q1
Vreg
K
E
Power (24V)
PC817
4.7K
U4
R23
R28
C5
0.1u
15K
15K
J2
U1
1
2
Step
R4
21
Step
3
2
7
22
16
Dir
Out 1A
J1
4
18
330
Enable
5
14
1
Out 2A
6
3
6
3
2
TQ
19
12
3
Reset
Out 1B
CONN-SIL6
4
4
Latch
6N137
10
Out 2B
7
Stepper A/B
M1
8
15
Q3
Vreg
M2
NFA
9
M3
11
U2
NFB
C8
5
Vref
Direction
R5
2
7
23
0.1u
Osc
330
TB6600HG
3
6
R13
47K
6N137
Vreg
R24
R25
R26
4.7K
2.2K
1.5K
C5
C6
R29
Q3
0.1u
1u
SW1
SW2
SW3
Q4
R27
2K
1K
R31
C7
C6
2K
0.1u
0.1u
DATE:
2015-04-07
FILE NAME:
Hy-DIV268N-5A Stepper Driver.pdsprj
TIME:
19:22:31
DESIGN TITLE: Hy-DIV268N-5A Stepper Driver.pdsprj
PAGE:
1
of
1
BY:
@AUTHOR
SM6FIE
REV:@REV
PATH:
D:\Mina Dokument\Projekt\Electronics Designs\CAD-CAM\CNC3020\Stepper and ctrl replace\Documentation\HY-DIV268N-5A Reverese Engineering\Hy-DIV268N-5A Step
Step
R30 10K
R30 10K
85
85
Step
C23
0.1u
C24
0.1u
R20 330K
R17 10K
C25
0.1u
R21 330K
R18 10K
C26
0.01u
R22 330K
R19 10K
M1
SW6
M2
SW5
M3
SW4
25
Mon
+24V
2
1
S-Gnd
Alert
17
A-Gnd
24
Vreg
13
20
B-Gnd
Vcc
6
Vcc A B
C1
4700u
R2 0.22
C20
0.1u
R1 0.22
D2FR307
C21
0.1u
D3FR307
C22
0.01u
D4FR307
D5FR307
D1FR307