Shop OBEX P1 Docs P2 Docs Learn Events
pwm question — Parallax Forums

pwm question

mikeamikea Posts: 283
edited 2012-03-03 04:34 in BASIC Stamp
I'm trying to fully understand the relationship in the pwm command between the 0-255, the pulse duration, and possibly adding capacitance in the circuit. The goal i guess is to maintain torque at the reduced votages/speeds. Is there a formula related to this? thanks - mike

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2012-03-02 09:51
    The PWM on the BASIC Stamp doesn't work like that. In a traditional PWM motor controller the relative torque would be more consistent across the speed range of the motor because the motor is always getting the full power or not to the motor. At low speeds full power is applied at a lower duty cycle.

    On the BASIC Stamp MCU the PWM command is designed to be used with an RC circuit to generate an analog voltage. Analog voltages do not efficiently power motors like a PWM signal would.
  • mikeamikea Posts: 283
    edited 2012-03-02 10:55
    Thanks Chris, are there any microcontrollers like the propeller for example that are capable doing this and maintaining the torque at lowered speeds? What are the options for that? -mike
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-03-02 11:38
    Mike,

    DC motors by their nature will increase torque as the resistance to their rotation is increased. Diesel electrics basically use a DC motor as an automatic transmission.

    It helps a lot when controlling motors at low speeds if you use encoders for feedback.

    You can see a big difference in the way a Propeller was able to control four DC motors in my latest project. Adding encoders made it possible to have increased torque at low speeds.

    And, yes, a Propeller (and many other uC) can maintain torque at low speeds using DC motors (though they might need encoders to do so).

    If the DC motor is not under powered (as in my project), then you might not need encoders to maintain torque at low speed.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2012-03-02 11:58
    mikea wrote: »
    Thanks Chris, are there any microcontrollers like the propeller for example that are capable doing this and maintaining the torque at lowered speeds? What are the options for that? -mike

    There are additional measures, such as encoders that can help increase torque by increasing power to the motor when it is not up to the expected speed. However what I was referring to was the innate difference between varying the analog voltage to a motor and using PWM. When using PWM the motor is more efficient across the speed range, inherently, because the volage is always at max, it just varies in time. When you reduce the analog voltage below a certain point most motors won't even spin up, limiting the lower bandwidth of the motor.

    The Propeller can easily generate PWM using the counters built in to each COG. I wrote an article in Servo Magazine showing how to use the Propeller to generate PWM for motors and lights. It currently lives here, however by this weekend it will be at a more permanent home here (projects are being moved).
  • mikeamikea Posts: 283
    edited 2012-03-02 20:28
    Wow i have a lot to learn, which is good. Thank you Duane and Chris. .....Gonna have to re-read some things, but it sounds like the basic stamps pwm doesnt actually fully turn on and off a mosfet, that it stays in a blurred state somewhere in between and the propeller proffesional development board with its multiprocessors will actually do fully on/off. ......Where did you guys learn this stuff? This forum has a lot of experts here like yourselves. I'm trying to find college courses to learn this stuff quicker, but the ones i found weren't exactly microcontrollers and their programing. Thanks again. -mike
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-03-02 20:48
    mikea wrote: »
    Where did you guys learn this stuff?

    From reading articles by Chris and other authors.

    Take advantage of the great books Parallax makes available for free. Understanding Signals was really helpful to me, as was Robotics with the BOE-Bot (I'm not sure if I have the titles correct or not).
  • mikeamikea Posts: 283
    edited 2012-03-03 04:34
    Ok cool, thanks Duane.Theres hope for me yet.
Sign In or Register to comment.