PDA

View Full Version : PWM for H-Bridge



studysession
03-12-2007, 04:10 AM
Hi -

I now have a good understand of h-bridges and how they work. Took me a while but I get it. I have made a few now. Problem it is either full throttle or nothing. Now I need some speed control.

Now I need a hardware solution for a Pulse Width Modulator (PWM). What do people use? I want to control the speed for a couple of DC motors. I do not want to write a program, want to just buy a chip and solder it in pace if some kind of hardware solution like that.

Please give links or pcituresˇfor examples if you can. I need to keep it simple for me to understand. Thanks

Mike Green
03-12-2007, 04:33 AM
First you have to decide how you want to control it. You can always get a dual 555 timer, setup one half as an astable multivibrator at a frequency set by a pot you can adjust and a monostable multivibrator to put out a variable width pulse controlled by another pot. That's pretty basic.

If you're willing to do a little programming, you might look into the PWMPAL which is a piggyback device which mounts under a Stamp processor and shares a few I/O pins. It has it's own pre-programmed processor on it and is commanded via a serial connection on one pin to produce up to 4 independent PWM signals on other specific pins. Download the documentation here: www.parallax.com/detail.asp?product_id=28020 (http://www.parallax.com/detail.asp?product_id=28020).

There are other PWM controllers available, but you'll have to do a web search to find them. The idea is essentially the same as the PWMPAL.

If you don't want to do any programming, I suggest you search elsewhere since this forum is really about support for Parallax's products which mostly require some programming.

studysession
03-12-2007, 04:38 AM
Thanks -
Yes I do understand this is for support for Parallax products. I have 4 BOE board and two installed on BOE-BOTS. I also have a sensors course kit and contents along with others.

Just want to have one item that I control without being programmed via software. I have a CNC machine I am building and trying to control the stepper motors with my BS2. But the DC motor that I will use as the router spindle I want to do all hardware solution.

Thanks

T Chap
03-12-2007, 05:03 AM
Many spindles on CNC machines do not use Hbridges. Reversing a motor on a CNC would require the use of different tools, and rarely does anyone use both cw and ccw tools as there is no benefit except in rare cases. A typical CNC spindle is very simple and you can do it with your Stamp, just output a duty cycle to the PWMpal to reflect the speed you want, find a requency that runs smoothly.

There are softwares on the PC like Mach3 for example that has built in PWM, you simply take the spindle control pin off the parallel port, put it into an NPN mosfet which then shunts the low side of the DC motor to GND. Choose a mosfet with a voltage rating to meet your needs.

For $3.50 you could add an SX, send it a serial string that included PWM duty cycle and let the SX run the spindle, it doesn't get cheaper or easier than that for external control.

Edit For a larger motor i.e. 1/5 HP AC that would be required for CNC use, you would want to switch the motor via PWM with an SSR. Just send one side of the motor to one side of the AC in, then put the SSR in the path of the motor low side to GND. Allelectronics.com has AC SSR's that you can turn on with 3-32vDC.

Post Edited (originator) : 3/13/2007 8:38:03 AM GMT