1
\$\begingroup\$

I've designed the following circuit in order to control a 12V fan with PWM. The circuit is meant to stay at a fixed frequency of around 25kHz but a variable duty cycle controlled by a potentiometer.

The circuit behaves just as per the design goals in LTspice. In this simulation, R6 and R8 represent the potentiometer.

I have now built the circuit on a real PCB and I have the following issues:

  • The PWM frequency not as per the design. This is probably because of components tolerances. To get a frequency closer to 25kHz, I need to change C1 to 82pF
  • The PWM frequency is not constant. This is quite problematic. At 25% the frequency can be as low as 21kHz and then at 80% around 29kHz. The fan I am using needs to be fed with a constant frequency, otherwise it "resets" so the increase/decrease of the fan blades rotational speed is not smooth as one would like it to be.

Note that the real PCB has some extra capacitors and a ferrite for decoupling and 12V filtering.

Do you see any problems with my circuit or have a recommendation to fix the problem with the frequency shifting up and down from its designed set point?

enter image description here

\$\endgroup\$
9
  • \$\begingroup\$ Why are your timing resistors so large? For better stability, use smaller resistors and a larger capacitor. \$\endgroup\$
    – Dave Tweed
    Aug 24, 2021 at 11:51
  • \$\begingroup\$ @DaveTweed can you elaborate? Is this because of noise or? Also, what about the original question. Thank you \$\endgroup\$
    – RWeiser
    Aug 24, 2021 at 12:30
  • \$\begingroup\$ The original question is "Do you see any problems with my circuit or have a recommendation?" I addressed that directly. \$\endgroup\$
    – Dave Tweed
    Aug 24, 2021 at 12:46
  • \$\begingroup\$ I have edited the question now for clarity of what information I am looking for \$\endgroup\$
    – RWeiser
    Aug 24, 2021 at 12:58
  • 1
    \$\begingroup\$ If you want a constant freq then you need to use two 555's, one to set the freq and the other to set the pulse width. I recommend you DO NOT use 555's, use an MCU, you'll get better results (and you already have on). Read this ref to understand the 4-wire spec: web.archive.org/web/20110726062453/http://www.formfactors.org/… You could also use a simple single chip solution such as the PCA9685, which is connected to I2C and allows up to 16 PWM channels. \$\endgroup\$ Aug 24, 2021 at 15:57

1 Answer 1

1
\$\begingroup\$

The fan isn't that sensitive to the PWM frequency. The 25KHz spec is designed to place any acoustic noise the PWM might cause above the audible range (at least for humans.) If it deviates some it's ok.

That said, I've addressed this type of PWM in some detail here: 12V to 5V regulator for PWM fan controller

From that answer, here's the circuit (simulate it here):

enter image description here

This circuit uses the OUT pin for feedback, and takes advantage of the open-collector DISCH pin to drive the PWM pin. It also uses a more reasonable R/C selection (bigger cap) than what you're trying to use.

\$\endgroup\$
3
  • \$\begingroup\$ Does this circuit keeps the frequency "stable" or does it also has a range proportional to the duty cycle? And I am referring to the actual built circuit, as my circuit works with a stable frequency over the simulation but not on the actual PCB. \$\endgroup\$
    – RWeiser
    Aug 25, 2021 at 2:57
  • \$\begingroup\$ The issue with your circuit is the small cap. That said, I didn’t prototype this, but the OP in the linked answer did and found it to be ok. \$\endgroup\$ Aug 25, 2021 at 17:31
  • \$\begingroup\$ Hello, I have built your attached circuit in a real PCB and unfortunately, it does not work as well as in the simulation... The freq value is off, but that is easily fixed by making the cap 3.3nF, however, even with the variable resistor fully turned to one side, there is still a square signal with an 8%-10% duty cycle. \$\endgroup\$
    – RWeiser
    Oct 6, 2021 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.