Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

varying frequency PWM

Status
Not open for further replies.

yassin.kraouch

Advanced Member level 2
Joined
Jul 5, 2009
Messages
631
Helped
40
Reputation
80
Reaction score
40
Trophy points
1,308
Activity points
5,101
hI HAVE anyone an idea on how to vary the frequency that i obtain from a microcontroller, by a resistor or something like this ?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,447
Helped
14,038
Reputation
28,329
Reaction score
12,687
Trophy points
1,393
Location
Bochum, Germany
Activity points
275,962
I assume, that you understand, that changing the PWM frequency mainly involves timer programming and also scaling of output values. You can basically make the PWM frequency (respectively period) depend on a variable value in your application. If you manage it, then it's easy to use e.g. an analog input to control it, and connect a variable resistor or potentiometer as a control.

The said additional calculations needed in set-point scaling may however reduce the performance of your PWM. A very basic method to tune the PWM frequency would be in using an external RC oscillator for the processor and tune it by a resistor. The processor will be rather slow in this case, and all processor frequency based timing and baud rates will be varied as well.
 

yassin.kraouch

Advanced Member level 2
Joined
Jul 5, 2009
Messages
631
Helped
40
Reputation
80
Reaction score
40
Trophy points
1,308
Activity points
5,101
have you please a schematic that can help me ?? do i use a simple Resistor and capacitor ?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,447
Helped
14,038
Reputation
28,329
Reaction score
12,687
Trophy points
1,393
Location
Bochum, Germany
Activity points
275,962
For the RC oscillator option, refer to the uP datasheet. Or use a standard 555 oscillator circuit.
 

yassin.kraouch

Advanced Member level 2
Joined
Jul 5, 2009
Messages
631
Helped
40
Reputation
80
Reaction score
40
Trophy points
1,308
Activity points
5,101
so i can replace the quartz with a standard 555 oscillator ?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,447
Helped
14,038
Reputation
28,329
Reaction score
12,687
Trophy points
1,393
Location
Bochum, Germany
Activity points
275,962
If it fits the intended frequency range. You can also operate the PWM timer from a separate clock input. But you didn't tell about specific processors or clock frequencies.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top