Shop OBEX P1 Docs P2 Docs Learn Events
Need help on PWM — Parallax Forums

Need help on PWM

LuiLui Posts: 4
edited 2011-02-09 01:47 in BASIC Stamp
I have my project student to use Basic Stamp to control the speed of 4 independent motors. When she use the PWM command to control one motor, it works. However, when she uses the PWM command to control 2 motors, the motor speed reduces significantly.

When we use the oscilloscope to check the signal, we found the output to the motor has drop to zero for a period of time. She had upload the plots and we hope someone could shed some light.

Intererstingly, when she reduces the duration for the PWM command, the speed do increases. However, we thought the PWM duration is pre-determine by the RC filter. What are the effects if the duration is reduced ?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-08 08:44
    When you switch from motor to motor, the caps that aren't being driven begin to lose charge. The longer you're "away" the more charge they lose before being refreshed again. You didn't say what comes after the RC circuit, but you need something with a high impedance that won't drain the cap so fast. A FET-input op amp configured as a unity-gain voltage buffer would be an excellent choice here.

    -Phil
  • LuiLui Posts: 4
    edited 2011-02-09 01:47
    Thanks Phil. I assume we need to place the unity gain voltage buffer at the output of the RC filter piror to the motor driver pin. Let us know if we have err. Also, like to know if we are damaging the hardwares when we reduce the duration of the PWM significantly to reduce the capacitor charge time. Attached is the set up of the RC filter.
Sign In or Register to comment.