Sie sind auf Seite 1von 12

HY-DIV268N-5A Stepper Driver

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.

Figure 1, HY-DIV268N-5A device

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
SM6FIE, Bo Grdmark, Gothenburg Sweden
Email: bag@agnitumit.se, web: www.spectron.us/SM6FIE
Copyright 2009, all rights reserved, Read the EULA and safety warnings on web site
HY-DIV268N-5A Stepper Driver.docx, 2009-03-08 17:33, page: 1 (12)

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 supplys but the problem persisted.

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.

Figure 3, spikes after modification

SM6FIE, Bo Grdmark, Gothenburg Sweden


Email: bag@agnitumit.se, web: www.spectron.us/SM6FIE
Copyright 2009, all rights reserved, Read the EULA and safety warnings on web site
HY-DIV268N-5A Stepper Driver.docx, 2009-03-08 17:33, page: 2 (12)

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.

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 shouldnt be there. The Vref circuit looks like this, see figure 5:

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).

SM6FIE, Bo Grdmark, Gothenburg Sweden


Email: bag@agnitumit.se, web: www.spectron.us/SM6FIE
Copyright 2009, all rights reserved, Read the EULA and safety warnings on web site
HY-DIV268N-5A Stepper Driver.docx, 2009-03-08 17:33, page: 3 (12)

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

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.

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 LEDs (Power, Step). The LEDs 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 LEDs 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.
SM6FIE, Bo Grdmark, Gothenburg Sweden
Email: bag@agnitumit.se, web: www.spectron.us/SM6FIE
Copyright 2009, all rights reserved, Read the EULA and safety warnings on web site
HY-DIV268N-5A Stepper Driver.docx, 2009-03-08 17:33, page: 4 (12)

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
On
On
On
On
Off
Off
Off
Off

S5
On
On
Off
Off
On
On
Off
Off

S4
On
Off
On
Off
On
Off
On
Off

Standby
1/1
1/2A
1/2B
1/4
1/8
1/16
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).

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
SM6FIE, Bo Grdmark, Gothenburg Sweden
Email: bag@agnitumit.se, web: www.spectron.us/SM6FIE
Copyright 2009, all rights reserved, Read the EULA and safety warnings on web site
HY-DIV268N-5A Stepper Driver.docx, 2009-03-08 17:33, page: 5 (12)

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

Figure 10, modifications, bottom view

Referring to figure 10 (bottom view of the PCB) I made the following modifications:
B1.
B2.
B3.
B4.
B5.
B6.
B7.
B8.
B9.
B10.
B11.

Added Decoupling capacitor C21


Added Decoupling capacitor C4
Added Decoupling capacitor C23
Added Decoupling capacitor C24
Added Decoupling capacitor C25
Replace resistor with 330 ohms
Added Decoupling capacitor C22
Replace resistors R24, R25, R26 and R27
Added Decoupling capacitor C20
Made a heavy ground connection
Added Decoupling capacitor C20

SM6FIE, Bo Grdmark, Gothenburg Sweden


Email: bag@agnitumit.se, web: www.spectron.us/SM6FIE
Copyright 2009, all rights reserved, Read the EULA and safety warnings on web site
HY-DIV268N-5A Stepper Driver.docx, 2009-03-08 17:33, page: 6 (12)

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 didnt 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.

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.
SM6FIE, Bo Grdmark, Gothenburg Sweden
Email: bag@agnitumit.se, web: www.spectron.us/SM6FIE
Copyright 2009, all rights reserved, Read the EULA and safety warnings on web site
HY-DIV268N-5A Stepper Driver.docx, 2009-03-08 17:33, page: 7 (12)

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.

Test before and after Modifications

Error (Micron)
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 didnt care to go further. The final feedrate I tested was at

SM6FIE, Bo Grdmark, Gothenburg Sweden


Email: bag@agnitumit.se, web: www.spectron.us/SM6FIE
Copyright 2009, all rights reserved, Read the EULA and safety warnings on web site
HY-DIV268N-5A Stepper Driver.docx, 2009-03-08 17:33, page: 8 (12)

4000 mm/min with an acceleration of 110 mm/s2, this without any significant errors. Im 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
SM6FIE, Bo Grdmark, Gothenburg Sweden
Email: bag@agnitumit.se, web: www.spectron.us/SM6FIE
Copyright 2009, all rights reserved, Read the EULA and safety warnings on web site
HY-DIV268N-5A Stepper Driver.docx, 2009-03-08 17:33, page: 9 (12)

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 Grdmark

SM6FIE, Bo Grdmark, Gothenburg Sweden


Email: bag@agnitumit.se, web: www.spectron.us/SM6FIE
Copyright 2009, all rights reserved, Read the EULA and safety warnings on web site
HY-DIV268N-5A Stepper Driver.docx, 2009-03-08 17:33, page: 10 (12)

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. Im 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=stepperproducts&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!

SM6FIE, Bo Grdmark, Gothenburg Sweden


Email: bag@agnitumit.se, web: www.spectron.us/SM6FIE
Copyright 2009, all rights reserved, Read the EULA and safety warnings on web site
HY-DIV268N-5A Stepper Driver.docx, 2009-03-08 17:33, page: 11 (12)

Vreg

0.1u

0.1u

R14

C3

2K

8.1K

4.7K
+24V

J3
1
2

SW4
M3

SW6

SW5
M2

C5

C6

0.1u

1u

D1

0.01u

C22

0.1u

C21

FR307

D5
FR307

D2
R25

R26

4.7K

2.2K

1.5K

SW1

SW2

SW3
R27
1K

R31
2K

R30 10K

0.1u

0.1u

R24

2K

C6

4700u

47K

M1

R22 330K

R21 330K

R20 330K

R30

10K

Q3

R29

0.1u

D4

TB6600HG

R13

Vreg

C7

C20

Vreg
Vcc A
Vcc B
11

FR307

Osc

Stepper A/B
15

D3

R17 10K

NFB
Vref

10

6N137

NFA

12

FR307

23

Out 2B
M1
M2
M3

1
2
3
4

FR307

0.1u

Out 1B

J1

14

R1 0.22

330

Out 2A
TQ
Reset
Latch

Power (24V)

16

13

Direction
2

C8
R19 10K

U2

7
8
9

Vreg

Q3

R18 10K

6N137

CONN-SIL6

U4

R2 0.22

3
19
4

A-Gnd

Out 1A

17

Step
Dir
Enable

S-Gnd

21
22
18

U1

Step
2

24
20
6

15K

B-Gnd

R28

15K

Mon
Alert

0.1u

R23

25
1

4.7K

330

Step

0.1u

Q1

R9

Vreg

Step

C5

J2

Q4

100u

C1

3
K
PC817

R5

R32

10K
2

R4

C4

R25

10u

330

1
2
3
4
5
6

C2

10K

R15
C

+24V

0.01u

Step

Enable

Power

R29

C26

4.7K

C25

R8

4.7K

C24

R7

2K

C23

0.1u

U3
1

R6

12K

LED1

LED2

Vreg

R26

R3

FILE NAME:
Hy-DIV268N-5A Stepper Driver.pdsprj
DESIGN TITLE: Hy-DIV268N-5A Stepper Driver.pdsprj
@AUTHOR
SM6FIE
BY:
PATH: D:\Mina Dokument\Projekt\Electronics Designs\CAD-CAM\CNC3020\Stepper

DATE: 2015-04-07
TIME: 19:22:31
PAGE: 1 of 1
REV:@REV

and ctrl replace\Documentation\HY-DIV268N-5A Reverese Engineering\Hy-DIV268N-5A Steppe