# Changing the duty cycle of a PWM signal

## Main Question or Discussion Point

I'm trying to control the speed of a computer fan using the radio input from an RC transmitter/ reciever.
The PWM output of the reciever is 1ms to 2ms high and 20ms low, so 10%-20% duty cycle. The computer fan requires a 30% to 100% duty cycle, at 25khz (about a 40uS pulse)
I was thinking of using a 555 timer (astable, monostable wouldn't work) but that's a minimum of 50% duty cycle. Control this with a potentiometer turned by a servo.
Are there any other ways to do this? I wouldn't mind getting into micros because I want to learn that at some point but I need to learn how to code. I can write computer code so the concepts are sorta there but language is an issue.
Nothing impossible please, I'm only 16, I have most of the knowledge but not all of what a fully aged person would.

Related Electrical Engineering News on Phys.org
jim hardy
Gold Member
2019 Award
Dearly Missed
well there's any number of paths to success here.

Dont give up on any one until you've pushed it a bit.

what happens to a 25% duty cycle if you invert it?
does it not become 75% ?

if you tie TRIG to THRESH and use them for input leaving RES high, , will it not act as an inverter?

Is a 556 two 555's in one package?

Probably it's pretty easy with PIC controllers too, but i never learned them.

Humm I guess that makes sense (hardly), but how do I determine which circuit I'm using as the output?
I'm no technical geniusm so it might require a little teaching to get me started. Remember, I'm still in high school

vk6kro
This circuit is commonly recommended for getting full PWM control from a 555.

I used it once for a model train controller and it worked OK.

You might have to fiddle with the size of C1 to get the right frequency if this matters.

Last edited by a moderator:
Thanks, I'll play with it a little bit to see if I can get it working.
Is there any way (without giving me a schematic, I want to try it on my own) to get a PWM input and output but different freq/dr?

vk6kro
Thanks, I'll play with it a little bit to see if I can get it working.
Is there any way (without giving me a schematic, I want to try it on my own) to get a PWM input and output but different freq/dr?
No, I can't think of any way.

The servo command you are using is only meant for servo motors. Does your micro have any other PWM commands?

I think the frequency you want for your fan is very higher than the frequency generated by radio receiver. Here's some ideas. You might need to up-convert the frequency by mixing with some local high frequency. Or you can use a local oscillator and control the width using an SCR.

I think I'll just use the 555 and use a servo to control a pot. The frequency was functioning before it just didn't go to a high enough duty rate to get the fan to full throttle. I can not change the output unless I go into the firmware of the receiver. Since this receiver is being used in multiple applications, I don't want to do that.
Thanks for all the help.

I had an old servo controller lying around. Works like any brushed motor controller, using DC pwm current. I locked the potentiometer (used to determine servo location) with a little glue and now I have full throttle control of the fan. Now I might want to consider a way to shut it off when I give zero throttle, right now it stops slowing at 30% or so.

NascentOxygen
Staff Emeritus
I'm trying to control the speed of a computer fan using the radio input from an RC transmitter/ reciever.
The PWM output of the reciever is 1ms to 2ms high and 20ms low, so 10%-20% duty cycle.
So its period varies from 22ms to 21ms?
The computer fan requires a 30% to 100% duty cycle, at 25khz (about a 40uS pulse)
How precise must this frequency be? For example, could it be 30% duty cycle at 20kHz to 100% duty cycle at 50kHz?

I believe the receiver outputs at 22mS and changes the duty cycle. Servos can take anything up to 50mS so accuracy is not an issue, duty rate is what matters.
Same with the computer fan, I'm using a low frequency (~50hz) PWM input and it's still working just fine, again duty rate is being measured, but I am surprised it worked at this low of a frequency.
Yeah this is the easy way out, maybe I'll try the other way some other time.