In this article I will describe how I built stepper motor drivers for about $10USD a piece. Included will be a complete schematic, a sample board layout, and links to YouTube videos of the driver running under clock and computer control.

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
If you build these drivers I would appreciate it if you left feedback in the comments section so we all may benefit from your experience.

Step 1: Schematic

This is the schematic for my drive. A full sized file can be found at:


Step 2: Board

This is the board layout I came up with. I wasn't planning on etching it, I only needed parts on a board. I print this out, tape it to a piece of board, drill it, put parts in, then solder them point to point. When I design stuff I keep in mind that I have to make it too so I try to design things I am capable of making. Making this is a little tricky but it can be done. It works too, and I know no one is going to rip my design off for commercial exploitation. Good luck making these in quantity! I made three and that was enough for me for a while.

Link to full sized file:

Pop Quiz: Can anyone see what label is wrong with this? Compare to this:


At least I think that one is right now.

Step 3: Parts

The main component of this circuit is the Toshiba TB6560AHQ Stepper Motor Driver IC. I got mine at Mouser I think it was for $4.79 each. Apparently since I got mine the price has dropped even lower to $4.20 a piece.


These are brilliant little chips. You don't have to mess with surface mount, you can put a heatsink on it easily, they do everything you can possibly ask for with a hobby CNC stepper motor driver. Check out the datasheet:


What hotrods!

The next part of note is the optical isolators. I used Toshiba TLP521-2 because I found them for cheap someplace and they had specs I liked. I'm sure any dual optoisolator will do just fine in its place though. Just make sure your pinout matches it, or adjust your board layout accordingly.

Finally I used a 74LS14 as a buffer to square up my signals because optoisolators can be a little sloppy in that department. My driver board also has its own on board voltage regulator a 7805. I include reverse bias diodes because I have loads of diodes and they never hurt to have. If you want you can skip the diodes by the voltage regulator. Everything else on the board is a passive device, resistors, capacitors, DIP switches, you don't need the LEDs but I would have had to have tied off those unused gates if I didn't include them anyways so I threw them on there.

There are two components I would like to make special mention of on my drivers, the current sense resistors, R5 and R6. You will note there is no value given for those on the schematic because what you use depends on what motor you plan on running off the driver. The formula for determining the proper value for your resistors can be found in the Toshiba datasheet for the TB6560AHQ driver IC on page 10 section 6. Try to use non-inductive resistors for these as well. You will likely pay through the nose getting the right parts for this, more than the IC itself cost! So pay special attention when selecting these for your drivers. I'm using .25 ohm resistors to get me 2 amps per phase current. But you're going to have to figure out what you need for your motor.

Step 4: It's a Runner!

Here are a couple videos of my stepper motor driver going. In the first video I am using a 555 timer to generate clock pulses I feed directly into the step input of the driver. I turn it up until the motor stalls at high speed. Just something stepper motors all do.


I don't know if you could tell or not by just watching the video but it was screaming! Then it jumped up right before the video ended when it rotor locked. That motor weighs a couple of pounds too it is like a brick. All well and good if you want to make say a fan with your stepper motor but lets operate it under computer control now shall we?

In this video the motor will reverse over and over using a fast sloped clock at 800 RPM:


That is about what you can expect to drive your CNC machine at using this driver. maybe a little slower, maybe a little faster, it'd depend on the mechanics of your machine. That folks is what its all about!

The software I'm using to control the motor is called EMC2 and you can get it for free here:


There is none better.

In the future if there is any interest I may put up an article about my port buffer board seen to the right in the attached image. I am also planning on documenting the power supply I run my CNC project with. Though you can use whatever power supply you like. You really can't run these drivers directly from a parallel port because they need more signal current than you can get out of most PC parallel ports.

I'm sure I left out a million little details in my article but that is what the comments section is for. You're starting out with a lot more than I had with just what I've posted already. I went through a lot of trouble experimenting in order to get this circuit to perform as well as it does by looking the second image attached to this page. Also I have not implemented every possible feature of this device as I wanted to keep it simple to make. More can be done!

Really all you should need is the schematic diagram I am providing in order to build this project. I've built three drivers myself and they each run great. If you build this and it really isn't working well for you make sure your signal and power grounds on the TB6560AHQ are not connected directly to one and another but come off of the electrolytic decoupling capacitors C4, C5 and C6. That is what they are there for. They soak up all the noise the stepper motors make when they run so that noise does not propagate and interfere with your control signals.

 I had that problem myself with one of my drivers and it took me quite some time to figure it out. I know on the schematic all the grounds are running together but you cannot physically make this circuit that way or it WILL NOT WORK!

Good luck if you decide to make this driver for yourself. Although if you look closely at the picture of my breadboard you may decide I don't count on luck so much with that copper scatter plate I have attached to the TB6560 there. Ha! These devices do have a reputation for blowing up. I am not sure sure if it is well deserved though, as none have self destructed on me yet.

Do it right, use your head, and it should all work for you too. It works here.
<p>This is it :D</p>
<p>Do symbol V means high voltage (220 VAC) and where he entered the circle Is the 200 VAC</p>
<p>Do symbol V means high voltage (220 VAC) and where he entered the circle Is the 200 VAC</p>
<p>dear friend<br>thanks a lot you made this IC clear to be understood <br>my question : </p><p>when i run blink code with arduino the IC run perfect with delay 1 ms at full step , when change to 1/8 or any value motor just vibrate and when the delay changed also vibrate<br></p>
<p>You may be exceeding your stepper motor's ability to overcome inertia? Stepper motors can only pull out of a standing start so quickly. To go faster you have to start slower, then ramp the speed up. This page discusses the issue some </p><p><a href="http://electronics.stackexchange.com/questions/143731/why-do-we-need-a-ramp-for-stepper-motor">http://electronics.stackexchange.com/questions/143731/why-do-we-need-a-ramp-for-stepper-motor</a></p>
<p>Hello buddy, can i use 3.25Amp unipolar six wire stepper motor with TB6560 shield. Please replay fast its argent </p>
<p>Dear friend</p><p> i am saurabh you can use 3.25 Amp stepper motor but it may be dangerous for this ic because peak Amp 3.5 of ic you use TB6600 and you can convert 6 wire into 4 wire if you want any help you contact me my mail id - hobbyajmer@gmail.com , mobile 9414355858 </p>
<p>Hello buddy, can i use 3.25Amp unipolar six wire stepper motor with TB6560 shield. Please replay fast its argent </p>
<p>Hi fred, </p><p>I bought it from TB6560ahq and I try oriental step motor (pk246pda) but I can not get high speed for example 1300 Rpm (even under no load conditions). Can you help me please. How did you run at 2500 Rpm. My driver is <strong><strong>1PC x TB6560 3A Driver Board.</strong></strong></p><p>Thank you. </p><p>Best Regards.</p>
Hi Fred, I see there is a circuit between your Parallel cable and driver board. What is it? Do you have a schematic for that?Could I sub it for an arduino?
<p>Any circuit that can flash an LED can run these drives too. I am pretty sure Arduino can do that too. You just have to supply a stream of on and off pulses at 12 milliamps to run these. The schematic for my Break Out Board is here:</p><p><a href="https://www.instructables.com/id/Parallel-Port-Break-Out-Board-BOB/" rel="nofollow">https://www.instructables.com/id/Parallel-Port-Brea...</a></p><p>Thanks for the interest, and the comment.</p>
<p>Nice work. Thanks for taking the time to put this together.</p>
<p>Thanks. The drives are running good in my CNC machine. So good they twisted the X axis frame. I am in the process of reinforcing that now.</p>
program run on TB6560 ??? and this circuit configure to pc then running this circuit if i have 3 same type circuit so how to comnnect which pin no on pc side and chch pin i connect moter coz there is 5 pins but we need 4 pins
The TB6560 motor driver accepts step and direction inputs. I use Linuxcnc on my PC. The TB6560 is a bipolar motor driver so it works with motors that have 4, or 8 wires. I don't know what a 5 wire motor is. It might be unipolar or perhaps 5 phase? Neither of those would work with a TB6560. Try to look up the motor's model number on the Internet to find out more information about it.
hi,i have a question,can you help me,i don't understand logicgate NOT at PS17 what to do?can you explain role of Logicgate NOT in your design?thanks <br>
There are no not gates in my circuit. I needed to tie off those inverter gates so I just daisy chained them together. Floating inputs generate noise. I have a lot of LEDs so I felt like using a couple up when I made these motor drivers. I'm pretty sure I explained that part of the circuit in my article.
Hi, <br>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. <br> <br>The motor I'm using is 0.6/600mA. I assume their torque charts are created around the motor &quot;consuming&quot; that current; not more, not less. Is that correct? And is that at idle, and under load? <br>So, if the stepper IC pins NFa/NFb are set with 0.68 ohm resistors, this should &quot;limit&quot; or &quot;supply&quot; the current to about 700mA. Does this mean in any step mode, full, 1/2, 1/4, etc? <br>How does the decay rate setting affect motor performance? <br>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? <br> <br>Sorry for the questions, just want to be clear on the interactions and settings! <br> <br>Regards, <br>Gary <br> <br>
There is no short sweet way I can think of to say this so I'll give you a long winded version of it. Sorry. <br> <br>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, &quot; not more&quot; because the motor driver will limit the top current output it delivers. As far as not less goes, that is another matter entirely. <br> <br>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. <br> <br>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. <br> <br>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. <br> <br>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. <br> <br>To sum this section up steppers don't so much &quot;consume&quot; current as they reject current in operation. This is why the big boys run servo motors. Servo motors are &quot;normal&quot; steppers aren't. <br> <br>Current is controlled irrespective of step mode. <br> <br>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. <br> <br>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. <br> <br>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.
Where did you get those beastly heat sinks? I just got my components in yesterday and am starting this project. I don't actually have a CNC machine built yet but I'll get to that later. Do you think if I just doubled up a pair of these&nbsp;<a href="http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&lang=en&site=us&keywords=345-1021-nd&x=0&y=0" rel="nofollow">http://search.digikey.com/scripts/DkSearch/dksus.dll?WT.z_header=search_go&amp;lang=en&amp;site=us&amp;keywords=345-1021-nd&amp;x=0&amp;y=0</a> with the TB6560 I'd be alright? Also, how were you able to test on a protoboard? The pin configuration on the TB6560 isn't very prototype friendly. I'm thinking I'll have to solder it just to test. Thanks for all of this, its great!
I'm sorry it took me so long to get back to you but this site is no longer sending me any email notifications whenever comments are posted to any articles I have made.<br> <br> 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.<br> <br> There is a picture here of the circuit breadboarded:<br> <br> <a href="https://cdn.instructables.com/FZ4/Y3RC/GSUT1JFQ/FZ4Y3RCGSUT1JFQ.LARGE.jpg" rel="nofollow">https://cdn.instructables.com/FZ4/Y3RC/GSUT1JFQ/FZ4Y3RCGSUT1JFQ.LARGE.jpg</a><br> <br> 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.
Thank you so much for your quick response! It undoubtedly saved me from frying my controller!
Today I would be remiss if I did not bring up the fact that boards are sold for cheaper than I can make drivers myself. They come with substantial heatsinks too. <a href="https://www.instructables.com/id/Building-a-drawer-slide-CNC-machine-for-under-200/?&sort=ACTIVE&limit=40&offset=40" rel="nofollow">A guy on this site</a> claims he got <a href="https://www.instructables.com/files/orig/F3J/VQVD/GUS74I6X/F3JVQVDGUS74I6X.jpg" rel="nofollow">this board</a> for $22 shipped to his door. It is 3 drivers in one, I can't compete with that!<br> <br> Though I could help anyone who wished to modify those boards for peak performance.
I'm a bit committed at this point :)
Well it is not a completely useless exercise as you stand to learn more than when things appear to just work. They won't then hopefully you will figure out exactly why. Gaining much valuable knowledge in the process.
I just checked that link. I don't think those heatsinks would be adequate at all. My heatsinks are good sized and they warm up. I have pretty good luck scavenging heatsinks out of defunct electronics myself. I get a gleam in my eye whenever I spy a nice fat heatsink in some discarded electronics!<br><br>Heatsinks are one place where it pays to get a little creative. because I know new they can cost a fortune.<br><br>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.<br><br>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.
Actually I sawed them all off one heatsink of an old PDP voltage regulation unit. If you look closely at the tab that hangs off them you can see where TO-3 components mounted to them originally. I often modify and re-machine surplus heatsinks for what I need.<br> <br> 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.<br> <br> To get a TB6560AHQ zip package onto a breadboard I soldered little extension wires to all of the leads, then mounted it inline.&nbsp; I guess I forgot to include it. Let me put links to some in this reply.<br> <br> <a href="http://i.imgur.com/Fgqnu.jpg" rel="nofollow">http://i.imgur.com/Fgqnu.jpg</a><br> <br> <a href="http://i.imgur.com/8w8bV.jpg" rel="nofollow">http://i.imgur.com/8w8bV.jpg</a><br> <br> A bonus picture, my driver with a part of my project:<br> <br> <br> <br>
Hola - Estoy interesado en la construcci&oacute;n de una tabla similar para finalmente construir un router CNC. &iquest;Puedes por favor puedes subir la lista de componentes electr&oacute;nicos para comprar? ya que tengo escaso conocimiento de electr&oacute;nica y no entiendo muy bien el diagrama . Gracias!
I have a few questions and I'm not sure if you can help..<br><br> 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. <br><br>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 :)<br><br>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?<br><br>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?<br><br>Thank you very very much for this guide and any help you can give me! I really appreciate it!<br><br><br>PS. I was able to get some real nice heatsinks out of some old tube TVs. Thanks for that suggestion!
Old computer PSUs are unknown quantities. I'm pretty sure that even though they are referenced from ground the +12 and -12V are in fact separate supplies within them. Likely a 7812 and 7912 are supplying both. Unless your application is very lightweight I do not think a computer PSU is going to be adequate to drive steppers. Your power is what the rest of your project runs on, so it is best if you are sure of it. I'm not saying what you're doing cannot work, but if there is any question well lets just say it is one more thing to worry about.<br><br>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.<br><br>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.<br><br>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.<br><br>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.<br><br>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.<br><br>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.<br><br>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 &quot;pull out&quot; 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.<br><br>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.<br><br>
So I noticed I did have the polarity of both coils reversed so I swapped them back.. but when I brought high the reset and enable pins after powering back up my TB6560 started smoking (I heard sounds of sparking but didn't see it)... Could it be because it was trying to start up in full step mode? And does smoke mean I need another TB6560? :)<br><br>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. <br><br>Thank you!
I had severe problems with the reset mode with TB6560 driver ICs so I made my boards so reset could never be selected. See the schematic. I think it puts the H bridge inside the IC into a disallowed state or something. All I know is when I engaged reset my current spiked very high which prompted me to quickly disconnect my circuit from power.<br><br>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.<br><br>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)<br><br>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.
EUREKA! IT WORKS!<br><br>This birdie loves hitting the pavement, isn't that the funnest part?<br><br>It turned out to be a miswiring in my timer circuit.. though I don't intend on testing the RESET pin anytime soon..<br><br>Off to order another TB6560AHQ..
Congratulations! As many times as I've built 555 circuits I can still wire one up wrong. That is why I always use a large value charge cap and blink an LED with it just to make sure it is doing what I think it is doing. Then I change the cap once I know I've got on and off operation going on with it. Check it for a pulse so to speak.<br> <br> If there is one thing electronics does for me it makes me question all of my assumptions. Best to keep an open mind.<br> <br> 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.<br> <br> 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.<br> <br> 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.<br> <br> 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.<br> <br> 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.<br> <br> 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 :)<br> <br> Now you are ready for another circuit I've put up. <a href="https://www.instructables.com/id/Parallel-Port-Break-Out-Board-BOB/" rel="nofollow">My BOB</a>. 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.<br> <br> 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.
Hi, sorry I've been getting my actual CNC machine built. Following a lot of the videos from buildyourcnc.com for the construction. For the driver power supply I used 2 power supplies out of old desktops I had lying around and am getting just under 24V and pretty close to 5V from them. I put an inline fuse of 1.5A from the power supply so I know I'm not exceeding that much, but I haven't tried hooking up my DMM. Actually, I have a clamp-on ammeter around here somewhere I could use. I do intend on building your BOB once I get everything set up though. The final parts for my build should be in by Wednesday and I'm hoping to get it all done within a week.. we'll see. I'll keep you posted!
It all seems easy enough until rubber hits the road. This took me a week to make:<br> <br> <a href="http://www.youtube.com/watch?v=fHPKaHLzXes" rel="nofollow">http://www.youtube.com/watch?v=fHPKaHLzXes</a><br> <br> 720 RPM go 780 RPM no go. 600 RPM more realistic. Final verdict ... the jury is still out at this time.<br> <br> 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.<br> <br>
OK, so it took me 2 weeks to build...<br><br>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?
OK first off until you understand what you're doing don't try to drive your machine yet. You're only making things harder. Run a motor on your bench.<br><br>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.<br><br>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.<br><br>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.<br><br>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.<br><br>Now about why you may be blowing those fuses. My gut feeling is you have enabled the RESET line somehow. DON&quot;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&quot;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.<br><br>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.<br><br>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.<br><br>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 using .39 ohm resistors for my current settings which should give me just under 1.3A. My motors are rated for 1.4 A for bipolar and 2 A for unipolar. I was thinking 1.5A fuses would work since there was .2 A of wiggle room, and I was thinking the timer circuit for the clock pulse and the 74 chip would only use milliamps.. but I actually forgot to consider the main TB6560 beast itself.. I see it's rated for 3.5 A, but I'm not sure how much of that goes to the motor. I picked up more 1.5A fuses last night and I just tried hooking up a different motor with the Current ratio set to 100% and the decay at 100%. I have the excitation mode set to 4W1-2-phase.. though I'm not really sure how to change to 8th microstepping, or any other, as you mentioned below. The new motor kind of hums but doesn't spin. It started doing periodic deeper buzzes, which is what happened to the other motor last night before the first fuse blew. Shouldn't I have the current ratio set to 20% at first like the data sheet says? I'm getting ready to head back to RadioShack to get some 2A and 3A fuses, though I'm a little nervous about using the 3A ones. Thanks for your patience in helping me out, I appreciate it.
You know, the only explanation is that something is borked with the TB6560, because it was working yesterday with the weak excitation and the settings I had before I tried increasing the current ratio, which I did not power down to do. My main concern was that I somehow messed up my motor, but after attempting the same settings as yesterday with a new motor, I get the same results of a blown fuse. For it to work as expected and now not to work as expected on 2 motors it must be the TB6560. And if that is the case, I'm down to 1 left.. which I might keep as a spare for this http://www.ebay.com/itm/TB6560-3-Axis-CNC-Stepper-Motor-Driver-Board-Controller-/251008048912?pt=LH_DefaultDomain_0&amp;hash=item3a713edf10<br>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.
Well I'm pretty up front that today comparable drivers are available at competitive prices. Those commercial drivers come with some downsides too I hear. <br>So caveat emptor. Their documentation isn't always 100% accurate, or complete.<br> I'm of the mind that one can never be too careful. Especially with this technical stuff.<br><br>Question everything, assume nothing, and verify constantly. Do all that and you should be OK<br><br>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!<br><br>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.
I think it might be the TB6560 again, because the TQ1 pin seems to not go high when I switch the DIP switch. I believe it read ~.3 V.. but I didn't write it down and I'm all out of fuses.. There was no smoke tho so I'm hoping it's still good.
I managed to blow up one TB6560AHQ here after I changed my current sense resistors on one of my boards. I think I shorted the motor leads of the driver IC to each other while I was working on it. My garage stank for like 3 days after that IC burnt up. I leave the chip around to remind me to be more careful. It was strange because it blew when I changed step modes, but I could swear I used to change step modes all the time with the driver energized. Anymore I power down before I change any DIP switches on my driver boards. Changing those ICs is a royal pain!<br> <br> 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<br> <br> <a href="http://www.youtube.com/watch?v=fHPKaHLzXes" rel="nofollow">http://www.youtube.com/watch?v=fHPKaHLzXes</a><br> <br>
Ok, well I realize now that using 1 PSU won't do the job as it will only give me ~.7 A. I'm now planning on using two in series, which would eliminate that whole first paragraph from my previous reply.
You should plan on acquiring some kind of dedicated suitable supply. Either making it, or buying it. Weak supplies will cause you all sorts of problems. This stuff is hard enough going with inadequate equipment only makes it that much harder.<br><br>Really a solid power supply is step 1.
So I take it the signals from the controller need to be inverted from what is considered the norm? That is, right now my controller boards accept HIGH signals for the step and direction pins. The norm is HIGH when you want something to happen, From the look of the schematic I will need to output LOW signals on the step and direction pins so that that opto-isolators have a path to ground. Am I right in thinking this? Secondly I don't understand what this &quot;RN&quot; thing is on the lower left part of the schematic. Again I think it is just control signals, RN1-1 through RN1-8 is connected internally through a 4.7K Ohm resistor to RN1. When switching any S2 switch, it is putting HIGH signal to the TB6560? What do you call this part? What is the purpose of the 4.7K Ohm resistor?
The way I did the step and direction inputs is a bit tricky. The optocoupler inverts the signal, but the Schmitt trigger inverts it back, so it is positive logic at the driver IC.<br><br>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.<br><br>I call the TB6560 a driver IC.<br><br>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.<br><br>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 definitely want to make my own. I still am not exactly sure why you did the step/dir setup like you did. Unless you got some clear reason for doing so, I am gonna switch the step/dir wires to the other pin on the input to the opto and instead of using VCC, I will go with GND and remove the inverters all together. <br><br>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?<br><br>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.
Figure out some sort of an idle circuit and that would get you something. Nothing else will. My isolation circuit works to the outer limits of the drive. You'll find nothing else there.<br> <br> <a href="http://www.youtube.com/watch?v=GU2GaSMPxNI" rel="nofollow">http://www.youtube.com/watch?v=GU2GaSMPxNI</a><br> <br> But feel free to spend some time probing it all with an oscilloscope. I know I did.
Hey - I have a question regarding stepper motor voltages that I can't seem to find an answer to: Does the voltage of a stepper motor actually matter? For a concrete example, the stepper motors I'm using are listed as 3.5V, 1.5A. Should I just be using my 24V supply, and limiting the max current to 1.5A? Chopping drivers use very high voltages for brief periods to get better performance, so I'm not convinced the voltage matters all that much. Most hobby stepper motors seem to be listed with &lt;8V operation, while the stepper driver chips seem to all be rated in the 8-40V range. <br> <br>It's also possible that I'm just looking at this from the wrong angle :-) <br> <br>Thanks

About This Instructable




Bio: I was pfred1 but moved, changed my email address, and lost my password. I suppose worse things could happen.
More by pfred2:Cheap CNC Dos and Don'ts Pimping My Arduino Hotgluing Erasers to an Arduino 
Add instructable to: