Shop OBEX P1 Docs P2 Docs Learn Events
How best to control a 2 amp stepper motor with the Propeller? — Parallax Forums

How best to control a 2 amp stepper motor with the Propeller?

ElectricAyeElectricAye Posts: 4,561
edited 2010-03-03 06:32 in Propeller 1
Hi all,

Recently I was handed a Vexta PK266-02A stepper motor and asked to make a linear drive with it.
catalog.orientalmotor.com/item/stepping-motors--1068/pk-series-stepping-motors/pk266-02a?&plpver=1043&seo=110

I've seen examples of Propellers controlling stepper motors with L293D chips, but this Vexta appears to exceed the current requirements of the L293D.
www.parallax.com/Portals/0/Downloads/docs/prod/compshop/603-00019-L293D-Datasheet.pdf

I've looked at Mouser and Digikey but haven't seen anything that looks like it would work the same way.
Can anyone point me to a chip (or easy alternate technique) for maybe getting this thing to work with the Propeller?

many thanks,
Mark


smile.gif

Comments

  • LeonLeon Posts: 7,620
    edited 2010-03-01 18:20
    Just use some MOSFETs with drivers like the MIC4426. A suitable MOSFET is the FQP7N10, it'll take 7A. I think that Digi-Key sells them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-03-01 18:42
    Leon said...
    Just use some MOSFETs with drivers like the MIC4426. A suitable MOSFET is the FQP7N10, it'll take 7A. I think that Digi-Key sells them.

    Thanks, Leon. That sounds like a reasonable way to go. I presume from your answer, this means there is no plug-in one-chip-does-it-all solution? From what I can tell, it looks like once your stepper motor needs more than about 1 amp, you have to move on to discrete MOSFETs, etc.?

    smile.gif
  • LeonLeon Posts: 7,620
    edited 2010-03-01 18:45
    There might be, I've never looked for one. I'd rather use something with plenty of spare capacity.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-01 18:49
    A common combo is an L297 and L298, the L298 is a bridge and the L297 does the chopped drive. This is what I used on my CNC mill:

    www.indoor.flyer.co.uk/millingmachine.htm

    These days I just buy off the shelf stepper drives that take step and direction pulses, they are so cheap now and I suspect better than I would make myself.

    Graham
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-03-01 18:59
    Leon said...
    There might be, I've never looked for one. I'd rather use something with plenty of spare capacity.

    Yes, that sounds like wisdom speaking to me. I was just looking for a way out of having to worry about all the dreary details of Inductive Transient Suppression, etc.

    Odd, but now I'm seeing there are different versions of L293's, some of which can take peak currents of 2 amps.
    www.st.com/stonline/books/pdf/docs/1328.pdf
    I wonder if that would work so long as I'm not driving the motor to its max???
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-01 19:02
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-03-01 19:03
    Graham Stabler said...
    A common combo is an L297 and L298, the L298 is a bridge and the L297 does the chopped drive. This is what I used on my CNC mill:

    www.indoor.flyer.co.uk/millingmachine.htm

    These days I just buy off the shelf stepper drives that take step and direction pulses, they are so cheap now and I suspect better than I would make myself.

    Graham

    Hey, that's a nice looking machine. If only I had the time to make my own.... cry.gif
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-03-01 19:07
    Graham Stabler said...
    See above and

    www.st.com/stonline/books/pdf/docs/1773.pdf

    Awesome! I'll have to sit down and study this but at first glance it looks like it might do the trick.

    thanks you guys!
    smile.gif
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-02 00:36
    I have used L293s and 298s as well as the 6202s etc in the dim dim past. They work well enough but you can do better. For the discrete MOSFET solution I use devices such as the FDD8424H which are complementary N & P channel devices making it easier to drive.

    More importantly though, I also have a micro-stepper controller chip which includes all the current sensing and hi/lo side MOSFET driving in the one package, this is the Allegro A3985. It only requires an SPI bus to communicate with and as you can see from the attached schematic is very easy to interface. My module is a standard size for my MultiPLCs of around 1.825" x 0.8" and is very compact for a module that handles high current steppers. The MOSFETs are dual N-ch in 8-pin SOIC packs.

    BTW, the other bipolar solutions such as the 298 require 8 external fast 2A diodes, rather bulky too they are!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*

    Post Edited (Peter Jakacki) : 3/2/2010 12:41:53 AM GMT
    1280 x 613 - 38K
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-03-02 01:58
    Peter Jakacki said...
    ...
    More importantly though, I also have a micro-stepper controller chip which includes all the current sensing and hi/lo side MOSFET driving in the one package, this is the Allegro A3985. It only requires an SPI bus to communicate with ...

    Very cool. It looks like I have some homework to do to understand all of this. I should've known it wouldn't be as easy as I'd hoped but life gets dull if we're always in the comfort zone (or so I'm told).

    very much obliged,
    Mark
    smile.gif
  • rjo_rjo_ Posts: 1,825
    edited 2010-03-02 06:52
    Peter,

    I don't find a breakout board for the Allegro unit. So... could you share your experience... or possibly announce a product?

    this is OT but Graham asked a question a while back... and I think I finally have an answer[noparse]:)[/noparse]

    Graham

    I think the answer should have been the tsl1401...except it wasn't available.
    I'm getting acquisition rates at around 10useconds... which I think would meet your specs[noparse]:)[/noparse] The question had to do with freezing the motion of a device you were working on.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-02 07:05
    Hi Rich,

    Admittedly I haven't had a lot of time to play with the newer stepper board much but I will make some code available soon. As for the pcb this one is a nice plug-in module in the manner of my MultiPLC modules so it is easily plugged into a common breadboard as well (I just tried it). It would make sense to sell these and possibly some other modules as well so I have to sort out a PayPal account. I'll look into it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-03-02 07:15
    I've stacked h-bridges and it's worked just fine for me. it's 'off-label', but a pretty common practice. I even did a propeller platform module using quad SN754410's - the octodriver. Each IC will dissipate about 1000 mA with the included heatsinks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Forums RSS Feed!

    Gadget Gangster - Share your Electronic Projects

    Post Edited (Nick McClick) : 3/2/2010 7:20:09 AM GMT
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-02 07:56
    Using the A3985 allows micro-stepping, synchronous rectification, current sense, protection etc all without those external schottky diodes and without heatsinks other than the pcb copper. The FDS6990 MOSFETs that I use can handle 20A peaks (pulsed, just as in driving steppers). What's more I only need a few spare I/O to drive them.

    The A3977 is another member of the family that does not need external transistors and can handle up to 2.5A loads usually without heatsinks.

    Most other driver solutions I've seen are usually bulky, need big heatsinks, big diodes etc. There is also the high-current VNH2SP30-E solution which I couldn't use as I need to operate with +24V supplies and the maximum "operating" voltage of this device is only 16V which would be fine for most people I guess. Also, this is strictly a driver only and not a controller although it does have a current sense output.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-02 10:02
    The A3977 looks super and it has to be said the 298's are a bit 1990's.

    The SPI is used to set up the microstepping etc etc, but what about the inputs for step and direction, I don't see those or is that also done via SPI?

    Graham

    p.s. Rich, I'm not sure that was me.

    Post Edited (Graham Stabler) : 3/2/2010 10:28:09 AM GMT
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-02 10:56
    The A3977 does not have SPI but two step mode inputs allow FULL, HALF, QUARTER, and 8-STEP microstep. With the A3985 the SPI accesses the control registers and there is a lot more control possible than with the simpler A3977. But for basic step operation up to 8-step and 2.5A the A3977 looks a winner. Actually the L298's are so 80's as I believe I was using the DMOS L6202s and 03s by then.

    But there are a lot of ancient chips out there that for some reason just keep being selected automatically for designs when there are much easier and better and cheaper parts to use. I noticed even Ken Gracey made mention of using LM386s in another thread. I just about pulled my hair out, why? why? why? (I'm imagining Seinfeld here). Twenty years ago I was using BTL amps such as the TDA7052 for these reasons; no electrolytics, more power, smaller package, lower voltage, readily available, cheap. So if you still want to use an LM386 after all these years then why not use valves I wonder, they're tried and proven too. So the same goes for stepper motors drivers. Get with it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • LeonLeon Posts: 7,620
    edited 2010-03-02 11:28
    Most radio amateurs are still using the LM386 although I've been trying to get them to change, via the various forums. I've been using the TDA7052 since it first came out, and it's a *much* better device.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 3/2/2010 11:33:16 AM GMT
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-03-02 18:32
    I agree - the BJT H-bridges are pretty antiquated, I mostly did the OctoDriver for fun. The real question is why these are still popular. I use the SN754410 which is a bit better, but the 293D is a pathetic bridge that will barely power all but the tiniest motors.

    Maybe it's the package? DIP's are pretty darn hobbyist friendly. And the Prop II won't be DIP, either...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Forums RSS Feed!

    Gadget Gangster - Share your Electronic Projects
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-03-02 22:11
    Peter,

    I meant to say A3985, I could not see step and direction inputs on your schematic (not obvious ones) and the pdf on Allegro's website would not display.

    But actually the 3977 is pretty amazing.

    Graham
  • KenBashKenBash Posts: 68
    edited 2010-03-02 23:22
    I've been controlling steppers for years with nothing more than 4 TIP 122 Darlington transistors and 4 resistors. The transistors have built in reverse spike protection diodes so not much else is necessary. A simple phase lookup table can be put together for full or half step operation. It lets you build a stepper drive for a couple of dollars per axis.

    It isn't as efficient as many other drive options, but works fine for many applications where half stepping is sufficient and it's really cheap. I've automated stuff as large as a Bridgeport series II CNC Mill with it. If your motor has the center tap power wires ( usually white and yellow on vexta motors ) you can often use the 12 or 5 volt output from a PC power supply to provide the power for even more savings.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    " Anything worth doing... is worth overdoing. "

    ··············································· ( R.A.H. )
    ····································
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-03 03:17
    For what it's worth Ken, you are right in that you do not need anything more than 4 transistors etc for driving unipolar motors in full or half-step. Also by applying PWM to the drive signal you can have it reduce the current when idle so that the motor does not overheat and also that the motor has a holding torque. The simple transistor approach can't be used though when driving 4-wire bipolar motors as the unipolar motors are mostly for lower current operation whereas the bipolar are more efficient and have higher torque. Actually, that's more to do with the way it's driven in push-pull fashion as the bipolar motor just doesn't have the center tap that the unipolar does. So if you want the most from your motor, drive it bipolar, otherwise you keep it simple, but don't complain if it's not good enough.

    Rather than some big TIP122s which although easy to drive are darlingtons which means that the voltage drop across the collect to emitter can be as high as 2V @3A = 6W (per datasheet). That's an awful lot of heat to dissipate which I am sure you are well aware of as you must be heat-sinking them. Compare that to the tiny FDS6990 dual MOSFETS in an 8-pin smd pack and at 3A they dissipate 0.2W which is easily managed by pcb copper. Of course there are larger MOSFETs too such as the IRF3708 that you can drive directly from the Prop and they probably won't ever even get warm.

    It's a funny thing, you can get the big bipolar transistors such as the TIP122 as they can handle a bit of power, but they create the need because of their characteristics. When comparing bipolars alone for instance I can select a bipolar in a tiny SOT-23 pack and we know how small they are and I can drive a 3A load with the right one and dissipate very little power too although they need to be driven harder (50ma or so). So the old L298s hooked up to a big heatsink look like they can handle a lot but most of that heatsink is just for the inefficiency of the chip itself. Looks can be deceiving.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • photomankcphotomankc Posts: 943
    edited 2010-03-03 06:18
    Graham,

    You don't see step/dir cause it isn't there.· Looking at the datasheet I assume it works like some of the other devices I have seen where the position of the rotor is controlled via setting a DAC (current limit) in a particular order and then some direction control bit/s.· This would be done via writing the values to the registers via the serial link.· Unless I miss something I don't think it would work for your typical step/dir application.·
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-03 06:32
    Yeah, the 3985 is designed for "manual" control which permits all those fine adjustments to be made. There is the same version in the A3986 www.allegromicro.com/en/products/Part_Numbers/3986/index.asp which has conventional step inputs etc. Of course the A3977 is a single chip version for up to 2.5A loads.
    Check the complete lineup at Allegro www.allegromicro.com/en/products/categories/ics/motor.asp

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
Sign In or Register to comment.