Pic pwm frequency selection

Status
Not open for further replies.

richardc

Junior Member level 1
Joined
Aug 5, 2007
Messages
16
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,391
Hi,

Am adding pwm to my Pic program to drive 2 darlington transistors that in turn drive 12v led strips and a 12v fan.

While it all works ok on a frequency of 2500hz , wonder if there is any standard forumula for determining the best pwm frequency or is it literally just random ?
 

There isn't a formula but it certainly isn't random.

There is a compromise between PWM rate and it's effect on the circuit you are controlling. At lower frequencies the circuits tend to have lower losses because switching speed is small compared to the PWM frequency. as the frequency increases the switching losses increase and eventually become a problem. The design choice is to find a suitable compromise. For example you probably wouldn't want to use a 10Hz PWM rate to control your LEDs because it would show annoying flicker but equally you wouldn't want to drive them at 1MHz where the driver circuit would probably use more power than the LEDs it is driving.

In some applications, like SMPS and audio synthesis the speed has to be high enough to allow enough steps to recreate a waveform so the PWM lower rate is limited to the waveform frequency multiplied by the steps with each cycle.

Brian.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…