stepper PWM

Discussion in 'The Projects Forum' started by GetDeviceInfo, Jul 4, 2009.

  1. GetDeviceInfo

    Thread Starter Senior Member

    Jun 7, 2009
    1,571
    230
    I have a stepper drive that I 'd like to smooth out it's drive characteristics at moderate speeds. These are exisisting so I'm not in a position to design in a microstep controller. The current drivers are 8051 based.

    Has anyone played with soft controlled PWM layed over absolute stepper positioning, at varying speeds?
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    It's an interesting concept, but probably not going to work. Stepper motors run on a 100% duty cycle pulse train with a varying frequency. That is the opposite principle from PWM. When there is no current applied to the motor windings, nothing happens.

    Are you sure the stepper driver is unable to do half stepping? It should be a matter of altering program code. Do you have a schematic for the driver?
     
  3. GetDeviceInfo

    Thread Starter Senior Member

    Jun 7, 2009
    1,571
    230
    I do employ halfstep. The circuit employs a hammer driver to drive the coils. What I'd like to do is vary the duty cycle to arrive at somewhat of a sinsodual current peaking at center of step, reducing at step increment. My thought is simply to run a varying PWM to the driver enable. Only because a trace cut/jumper/software reload would be an excellent approach.

    If anyone had played with it I could scalp some code. If not I'll be assigned the dubious task.
     
  4. GetDeviceInfo

    Thread Starter Senior Member

    Jun 7, 2009
    1,571
    230
    that looks like just the ticket. Any chance of viewing code to convert over to my 8051s ?
     
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Alberto - that is probably a matter of semantics. The current pulse to any coil in a stepper motor is only effective as long as it is on. I interpret that as 100% duty. The condition that shortens the pulses is increasing the pulse frequency to increase stepper rotation. That is sort of the reverse of PWM, where a shorter pulse interval means less average current, hence slower rotation.
     
  6. GetDeviceInfo

    Thread Starter Senior Member

    Jun 7, 2009
    1,571
    230
    what I'm looking at, and appears to have been served (without seeing any code), is to maintain step sequence frequency (hence rotational speed), whilst applying a PWM'd supply that effectively results in a sinsodial supply that matches the stepping frequency. So it's not a case of one or the other, rather the two together.
     
  7. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    What's a hammer driver?

    Nice project Alberto although i'm not sure why you used 2 logic chips instead of driving the PWM direct on the 4 PIC pins.

    For the OP, it's not a trivial task PWMing existing stepper hardware due to the recirculating currents. If you show a schematic of your output hardware it will help.

    I did high speed PWM microstepping on a PIC years ago when i designed the linistepper project that is sold as a kit from the PIClist;
    http://www.piclist.org/techref/io/stepper/linistep/index.htm

    that is an opensource project that uses a PIC16F628, although I don't know how much use the code will be to you as it does not PWM the output stage directly but after it has been filtered to a (almost) DC microstep voltage, which then controls the output current limiting.

    There's no reason you can't PWM your motors directly provided you take care of the recirculating currents, google "Jones on steppers" which is a good paper on the matter.
     
  8. GetDeviceInfo

    Thread Starter Senior Member

    Jun 7, 2009
    1,571
    230
    Excellent project with supportive documentation. I hadn't considered such an approach.

    'Hammer driver' is an older term used to describe higher current switches, typically used back in the dot matrix printer days.
     
  9. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Thanksfor the compliment! But it's James Newton who deserves the credit for that web page and its great level of support, he's worked hard on it for a few years now.

    I just designed the thing as a hobby stepper driver, because there are no other linear microstepping drivers out there and they perform so well for smoothness. If youve never seen a stepper motor spinning in total silence it's pretty impressive. Somehow it ended up as a kit, thanks to James again I guess because i'm usually too lazy. ;)
     
  10. GetDeviceInfo

    Thread Starter Senior Member

    Jun 7, 2009
    1,571
    230
    laziness or just using the resources at hand :)
     
Loading...