View previous topic :: View next topic |
Author |
Message |
nuri
Joined: 28 Nov 2014 Posts: 5
|
which function i will use to change frequency |
Posted: Fri Nov 28, 2014 2:52 am |
|
|
hi every body
i want to know which function or how can i change frequency without damage duty cycle ?
tank you very much
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19551
|
|
Posted: Fri Nov 28, 2014 4:24 am |
|
|
Of what?......
If you mean the PWM, the only single function that would change it's frequency without changing the duty cycle, would be to change the prescaler. Gives typically three possible frequencies. For everything else, you will have to change the timer setting, and then change the duty cycle yourself.
Understand that the PWM, is not designed to generate variable frequencies. If you want this, then look at a chip with an NCO. |
|
|
nuri
Joined: 28 Nov 2014 Posts: 5
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19551
|
|
Posted: Fri Nov 28, 2014 7:39 am |
|
|
You vary the width of the pulse, not the frequency for this. This is what 'PWM' means (pulse width modulation). The fan here is designed to accept such a signal (you need to make sure the fan you have, is designed to accept such a signal), and choose a PIC with with a PWM module. The PWM signal on these fans is designed to be 25kHz (fixed frequency - but will accept anything from about 21 to 28kHz), and the speed is simply controlled by the PWM ratio. You'd want a PIC at perhaps 16MHz to give good resolution at this sort of PWM frequency. Then it is just a matter of setting up the timer to give a frequency close to the required 25kHz, and varying the PWM pulse width to control the speed. |
|
|
nuri
Joined: 28 Nov 2014 Posts: 5
|
|
Posted: Fri Nov 28, 2014 8:09 am |
|
|
ok . thank you very much for your answer , it means that i can not design the circuit that control the speed by varying frequency without changing of duty cycle right? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19551
|
|
Posted: Fri Nov 28, 2014 8:15 am |
|
|
Those fans do not want you to change the frequency. They require you to change the pulse width only. That is what the circuit being displayed does. Pull the data sheet for such a fan:
<www.formfactors.org/developer%5Cspecs%5Crev1_2_public.pdf>
The frequency has to be fixed for these. You change the pulse width only and the fan changes speed.
You are starting on a wrong premise.
These fans are common on PC's, and are operated by fixed frequencies. |
|
|
nuri
Joined: 28 Nov 2014 Posts: 5
|
|
Posted: Fri Nov 28, 2014 8:23 am |
|
|
yeah i understood what you said that the speed of that circuit is controled by varying then witdh of the pulse .. but let say for anothor example if i want to control the speed by varying frequency without changing of duty cycle can i do it or not? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19551
|
|
Posted: Fri Nov 28, 2014 8:46 am |
|
|
The motors where you change speed with frequency, are things like BLDC motors, where you synthesise (normally three) signals to drive the motor phases. You leave the PWM running at a fixed frequency, and vary the apparent frequency of the much lower frequency 'synthesised' signal, by varying the pulse width of the PWM. Have a look at Microchip application note 857a, and the others on such control. You don't change the frequency of the PWM, you synthesise a lower frequency signal with this. |
|
|
nuri
Joined: 28 Nov 2014 Posts: 5
|
|
Posted: Fri Nov 28, 2014 9:07 am |
|
|
ok thank you very much for your all answers |
|
|
|