584,833 active members*
5,370 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > Stepper Motors / Drives > Question about using PWM with "standard" stepper drivers
Results 1 to 15 of 15
  1. #1
    Join Date
    Oct 2018
    Posts
    41

    Question about using PWM with "standard" stepper drivers

    I have a "standard" 4 amp TB6600-based stepper driver (happens to be a Winsinn)and I'm using it with a motor that can deliver 8 foot-pounds of torque. I want to find the "zero position" my moving the motor until the carriage hits a zero switch, but even with a unity screw this motor can generate at least 400 pounds of force, and with a less aggressive screw it could be ten times that. The "standard" device only allows the selection of a lower current mode by activation of a DIP switch, so of course that cannot be done under programmatic control. The driver has two optoisolated inputs for step and direction, but it also has a third called "enable" (which I suppose should have been "disable" but I'm carping a little). The question I have is can I feed a PWM output from the MCU to drive the enable input to reduce the average torque? I'd probably set the cycle time at about 2 kHz (can only be factor-of-four one way or the other), I figure so long as it's much slower than the step rate it should work OK, and if I lose a step or two that's OK too because I'm just trying to find zero and not rip the bracket right off its mounting screws. Is that how the TB6600 chip and that input work? Does it just cause the back EMF to drive the "free" end of the half-bridge into the body diode and supply rail of the other output? Any insight into how this chip works in this regards would be appreciated, I don't seem to find this level of detail on either the Toshiba data sheet or the vendor's website.

  2. #2
    Join Date
    Jun 2011
    Posts
    692

    Re: Question about using PWM with "standard" stepper drivers

    I don't think that will work. Stepper drives generally employ PWM internally to regulate the current to the motor so PWMing the enable would probably either do nothing, as the driver will compensate, or just confuse the driver. Some drives have a dead time after enable as well, so it may just disable the drive altogether (if the dead time is longer than the enabled time of your PWM.) Might even burn out the drive.
    Why do you think it will cause damage when you hit your zero switch?

  3. #3
    Join Date
    Oct 2018
    Posts
    41

    Re: Question about using PWM with "standard" stepper drivers

    I should have answered a bit more carefully, in the application I don't really know whether I have either the position OR the direction even close. Therefore I could be sailing into the "non-zero" end at full force, and wiping out the bracket on THAT end (because the carriage just happened to be closer to that end when power was introduced). Yes I COULD put a second switch on THAT end (I have made provision for that) but that's unfortunately optional at the discretion of the customer, I'm really just trying to protect him from himself as much as anything. I don't think the internal PWM will necessarily "be confused" as this capability was nominally designed into the chip. I do have a ticket opened with Toshiba semiconductors about use of the chip but then there's the time difference and everything...I guess I'm really wondering what the "disable" capability would have been provided on the driver device for if NOT for a secondary (external) PWM??

  4. #4
    Join Date
    Jun 2011
    Posts
    692

    Re: Question about using PWM with "standard" stepper drivers

    Whenever the drive is enabled, there is current running through the stepper. Disabling is generally the only way to remove current from the motor and 'unlock' the motor.
    Generally you put the home switch close to the limit of travel and only home a machine in one direction. If you can't count on the operator homing the machine correctly, you really need overtravel switches at both ends of travel.
    Or you need to use some sort of servo. I know Clearpath servos allow for hard-stop homing, where they slowly run in one direction until they hit the hard stop and set that as home.

  5. #5
    Join Date
    Oct 2018
    Posts
    41

    Re: Question about using PWM with "standard" stepper drivers

    Right, in my application there isn't a "machine", I have a different use for the stepper but I figured this forum would likely have as fine a source of expertise on this topic as anywhere on the web...and I see it does!

  6. #6
    Join Date
    May 2015
    Posts
    1422

    Re: Question about using PWM with "standard" stepper drivers

    As mentioned, the PWM magic is already happening in the stepper driver. It's possible to detect current spikes which indicate step changes in load (the kind of thing you'd see if you hit an end stop) but the driver needs to do that work and, if it did, there'd be another terminal on the driver for overload or something like that.

    So either you need to get smarter drivers (which is what switching to ClearPath would do, if you can afford it) and I've not seen any cheap drivers that support this kind of sensing, or you need to look at alternative strategies which mean even the dumbest, most careless and distracted operator can't stuff it up.

    Designing a limit switch arrangement in such a way that it remains activated from the sense position all the way to (and past) the end stop is a good first step. So, if your rig is somewhere past the limit, you power up and know you need to back off slowly until the limit switch de-activates. Having the limit switch positioned far away enough from the end stop to allow the stepper to brake the travel from full speed as it hits the limit is also important... something I discovered in another application in a moment of extreme wincing

  7. #7
    Join Date
    Oct 2018
    Posts
    41

    Re: Question about using PWM with "standard" stepper drivers

    I'm confused by your response, I'm not looking for another output, I'm looking to supply an input to drop torque. The concept of using multiple PWMs across the same load to essentially multiply the load by two fractions simultaneously is well established practice. My question has more to do with what activating the disable actually does to the bridge BESIDES cutting drive current, and whether the coil current is routed so that the current build "cycle" can more or less be continued upon release of disable instead of having to be restarted. If the chip was NOT designed to accommodate this capability this would have been a serious error as in many situations the software will be much better served if it is given a way to "modulate down" the coil current upon command. (This is even more critical when the driver design doesn't happen to include a hardware idle timer, and in that case if the software cannot provide that function via PWM then the minimal heatsink on most of these drivers will force the driver to go into overtemp mode when stepping stops for awhile.)

  8. #8
    Join Date
    May 2015
    Posts
    1422

    Re: Question about using PWM with "standard" stepper drivers

    Apologies. My response was more based on looking at alternatives to throttling the current. The TB6600 is generally regarded as a fairly cheap and cheerful all in one driver, not as a fully featured stepper controller/driver. If you need all the bells and whistles you may need to look at something a little fancier.

    Back to the original PWM question, then, the details of the enable input's function will between between stepper driver designs, but on the cheaper unit it's a fair bet that the enable input routes pretty much directly into the driver chip. The datasheet for the TB6600 might be of some help: http://www.haoyuelectronics.com/Atta..._Datasheet.pdf for an example. Looks like it will drain the coil current through internal diodes and avoid frying itself but the current isn't kept flowing so there'd be spikes on re-enable as a minimum and IIRC driving the enable line false disengages the motors so they can free spin, meaning if there's any mechanical load there's a good chance of skipping. So even if enable toggling left the state machine healthy, you get a big risk of losing position.

    It's not an approach I'd be trying, hence my earlier response - find another driver, or find another way of approaching the problem with the hardware you have so you don't need to (because you can't) control current on the fly.

  9. #9
    Join Date
    Oct 2018
    Posts
    41

    Re: Question about using PWM with "standard" stepper drivers

    No apologies needed, this stuff is definitely complex when you have a need to get this far into the weeds, and I have a call in to Toshiba and maybe get a "more official" answer tomorrow. There's nothing "inherently incompatible" with the chip working as I have hypothesized, over the short term if the coil current is interrupted the coil's internal current path could be maintained to allow external PWM to be implemented, over the longer term after the current dissipates the motor would essentially move freely, no "inherent contradictions" there at all. I'm curious though, after the TB6600HG at 4.5 amps I guess there's a TB67H400 at 6 amps, and I've seen one vendor offer something that I guess is supposed to supply 7.8 amps. I kind of trust Toshiba to make a chip that works, I would be more than a little worried though if past the 6 amp chip I'd wind up having to get a Chinese driver made from an MCU and separate output devices and executed in firmware, I have quite a little experience in hardware design and frankly the Chinese can't even get THAT right, if I had to rely on Chinese-written firmware I'd just rather roll it myself thank you very much! So is there any "handy list" or review site where I could centrally learn about the other options that you were mentioning? I could be willing to go into the "tens of dollars" range for a driver but definitely not thousands or anything!

  10. #10
    Join Date
    May 2015
    Posts
    1422

    Re: Question about using PWM with "standard" stepper drivers

    sadly, to my knowledge anyway, there's no handy dandy list of comparison by feature between drivers kicking around. I could be wrong. But I'm going to guess that once you bump out of the 6600s and similar single chip driver boards, you're going to land in the hundreds of dollars per driver range and quite possibly kicking up into the thousands.

    Good luck with the search!

  11. #11
    Join Date
    Dec 2013
    Posts
    5717

    Re: Question about using PWM with "standard" stepper drivers

    If I understand correctly the carriage could be anywhere in it's travel range, including near the non-protected end, when a home routine is called. But would you be safe in ordering a small move away from the home switch, enough to be sure the carriage clears the switch? Then approach the home switch from the proper direction. This is what I used to do with my lathe.
    Jim Dawson
    Sandy, Oregon, USA

  12. #12
    Join Date
    Oct 2018
    Posts
    41

    Re: Question about using PWM with "standard" stepper drivers

    Well it's a little more of an "OEM" situation, I can't assume that I know which "sense" of direction is toward or away from the home switch, someone might change motors or wiring since last power-up, that's kind of where the problem comes from.

  13. #13
    Join Date
    May 2015
    Posts
    1422

    Re: Question about using PWM with "standard" stepper drivers

    Quadrature encoder on the motor? Or a means to creep test the motor after wiring/motor changes before the fitter mashes on the "reset" button? Or tell them to do a reset sequence with the motor disconnected and check the sense BEFORE they install it? Could always run a PSU with a controllable output to the driver, cut down the rail voltage from 48V or whatever to 6V and it will drop the torque accordingly.

  14. #14
    Join Date
    Dec 2013
    Posts
    5717

    Re: Question about using PWM with "standard" stepper drivers

    Quote Originally Posted by jlawton View Post
    Well it's a little more of an "OEM" situation, I can't assume that I know which "sense" of direction is toward or away from the home switch, someone might change motors or wiring since last power-up, that's kind of where the problem comes from.
    Not having control over the final fabrication is going to make it difficult to solve this problem. There is only one foolproof way of doing what you are really asking about and that is to torque limit the motor on a home move, generally not possible with a stepper motor. The only way I know to torque limit a system selectively is to use a servo motor and do a torque limit in the software. There is one stepper drive that I know of that might allow torque limiting on demand, but they are $275 each.

    The other option might be to build hard travel stops that will accept more load than the stepper is capable of producing. From your description I am guessing that the final fabrication might be done by a less than skilled individual?
    Jim Dawson
    Sandy, Oregon, USA

  15. #15
    Join Date
    Nov 2008
    Posts
    110

    Re: Question about using PWM with "standard" stepper drivers

    Hallo

    You wrote that "low current" mode can be activated by dip switch - i guess a small relay can do it too? Of course it will require opening the drive and "hacking" it a bit with additional hardware which in your setting may not be possible.
    I looked documentation of TB6600 chip - it has "torque" input which reduces torque to 30% (i guess dip switch controlls this input) if that's still too much - you can reduce vref (refernce voltage). I never tried this on TB6600 but saw circuit doing something similiar too l297/l298 driver to reduce current during stops (it's a quite old and primitive chip).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •