0

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

RWeiser
  • 131
  • 1
  • 8
  • Why are your timing resistors so large? For better stability, use smaller resistors and a larger capacitor. – Dave Tweed Aug 24 '21 at 11:51
  • @DaveTweed can you elaborate? Is this because of noise or? Also, what about the original question. Thank you – RWeiser Aug 24 '21 at 12:30
  • The original question is *"Do you see any problems with my circuit or have a recommendation?"* I addressed that directly. – Dave Tweed Aug 24 '21 at 12:46
  • I have edited the question now for clarity of what information I am looking for – RWeiser Aug 24 '21 at 12:58
  • Just to clarify then, you are using a 500k pot? – DSI Aug 24 '21 at 14:20
  • 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: https://web.archive.org/web/20110726062453/http://www.formfactors.org/developer/specs/4_Wire_PWM_Spec.pdf 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. – Jack Creasey Aug 24 '21 at 15:57
  • Have you looked at making a simple fixed astable circuit and then put a pot on pin 5 (CV). Look at the internal diagram of the 555, and you'll see you can adjust the duty cycle of the circuit with this pin. – Aaron Aug 24 '21 at 20:17
  • Using CV doesn't work that well over the full range, and it's dependent on the 555's voltage divider values. – hacktastical Aug 24 '21 at 23:23
  • The reason to use I higher value pot was so I can use lower value caps with 5% tol and C0G dielectric. That said, I could have chosen 100K and still be able to find these sorts of caps. – RWeiser Aug 25 '21 at 02:55

1 Answers1

0

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.

hacktastical
  • 49,832
  • 2
  • 47
  • 138
  • 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. – RWeiser Aug 25 '21 at 02:57
  • 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. – hacktastical Aug 25 '21 at 17:31
  • 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. – RWeiser Oct 06 '21 at 09:46