dc motor speed controll pwm
i have an h-bridge with four approximately 100-200 hfe transistors.· It drives a 9v dc motor.· Each base of each transistor is controlled by its own pin from the basic stamp.· what is the best way to use pwm to vary the speed of the motor.· My problem is, they have enough current, but the motor rotates too fast for my project.· Can i use pwm on some bases instead of just bringing them high to make the motor operate at a slower speed whenever its on.
Comments
·· You will need a chip (co-processor) to generate the PWN for the H-Bridge to do it practically...There is always the PWM PAL, or one of Al Williams PAK chips does this as well...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
·· The Stamp is a single-tasking MCU, so if you setup a PWN routine, the Stamp won't have any time to do anything else.· Best to get the co-processor...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Don't use a resistor to create a voltage divider with your motor.· Use an adjustable voltage regulator if you are going to go that route.
The·LM317 [noparse]/noparse][url=http://cache.national.com/ds/LM/LM117.pdf][u][color=#800080]http://cache.national.com/ds/LM/LM117.pdf[/color][/u][/url·is a popular choice.
Not without external components.· The PWMPAL will work and takes a lot of guesswork out of the equation, but if you really want to roll your own you need
a few things...
1)·A triangle wave generator operating at you PWM base frequency
2) A comparator that looks at the triangle wave against a DC offset between 0V and 5V.· The output of the comparator is the PWM that you want.··
3) A DC offset can be generated directly from the Stamp via the Stamps PWM configured as an analog reference (will need to be updated on a regular basis)
·········· · OR·
·· A DC offset can be generated from the output of a digital potentiometer controlled by the Stamp (which does not need regular updates)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
That said, the "optimal" resistor value could vary widely depending on the load the motor experiences. The most efficient method would
be PWM, second on the list would be some sort of linear regulator, lastly would be to use a resistor.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.