A few specs for the device:
- 2.5 amps per phase
- 24V operation
- no load speed in excess of 2,500 RPM
- microstepping modes
- low total parts count per driver
- reliable optical isolation
Remove these ads by
Signing UpStep 1: Schematic
This is the schematic for my drive. A full sized file can be found at:
http://img695.imageshack.us/img695/5841/tb6560ahqa.png
TB6560_RA.sch313 KB







































Visit Our Store »
Go Pro Today »




This is a very good thread, and thank you for doing the work and sharing it. I have a couple of questions I'm hoping could be answered. I'm using a 24V, 600mA motor along with the TB6560 driver. I'm at a bit of a loss to understand the relationship with drive current into the motor; how the NFa and NFb resistors are set, and what current is observed on the connected power meter.
The motor I'm using is 0.6/600mA. I assume their torque charts are created around the motor "consuming" that current; not more, not less. Is that correct? And is that at idle, and under load?
So, if the stepper IC pins NFa/NFb are set with 0.68 ohm resistors, this should "limit" or "supply" the current to about 700mA. Does this mean in any step mode, full, 1/2, 1/4, etc?
How does the decay rate setting affect motor performance?
Finally, if you have set your IC feedback resistors for some current, let's say 1 amp, and your motor is a 1 amp motor, would you expect to see the power supplies current meter showing 1 amp, or does the nature of the current delivery to the motor shadow what the meter shows?
Sorry for the questions, just want to be clear on the interactions and settings!
Regards,
Gary
Try to look at stepper motors as inductive coils rather than mechanical devices. Because from a motor driver's point of view that is all stepper motors are. So you are half right when you say, " not more" because the motor driver will limit the top current output it delivers. As far as not less goes, that is another matter entirely.
Not less and inductive coils don't mix. Which is to say that inductive coils beg to differ when currents try to change in them. The faster you try to affect this change the more they object to it too! What is worse is the bigger the coil is the more pronounced this behavior becomes.
Smaller coils perform better in stepper motors than larger ones do. Because those smaller coils are less reluctant to change than the bigger ones are. Change occurs with every step, step rate increases as motor speed does.
Your little motors have the unfortunate characteristic of possessing large coils. How can this be you say? They used thin wire and wound a lot of it up. Coil size is determined by the number of windings rather than mass or any other attribute. That is why the current rating for your motor is so low (the wire is thin) but the voltage rating is so high (the wire is thin but it is long). Your motor also has high resistance as a result of it being a long thin wire. But resistance isn't the biggest issue you face, your motor's inductance rated in Henrys is. That inductive reluctance is what your motor driver is going to have to fight against to get your motor to perform at speed.
It is a fight no motor driver can win. On the bright side your motors will be brutes at low speed. Well compared to how they are at higher speed. Everything is relative.
To sum this section up steppers don't so much "consume" current as they reject current in operation. This is why the big boys run servo motors. Servo motors are "normal" steppers aren't.
Current is controlled irrespective of step mode.
The higher the decay the higher the power. Decay is like pull added to push, 0% no pull 100% as much pull as push effectively doubling power.
Connect an ammeter to a stepper motor and from dead stop to full speed you will see the current drawn decrease. This is why stepper motors ultimately stop. They simply run out of power to keep going. It all goes back to inductive reluctance and a diminishing time window to feed power to the coils.
I hope what I've tried to convey helps you out. I know I didn't get a lot of this stuff until I had some hands on with it all. A lot of it is backwards to the way one might think it works.
I cut those heatsinks from one heatsink that was on an old power supply. I wanted them all to match so cutting them all from one bigger heatsink was one way I could do that.
There is a picture here of the circuit breadboarded:
http://cdn.instructables.com/FZ4/Y3RC/GSUT1JFQ/FZ4Y3RCGSUT1JFQ.LARGE.jpg
In it you can see that I soldered wires to each lead so I could plug each wire into the breadboard. No, it wasn't easy.
Though I could help anyone who wished to modify those boards for peak performance.
Heatsinks are one place where it pays to get a little creative. because I know new they can cost a fortune.
The best places I've found to get heatsinks is out of old TVs and monitors, old home stereos, and old computers too. Often heatsinks are the best parts I scavenge when I strip electronics. But I usually have to cut them up to re-purpose in one of my projects. At the very least I usually have to drill and tap new mounting holes in them.
Any extruded aluminum is a potential heatsink, cast not as good. Some window frames are aluminum extrusions. When you've a hacksaw in your hand then you're really hacking.
These ICs make a fair amount of heat when you push them. I can't really say what might or won't work for you. But I do offer up my circuits as examples of what works for me.
To get a TB6560AHQ zip package onto a breadboard I soldered little extension wires to all of the leads, then mounted it inline. I guess I forgot to include it. Let me put links to some in this reply.
http://i.imgur.com/Fgqnu.jpg
http://i.imgur.com/8w8bV.jpg
A bonus picture, my driver with a part of my project:
I'm hoping to use a power supply I salvaged out of an old desktop I had to power the drivers. The motors I have recommend 24V and I'm able to get this by using +12V and -12V lines from the PSU. I started to add the LM7805 but then thought it would be silly considering the PSU also has a +5V line. In trying to decipher the datasheet, I'm assuming the PGNDA and B are the grounds for VMA and B respectively, so I will hook those up to the -12V line and the SGND I will connect to the ground of the PSU. What I'm most unsure of is which of the grounds to connect the referencing current resistors (NFA/B) to. In looking at the block diagram in the datasheet, I'd guess the 0V GND of the PSU (SGND). I also just wanted to run all this by you to see if I'm overlooking something that could devastate the design.
Another thing I was wondering is what frequency did you generate with the 555? I'm shooting for ~15kHz using a 1k and a 4.7k resistors but I don't have an oscilloscope at my disposal. I had everything set up to test yesterday but was only getting periodic vibrations from my motor. That's when I realized the recommended voltage was 24V and I was only using 9V so I'm hoping that was the problem. Also, did you just leave the DIR signal in high-Z during your first test? And what the heck is that thing your adjusting in that video? haha, sorry now I'm just getting carried away.. but I'm not done yet :)
What should the pin configuration be on the DIP switch to get this thing tested? I know the datasheet says to go through a specific power up procedure, but after tha'ts said and done what should the pin config be?
And finally, what's good and bad to see from those LEDs? The one coming from the M0 (PS17) turns on while the other one is off. I thought I read in the datasheet the M0 pin goes low (briefly turning on the LED) on startup and then stays high (turning the LED off). Does that mean something is wrong in my circuit?
Thank you very very much for this guide and any help you can give me! I really appreciate it!
PS. I was able to get some real nice heatsinks out of some old tube TVs. Thanks for that suggestion!
Early on I had power supply issues with my stepper experimentation and it caused me a lot of problems. I had a lot of erratic operation that I could not pin down. No matter which route you go a solid power source is an important part of the equation for success.
I was adjusting the charge resistor on the 555 timer, as I had a potentiometer connected to those pins. 8 and 7? It changes the frequency the 555 fires at. Well one of the pulse widths I believe, which has the effect of changing the frequency, something like that.
Usually if I don't want to hook a scope up to a 555 circuit I use an LED, get it blinking, then go from there. Change the cap, adjust the resistances etc.
If you motor isn't running it is possible you've one of your coils backwards. So reverse the polarity of one coil and see if you begin to get forward motion.
I have not had issues with the power up procedure. I have had issues with reset. If you notice I disallow enabling the feature on my board.
One thing I have learned experimenting with stepper motors is they are difficult to get running from a dead stop. What I mean here is they need to ramp up to speed. This is done in software under computer control. So be aware of this attribute of them. Also in full step mode they are difficult to get running very quickly. They succumb to resonance more easily than in other excitation modes. I think the top speed I have ever achieved in full step mode is 226 RPM.
All of this I guess is a long way of saying try starting to run slowly, in some mode other than full step. Once you get a stepper motor going you can easily increase it's speed, but getting them to "pull out" is problematic. Just their nature. But don't worry so much about that as like I said the software has the ability to ramp the step signal. Still you need to be concerned with it during testing phase.
I put in those LEDs because I have lots of LEDs, and I needed to tie the unused gates off anyways. One flashes as the motor runs, or is more like a pilot light in normal operation, I've yet to see the other ever come on yet, as it is some kind of an error indicator. You can safely omit that part of the circuit but do tie off the unused gate inputs for stability.
Could you go through the pin configurations for your switch when you get a chance? Esp. what they should be to get this thing tested.
Thank you!
I think you are too concerned about the initialization procedure Toshiba talks about in their datasheet. In practice I have completely ignored all of that with no ill effects. I suggest you do the same. Leave your drivers enabled all the time and never ever reset them either. Full step mode is almost worthless for most applications. It may be best to avoid it.
Likely your step clock is too high for motor operation. I have also had some issues with the step pulse width too, anything under 5,000 nanoseconds and my drivers do not run. Without an oscilloscope you are going to have to use your brain more, and think of ways to gather information that will guide you to your goal. (hint: get an LED to flash strongly, then use that as your step clock pulse)
Once you get it working correctly slow then you can speed things up. When I build motor drivers I usually use low current motors for the testing phase too. I like to keep my risks minimized as much as I can. I crawl, then walk, break into a run, then learn how to fly. Some birds that jump straight out of the nest end up as stains on the pavement.
This birdie loves hitting the pavement, isn't that the funnest part?
It turned out to be a miswiring in my timer circuit.. though I don't intend on testing the RESET pin anytime soon..
Off to order another TB6560AHQ..
If there is one thing electronics does for me it makes me question all of my assumptions. Best to keep an open mind.
I figured your step pulses weren't right. You got it going huh? For a little motor driver I am very pleased with the performance I can manage to get out of the ones I have made. But beware making assumptions with the circuit. It is anything but simple.
I could tell you the story about how I was running in quarter step mode when I could have sworn I checked 3 times to make sure I was in half step mode.
How many volts are you running off of? Also, have you measured the current you are drawing holding? Just run the whole circuit through an ammeter. Hot lead off your power supply to meter red, meter black to the positive power in of your circuit. Start off on the 10 amp scale. Better safe than smokey. That will give you a ballpark figure of what you are doing. Then increase the motor's running speed and watch the meter reading drop. Educational. Until you see it happening it doesn't sink in. Works better with an analog meter but digital is OK too I guess.
Oh yeah. Always triple check all wiring. What I do is I use the board view in Eagle software and the eyeball tool in it to highlight each signal wire of a circuit I am building. I call it the any idiot method. Even then I can still make a mistake now and again myself.
I know I didn't supply the Eagle files for a 555 timer circuit with my article, but to be honest today I'd draw one up before I built a circuit. It just makes wiring things so much easier it is worth the effort.
Really the only reason I did this circuit in Eagle was as a drill guide, and to help me wire it up. I never etched boards for this, or even designed the board so it could be etched. But the parts are laid out nicely if I do say so myself :)
Now you are ready for another circuit I've put up. My BOB. Although in use not powered it up it does have this odd backfeed going on with it I've noticed. Plugged into a parallel port one of the power LEDs on it glows dimly. It doesn't seem to hurt anything but I still have not tracked down why it does it as of yet. Still bugs me that it does it.
OK maybe I can call it the plugged in indicator feature not a back feed bug. Nah, that didn't make me feel any better about it. If you make one and figure out why it does that let me know I'd appreciate it.
http://www.youtube.com/watch?v=fHPKaHLzXes
720 RPM go 780 RPM no go. 600 RPM more realistic. Final verdict ... the jury is still out at this time.
Be aware my drivers draw 9 ma for their step and direction inputs. Optocouplers are just pigs. Some parallel ports can drive them directly, but I wouldn't advise doing it. Because I've heard there are others that can't. My BOB puts out 25 ma guaranteed. If things go sour you're only out a 25 cent IC too. This is what makes BOB such a popular guy.
I tested the driver with the 20% current ratio, hooked up to my machine, and things worked well. Then I tried bumping it up to 75% and it worked but didn't sound too healthy and eventually I blew a 1.5 A fuse. After I replaced the fuse I tried running the driver again with my initial weak excitation settings and now, every time, the motor makes a sort of high pitch squeal and the fuse blows almost immediately.. and I've run out of fuses for now. I'm not sure what component has failed.. I hope its not my motor. Any thoughts?
Next get a piece of paper and write down what all the mode switches do like a table. They're not in the simplest order they could be to operate (I made them the simplest rational order to build the circuit). I've even made mistakes setting mine up. So how the switches are arranged is a matter of confusion. Pencil, paper, and drawing a table dispels mysteries. Once you've set your switches where your driver is performing as you like you won't be moving them much after that.
If you selected your current sense resistors for the motors you have you should be able to run at 100% current. You should only run at 100% current. Those current lines are for systems with digital control lines to drive them. Don't play around with them with the switches. If you've the wrong current sense resistors, well that is just wrong. Don't think you can set the current with the on board switches, they're for idling modes, not setting your ultimate current. That is what the current sense resistors are for.
As far as the rest of your settings go the best performance is DECAY 100% and any step mode other than full step. Why not full step? Because I said so. There's other reasons but I'm not going into them here and now.
I don't have my drivers fused, if I did I'd fuse them a bit more than I intended to run them. I don't like blowing fuses. The driver itself should put out a maximum of 3.5 amps depending on how you've configured it with your current sense resistors, not the switches! Forget about the current switches, they're not there for what most think they're there for. They're there so you can digitally reduce your current holding if you have a microprocessor controller to do so.
Now about why you may be blowing those fuses. My gut feeling is you have enabled the RESET line somehow. DON"T EVER ENABLE THE RESET LINE! I made my circuit so the RESET line was hard wired disabled. So you shouldn't be able to enable the RESET line, but I am thinking you somehow managed it. Triple check to make sure RESET is NOT enabled and DON"T EVER ENABLE THE RESET LINE! You'll blow the driver IC sky high. As far as I'm concerned Toshiba should have labeled RESET self destruct. Because that is what it does here. Maybe you miswired the switch bank? Double check it. RESET is the line that gets the hard wire to the pull up resistor. I can't remember if ENABLE is poison or not but just to be safe don't play with it either. I know I never fool with it. Just leave your board enabled.
That is my primary thought, you've enabled RESET, my secondary thought is you are binding up the stepper motor causing it not to run. My third thought is you're messing up with the driver current setting.
Until you've become familiar with the driver bench run a motor, and pinch the motor shaft to get a feel for torque you can develop manipulating different settings. Once you've managed to get good power then drive your machine. Or figure out why your machine still can't drive even with what you could make for it. Break problems down in order to solve them.
What are you using to generate your step signal? The step signal pulse train is pretty critical for proper driver operation too. I don't think it is your immediate problem but it has to be right for your driver to function properly too.
I'm getting discouraged, and having this CNC machine built and not being able to use it is killing me.. plus, if I order more TB6560s I'd get at least 4 more, which after shipping and what not will run me close to $30. And for $10 more I can buy one built.. and I think it would be good for me to see how it is supposed to work before trying to build my own.. so I guess I'm throwing in the towel. Sucks.
So caveat emptor. Their documentation isn't always 100% accurate, or complete.
I'm of the mind that one can never be too careful. Especially with this technical stuff.
Question everything, assume nothing, and verify constantly. Do all that and you should be OK
Good luck, but don't count on luck. Especially with these TB6560 ICs. They like to go up like holiday firecrackers if you're not careful. If nothing else your first attempt should have given you an appreciation of that fact. That is something to walk away with too. I know it isn't what you bargained for, but hey, it's something!
Something a lot of folks that buy the commercial boards don't have from the get go. I like to think you've got a bit more out of it than just that too.
Here is an old video of part of my machine, I raised my step mode to 8th micro-stepping and got it to run even faster. I hit 1.7 IPS or 102 inches per minute after the adjustment. In this video it stops at 1.3 IPS
http://www.youtube.com/watch?v=fHPKaHLzXes
Really a solid power supply is step 1.
The RN is a resistor network. It is just a bunch of resistors together in one package with a common power lead. It, and the DIP switch are there so the various modes of the driver IC can be accessed. The purpose is to limit the current on the control signals.
I call the TB6560 a driver IC.
Today you can buy preassembled TB6560 motor driver boards for cheaper than I can put one together. It is probably a better way to go. Still helps to understand how TB6560s work in order to use those boards effectively though.
Anyhow, good luck, and fully research your options before you commit to any decision. Like I said today making a board like mine probably isn't the best way to go. Although understanding how my board works wouldn't hurt for figuring out how any other board works that uses the same driver IC.
I understand these IC's can do micro-stepping. Is that what they consider excitation mode in the datasheet? I assume so since 2-phase would == full and 1-2 phase would be == half, etc. So that means they can do 1/8 microstepping by using m1 - m2?
I appreciate the schematic, Gives me something to work with. I just want to be able to handle the NEMA 23 ~400 oz-in motors. This chip should handle that easily with the right cooling setup.
http://www.youtube.com/watch?v=GU2GaSMPxNI
But feel free to spend some time probing it all with an oscilloscope. I know I did.
It's also possible that I'm just looking at this from the wrong angle :-)
Thanks
Let us imagine that a stepper motor is like a table set with water glasses. Our glasses can either be short and wide, or tall and thin.
The short wide glasses are the high current low voltage motors. The tall skinny glasses are the high voltage low current ones. The water is either current or magnetic flux depending on if something is being poured in or tossed out.
Now a motor driver is a waiter with a pitcher of water and he's either going to have to serve a table set with short fat glasses around it, or a table of tall skinny glasses. He's going to be able to run around the short fat table of glasses a lot faster than he can the tall skinny ones. Because our waiter is studious and doesn't spill any of his water. Though the guests he is serving immediately pick their glasses up and toss the contents out. How rude!
How fast the waiter runs around is motor RPM.
In order to be an even better waiter our man may upgrade to a pressurized cylinder instead of a plain old pitcher. Now he can really push some water can't he? Voltage is pressure. The catch here is the flux still has to get tossed out. So the wide short glasses still go faster than tall skinny ones.
Now I'm going to stretch this silly analogy just a little further to try to answer your voltage question. As long as our waiter doesn't push his water so hard he breaks a glass, or over fills one then we're still having a polite repast. Other than all the water tossing. The glass itself is our insulation and breaking it is going beyond it's breakdown threshold. Going over the top is exceeding the current limit of course.
Some waiters (motor drivers) are much more talented than others. My motor driver is not the worst cur that has ever served beverages. Though there are ritzier ones. They'll cost you more dearly to hire though.
Wow what an epic cheesy analogy. I do hope I'm forgiven for having posted it. I also hope it helps you see stepper motors from my madcap angle. The reality is more complicated than this is of course, but a lot of the parallels still stand. Like not all of the water tossed out ends up as magnetic flux. I'd be nice if it did!
Just to clarify further, some (most?) components can be damaged by applying too much voltage, even if the current stays relatively low (e.g. static electricity discharge, dielectric breakdown, etc). If I'm not mistaken, one can use the inductance of the motor coils to determine the maximum voltage that can be applied to the coil when switching the direction of current.
Now, in practice, this voltage is probably pretty high (50+ V), so I think I can ignore this effect if I'm using a 24V supply. Does that sound about right to you? I think that the 3rd paragraph from the end in your story is confirming my suspicions.
Thanks again for all your patience. I am not sure I've ever had such detailed and regular reponses online before!