Page 1 of 1

PWM explained

PostPosted: Wed Nov 05, 2008 6:06 pm
by M800
Hi guys, a newbie needs help :oops:

I'm trying to get my head around PWM. Pulse Width Modulation.

This is how I understand it, but I am obviously wrong as it just wouldn't work.

You have a square wave at say 1kHz and another at say 5 kHz. The pulse width has been modulated, true?
BUT, the duty cycle is still 50%

Aren't we ment to be changing duty cycle with PWM? Please can someone clear this up for me :cry:

Cheers,
Bazz

Re: PWM explained

PostPosted: Wed Nov 05, 2008 9:18 pm
by IDP
Ok In simple terms I'll try and explain it.

If you set the frequency at 25hz you cycle the valve 25 times open/closed per second hence 25hz.

Now if you set the duty cycle to 50% the valve will be open for 50% of that time. so an even on off wave.

If you set the duty cycle to 75% the valve will be open 75% of that time. so an uneven wave where the valve is open longer than it is closed but still opens and closes 25 times per second.

If you set the duty cycle to 25% the valve will be open 25% of that time. so an uneven wave where the valve is closed longer than it is open.

Hope that helps.

Re: PWM explained

PostPosted: Wed Nov 05, 2008 10:14 pm
by M800
I'm going to have to shout you a beer IDP, got it now.

My understanding is that you set the frequency to suit your application (eg: boost solenoid or relay). Then you adjust you duty cycle max and min to that frequency.

.....____
___|.....|____| etc for 50%

_____________ etc for 0%
.._______.. ______
_|........|_|........| etc for 90%

Thanks for the explaination, it helped a lot

Cheers
Bazz

Re: PWM explained

PostPosted: Wed Nov 05, 2008 11:59 pm
by IDP
Correct :P

Re: PWM explained

PostPosted: Thu Nov 06, 2008 3:03 am
by figgie
Keep in mind a few other tid bits.

PWM is actually DC. Even though it is toggling from 0v to set max Volt it is DC at a certain frequency.

The frequency of the PW has to suite the application (ie running 20khz on a DC motor will do nothing in terms of speed control. For DC motor speed control I usually use 400hz-4khz, for LED dimming I use 10khz).

PWM Duty cycle is dependant on the PWM circuit and the method used to create the PWM signal. Some circuits allow 20%-80% control while other allow from 0%-100%.

Max Amperage of a PWM circuit is dictated by the FET/MOSTFET transitors current capabilities.

I design my own PWM circuits for LED lighting. :)

Re: PWM explained

PostPosted: Tue Nov 11, 2008 2:56 pm
by killerbee
Has anyone ever successfully used the PWM from the Mx00 series of ecus for controlling a fuel pump ?

Re: PWM explained

PostPosted: Tue Nov 11, 2008 3:58 pm
by figgie
killerbee wrote:Has anyone ever successfully used the PWM from the Mx00 series of ecus for controlling a fuel pump ?



too much amp draw for direct driving.

Now if you are feeding a solid state relay, than it should work fine and allow from 0%-100% DC useage at the autmobiles rated voltage (12v motor off, 13.v motor on).

Re: PWM explained

PostPosted: Wed Nov 12, 2008 5:39 am
by pnanassy
Which relay would be suitable for this? (part number,brand,source please)

Thanks,Peter

Re: PWM explained

PostPosted: Wed Nov 12, 2008 6:43 pm
by killerbee
I would thinking any appropriately rated solid state relay or mosfet would do (http://www.gifford.co.uk/~coredump/mosfetpwm.htm). What would be the best way to determine the required frequency ?

Re: PWM explained

PostPosted: Thu Nov 13, 2008 2:41 am
by figgie
killerbee wrote:What would be the best way to determine the required frequency ?


Unfortunatly trial and error.

The weight of the armature will be the biggest dictator of frequency as if it is heavy, too high a freq will cause a loss of speed control and a light armatuer at low frequency will cause an audible sound and noticealbe stoppage of the armature and whatever is connected to it.