Shop OBEX P1 Docs P2 Docs Learn Events
Small Unipolar Steppers and speed — Parallax Forums

Small Unipolar Steppers and speed

idbruceidbruce Posts: 6,197
edited 2011-05-07 08:58 in Propeller 1
Hello Everyone

I have a small unipolar stepper motor that I would like to control with a ULN2803 or a L293D. I was wondering just how fast the stepper can go with these chips, such as how many pulses per second or revolutions per second? I was also wondering, can counters be used with these chips as in PWM.

Bruce

Comments

  • JonnyMacJonnyMac Posts: 9,208
    edited 2011-05-05 18:16
    Speed will depend on the steps per resolution and how fast you can output those steps. PASM will of course be faster than Spin.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-05 18:19
    Even though this is not a Propeller question...
    2803s are "logic-level" (0, 5V)input devices, so they're compatible with "all" logic-level devices.
    They have a 0.25-1usec delay on and delay off spec'd.
  • idbruceidbruce Posts: 6,197
    edited 2011-05-05 18:39
    @JonnyMac - I believe it is a 1.8 degree stepper, 200 steps per rev. I was thinking full steps. Can a counter be used as in PWM to set the pulse width and duration?

    @PJ Allen - I believe it would be a Propeller question. :)
    I was also wondering, can counters be used with these chips as in PWM.

    But thanks for the delay information.
  • bennettdanbennettdan Posts: 614
    edited 2011-05-05 20:12
    idbruce,
    If you can find the datasheet on your stepper motor most of them have the typical RPM max of the motor. The propeller and the ULN2803 or a L293D will not be the limiting factor as long as they will carry the voltage and current needed by your motors. Do you have a link to the stepper motors you plan to use?
  • pjvpjv Posts: 1,903
    edited 2011-05-05 20:13
    Bruce;

    I suspect the maximum speed will mostly be a function of the highest voltage you can supply to the motors, and of course the chip must be able to handle the high voltage. For high speeds, it is the coil inductance that is the killer, and only raised voltage can combat that.

    I believe the chip and (assembler) software will be much faster than the motor's inductance will allow..

    Cheers,

    Peter (pjv)
  • bennettdanbennettdan Posts: 614
    edited 2011-05-05 20:36
    @pjv I agree with you and the datasheet will tell you the inductance and other important data.

    @idbruce Each motor will have different RPM ratings due to what pjv said its not just a 200 step motor will run at X speed.
  • idbruceidbruce Posts: 6,197
    edited 2011-05-06 03:48
    I thank everyone for their responses.

    I realize there are several things that determine the speed of a stepper motor, however I was seeking a more general answer than a lesson in stepper theory and operation.

    When I started messing with stepper motors several years ago, I used the ULN2803 and online documentation for my experiments. At the time of these experiments, the steppers would average about 2-4 revs per second. With my current stepper drivers, I average approximately 12-13 revs per second. I was basically wondering if anyone has achieved this kind of speed using the ULN2803 or the L293D.

    I assume that the limiting factor of my first experiments was the voltage supplied to the motors. I have not tried it yet, but I will try a new experiment using a small stepper, a ULN2803, a much higher voltage supply, and a counter in NCO mode to time pulse width and cycle times. I believe it should produce a much higher RPM rate than the examples provided online that use a 12 Volt power supply and WAITCNT.
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-05-06 06:22
    it does depend on questions out of the area of stepper theory.

    Steppermotors have coils which have an inductivity. The inductivity makes the current rising lower after switching on the voltage.
    With a higher voltage the current rises faster. But if you would apply a too high voltage to the coil all the time the resulting current would be much too high for the coil.
    Now to have a fast rising-time of the current but not exceeding the current-limit. The curreent is measured and the voltage is switched on/off to get an averaged current the coil can deal with without burning through.
    This is this very high beeping you can hear when steppermotors are powered by a professional stepperdriver. (so co called chopper-circuit)
    There are even more details like slow and fast and mixed decay.modes that some chips offer for more perfomance of the motor.

    In a real application you have to analyse how much torque do you need?
    Different stepper-motors have different torque-rpm characters.
    Even for a test with no load on the motoraxle you will reach different results with different steppermotors.
    Such a test has (almost) no practical value except may rotating a small mirror mounted on the motoraxle for a scanner or something like this.

    best regards

    Stefan
  • JonnyMacJonnyMac Posts: 9,208
    edited 2011-05-06 07:45
    If you're controlling the stepper directly you need four outputs (to provide the step pattern), so the counters are not helpful (as is the case when sending a pulse to a stepper controller). This article -- written a long time ago -- may help:
    -- http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol7/col/NV136.pdf
  • idbruceidbruce Posts: 6,197
    edited 2011-05-06 11:36
    @JonnyMac - I forgot all about that. Looks like counters are out of the equation. Thanks for pointing that out Jon.
  • Mark_TMark_T Posts: 1,981
    edited 2011-05-06 16:42
    For high speed you ideally want low-resistance windings and a high voltage PWM driver - often unipolars are optimized for simple fixed-voltage drive and have high-resistance high-inductance windings. High inductance means higher voltage needed to overcome the back-EMF.

    So even if driven with a nice PWM micro-stepping driver like the A4983 or L6208 or whatever don't expect unipolars to compete with a low-resistance winding bipolar stepper - but they will benefit.

    PWM stepper drivers have to actively monitor load current across the switching cycle to limit it - not easiily done with a microcontroller... better I think to offload to bespoke silicon and just send the step pulses (via protection circuitry in case the motor controller fries). Counters would be then v. handy for generating the step pulses.
  • idbruceidbruce Posts: 6,197
    edited 2011-05-06 17:37
    For those of you who might be interested

    Application Note 470(AN470) from STMicroelectronics shows a nice and simple to build unipolar stepper driver that uses the L297 step interpreter and a ULN2075B quad darlington array. I bet this circuit would put some ZIP into those small unipolar stepper motors with the aid of an NCO counter.

    Here is a link to that app note and diagram.
    http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/CD00003803.pdf
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-06 17:58
    :zombie: So when does the Propeller come in? :zombie:
  • idbruceidbruce Posts: 6,197
    edited 2011-05-06 18:34
    @PJ Allen - Don't you have something better to do than acting as a moderator?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-06 18:51
    idbruce,
    Why not answer my question?
  • idbruceidbruce Posts: 6,197
    edited 2011-05-06 19:01
    @PJ Allen - If the numerous mentions of the NCO counter is not good enough for you, then I surmise that you have too much time on your hands. I have seen numerous posts from you giving people a hard time about improper posts. I suggest you do something more appropiate with your time, such as building something.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-06 19:16
    idbruce,
    Surmise -- whatever.
    You're not getting a "hard time". First you're brazen then you're a victim; that's fascinating.
    You grasp at straws. Twice is neither numerous nor substantive. This has nothing more to do with the Propeller, substantively, than does a discussion of jogging shoes because, oh, I'm figuring on duct-taping one to my shoe.

    "Build something." Indeed. You're not nearly so familiar with my posting as you feign. I'll put my projects up against yours any day. Where are all yours, by the way?

    I have a suggestion for you, but Forum rules forbid.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-06 19:35
    Popcorn! Get your popcorn right here! 'Can't enjoy the show without popcorn! (Seriously, I've been saving up that crappy microwave popcorn that Advanced Circuits sends with each order, and I take PayPal.) :)

    -Phil
  • idbruceidbruce Posts: 6,197
    edited 2011-05-06 19:35
    LOL You will put your projects against mine. Now thats funny!!!
  • idbruceidbruce Posts: 6,197
    edited 2011-05-06 19:41
    @Phil - LOL That was also very funny!!! I have been laughing for five minutes. Got any beer to go with that popcorn?
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-05-06 22:14
    there are two steppermotor-objects in the obex

    SPIN http://obex.parallax.com/objects/617/

    PASM http://obex.parallax.com/objects/682/

    Try to use them for your tests. If you have questions about how the code works or how they mak use of the propeller feel free to ask here again

    best regards

    Stefan
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-07 04:57
    idbruce,
    What you got, idman?
    No projects, that's a fact.
    All I see is what is: page after tedious and inappropriately posted page of unadulterated MMWNIC.
  • Heater.Heater. Posts: 21,230
    edited 2011-05-07 05:19
    PJAllen,
    I'll put my projects up against yours any day.

    Please, what is this? I'm to old to be back in the school yard.
    You are at liberty to ignore posts that you don't find interesting or feel you cannot help with. Jumping in and attacking people is not the way to earn respect around here.
    I only came here today for a nice read and check up on what people are doing. Plus I have a stepper motor sitting in front of me that I want to drive from a Prop one day.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-07 05:50
    Heater.,
    I haven't attacked anyone and I object to your characterisation.
    I asked a question and I got evasion and then I got 'tude.

    As for
    Please, what it is this?
    allow me to connect the dots for you (there are only two, but I'll try): Some idiot remarked that I should "build something", you probably missed that. It's a fact that in this Forum and Projects, indeed the whole joint, he doesn't have squat.

    You do post a lot, but have you posted any projects? I know the answer as well as you do.
    Lo, verily, an abundance of witnessing, sermonising, signifying, and self-important chit-chat. Where are the works?

    BTW, I wouldn't drive a stepper motor with a Propeller, ever, I think you'll need some interface electronics between the two and that's no "surmise".

    Have a good day.
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-05-07 07:49
    hm - know I'm thinking about "is this writing (below) propeller-related enough?
    not really. Except maybe if I add a link to a Nuts & Volts Columm about "stepping out"
    http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol7/col/NV136.pdf

    IMHO the chips L297 combined with L298 are a good starting-point for driving steppermotors with the propeller.
    These chips are cheap and have quite a lot features.

    The L297 has a step and direction-input and does the detailes of how to switch the stepper-motor coils on/off to make the steppermotor SPIN.
    The L298 offers PWM-choppering to get more torque out of your steppermotor.

    If you want to dive deeper into this look at the several chips from allegro. Some of them even offer microstepping done by the driverchip so you don't have
    to care about these details. If you want to do these details with the propeller driving the inputs of an H-bridge you can do this as well.

    If I remember right there was a thread about this already in the forum.

    Anyway a steppermotor-object offering PWM-choppering and microsteps with almost no additional hardware except powerswitching MOS-FETs would be a cool thing too.

    Which way would you choose for regulating the coil current? Delta-Sigma with two Prop-IO-pins? a 3208 ADC-chip? Would this chip be too slow for regulating the current?

    best regards

    Stefan
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-05-07 07:59
    StefanL38 wrote:
    Which way would you choose for regulating the coil current? Delta-Sigma with two Prop-IO-pins? a 3208 ADC-chip? Would this chip be too slow for regulating the current?
    The Prop should be completely capable of regulating the coil current in a feedback loop with sigma-delta ADCs. However, any time a micro is used for current regulation, you also need an external hardware failsafe mechanism to to shut off power if the current becomes too high.

    -Phil
  • Zap-oZap-o Posts: 452
    edited 2011-05-07 08:25
    JonnyMac wrote: »
    Speed will depend on the steps per resolution and how fast you can output those steps. PASM will of course be faster than Spin.

    This is not always true. I just finished a project where my client wanted a stepper motor to operate at a higher RPM. I found that the voltage is critical in making the stepper motor run at this faster speed (2500rpms). I ended up using 24Volts. So employing PASM would be elegant but over kill in my opinion especially if the voltage is insufficient.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2011-05-07 08:53
    The drive chip is unlikely to be the limiting factor to the stepper speed. High voltage is required for high speed but 20X rated is the very top end from what I gather. The mechanical load has a lot to do with it as well, an unloaded stepper will beat a loaded one for max speed but there will be little torque at the top speed.

    Graham
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2011-05-07 08:58
    PJ,

    I'm not always impressed by Bruce's posting habits but you are not exactly inhabiting the high ground here. As a matter of fact he has posted a number of threads containing projects, a wire bender and packing machine.

    As for driving the stepper from the propeller, there is an obvious assumption that drive electronics will be required. I tend to use off the shelf, the propeller only provides step and direction pulses to "drive" the stepper.

    Graham
Sign In or Register to comment.