Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Changing the duty cycle of a PWM signal

  1. Sep 19, 2012 #1
    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.
    Thanks in advance.
  2. jcsd
  3. Sep 19, 2012 #2

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    well there's any number of paths to success here.

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

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

    now look at your 555
    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.
  4. Sep 19, 2012 #3
    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
  5. Sep 19, 2012 #4


    User Avatar
    Science Advisor

    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.

    http://forum.allaboutcircuits.com/cache.php?url=http://www.sentex.ca/~mec1995/circ/pwm555.gif [Broken]

    You might have to fiddle with the size of C1 to get the right frequency if this matters.
    Last edited by a moderator: May 6, 2017
  6. Sep 19, 2012 #5
    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?
  7. Sep 19, 2012 #6


    User Avatar
    Science Advisor

    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?
  8. Sep 20, 2012 #7
    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.
  9. Sep 20, 2012 #8
    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.
  10. Sep 20, 2012 #9
    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.
  11. Sep 20, 2012 #10


    User Avatar

    Staff: Mentor

    So its period varies from 22ms to 21ms?
    How precise must this frequency be? For example, could it be 30% duty cycle at 20kHz to 100% duty cycle at 50kHz?
  12. Sep 20, 2012 #11
    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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook