6
\$\begingroup\$

I'm controlling a 4-pin PWM fan from a 5V PIC and before going too far I'll say that everything is working fine but I'm just not understanding what I'm seeing on my scope.

The fan has a 12V supply and an internal pull-up on its PWM control line, so I'm driving it from the PIC's PWM output via a 2N7000 MOSFET. This is the schematic:

schematic

During testing, I hooked up my scope with one probe on the fan's PWM line (i.e. the drain of Q1) and another probe on the output from the PIC (i.e. pin RC5 or the gate of Q1).

So with a 25KHz PWM with 90% duty cycle (active low from the PIC because it's inverted by Q1), I get the following, which looks ok (the top yellow trace is the fan's PWM and the bottom blue trace is the PIC's PWM):

90percent

However, as I reduce the duty cycle, for example to 30%, the amplitude of the fan's PWM drops:

30percent

And at 15% duty cycle:

15percent

Like I said, it's all working ok, I just can't understand where this drop is coming from. I took a few measurements and plotted in Excel, which looks like this, with duty cycle on the x axis and the voltage across the drain and source of Q1 on the y axis:

chart

I don't think it's a measurement artifact of the scope because the PIC's PWM shows a solid 5V at every duty cycle, but I don't see why the behaviour of Q1 should change just because of a different duty cycle. So is this something unknown that's happening inside the fan's circuitry or have I misunderstood something?

The technical data for the fan shows a performance curve like so, which is of a similar nature to my Excel chart:

fan

If anyone can help me to understand what's going on I'd be very grateful. Even if just to say that it's something unknowable inside the fan, at least I'd know that I've not done anything wrong.

UPDATE

Ok, just to round this off, I removed the fan and added a 100K pull-up to +12V instead and indeed I do now see the full 12V at every duty cycle. For example, compare this with the previous 30% trace:

30pullup

So it seems that the fan itself is doing something to alter the pulled-up voltage depending on the duty cycle on the PWM control input. I'm happy with that but if anyone has any insights into what the fan maybe doing and why, it may be useful information for future reference. FWIW I can't find anything on the manufacturer's web site that gives this sort of detail.

\$\endgroup\$
  • 1
    \$\begingroup\$ This must be caused by the fan as the voltage at Q1's drain is only determined by the fan when Q1 is off. It all depends on how the pull-up for the PWM signal is implemented inside the fan. If it was just a resistor to 12V you'd expect to see 12V indepenent of the dutycycle of the PWM signal. If you have another fab with PWM control lying around you could check if you see the same effect. My guess would be that depending on the internal schematic of the fan you would either see this effect or not. \$\endgroup\$ – Bimpelrekkie Jun 11 '15 at 7:11
  • \$\begingroup\$ @Rimpelbekkie Thanks, that's what I was thinking too but just not quite so sure of myself. I do have a couple more fans so I'll see what they do. Also, I suppose I could just remove the fan and put a 100K pull-up to 12V instead? Should have thought of that first! \$\endgroup\$ – Roger Rowland Jun 11 '15 at 7:18
  • \$\begingroup\$ Yes, a 100k to +12V will do the trick. \$\endgroup\$ – Bimpelrekkie Jun 11 '15 at 7:22
  • \$\begingroup\$ @Rimpelbekkie I'll give it a go this evening. In any case, it's intriguing to wonder what the fan is doing and why ... must be something to learn there with a little digging... \$\endgroup\$ – Roger Rowland Jun 11 '15 at 8:27
2
\$\begingroup\$

It might be possible that the PWM input is only a controlling input for the fan which means that some hidden circuits inside the fan do the "real" controlling of the fan and maybe also vary the voltage together with the duty cycle. I've seen something like this before.

\$\endgroup\$
  • \$\begingroup\$ Yes, that is indeed how the 4-pin PWM fans work. It's so you can read the speed sensor without cutting its ground by PWM'ing the power. \$\endgroup\$ – Roger Rowland Jun 11 '15 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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