Shop OBEX P1 Docs P2 Docs Learn Events
Controlling External PWM Generator with A Stamp with Variable Speed/Duty Cycle — Parallax Forums

Controlling External PWM Generator with A Stamp with Variable Speed/Duty Cycle

T ChapT Chap Posts: 4,217
edited 2006-06-19 14:32 in BASIC Stamp
Anybody got any suggestions on a design that uses an external PWM circuit, where the frequency and duty cycle can be controlled by a Stamp BS2P40? I am looking to develop a chopper circuit for a bi-polar stepper motor for current limiting control. Since I am putting in the additional circuitry, I thought it would be cool to test the torque, speed, and heat of the driver/motor with variable PWM as a current limiting feature. I would want to be able to adjust the frequency of the PWM up or down from say hundreds of cycles to 25k approximately, adjust the duty cycle from 0 to 100% on the fly.

Right now it looks like a typical PWM oscilator with a digital pot in the RC network for Frequency, plus a digital pot for duty cycle (digitally setting the reference level to comparator) would be the stuff to sort out. \

The Stamp is too busy to generate the PWM, adding another Stamp is too costly, but maybe an SX would be feasable.

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-06-19 09:07
    Originator -

    Take a look at the Parallax PWM Pal which fits right underneath the Stamp and thus takes up no real estate. Here is a link to it:
    http://www.parallax.com/detail.asp?product_id=28020

    Four separate channels of PWM at the cost of one Stamp pin. Can't beat that.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-19 14:32
    Bruce Bates said...(trimmed)
    Four separate channels of PWM at the cost of one Stamp pin. Can't beat that.
    Bruce's suggestion is valid but I just wanted to clarify that when 4 channels are enabled you will effectively lose the use of 5 BASIC Stamp I/O pins since they share with the socket.· One clever customer made a strange breakout board which has the PWMPAL side-by-side with the PWM PAL and only connected to the P0 line, freeing up all the other lines which could be shared (up to 8).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.