0
\$\begingroup\$

I have a Highfine FFC1212DE 120mm fan that operates at DC 12V 3.0A max and want to control it variably using a RPi. The third pin on the fan is a tach reading, not pwm control.

I'm looking to change the speed of the fan based on temperature input so using a relay isn't a good solution.

What is the best way to do this? Can I use a higher rated digital potentiometer?

\$\endgroup\$
2
  • \$\begingroup\$ If you want to keep it simple, it sounds like you need voltage (or current) control, with you monitoring the tach reading to close the loop. A digital pot won't directly handle those currents. You could also consider PWM where you adjust the duty cycle as part of the closed loop control. But you probably will need to "filter/average" the tach reading (which means "delay it", too) and this can complicate PID tuning a bit. There are more ways, still. There are no "best ways," and certainly not without you writing a LOT MORE than you have. \$\endgroup\$
    – jonk
    Commented Apr 3, 2018 at 19:14
  • \$\begingroup\$ don't use the tach except to detect failure, use the temp and pwm cycle. \$\endgroup\$
    – dandavis
    Commented Apr 3, 2018 at 20:17

5 Answers 5

3
\$\begingroup\$

You can simply use a MOSFET:

schematic

simulate this circuit – Schematic created using CircuitLab

Based on the temperature, you have to generate a PWM wave at the digital out pin. The MOSFET chosen should be able to withstand the current requirement of the fan and switch on at 3.3 V input.

\$\endgroup\$
1
  • \$\begingroup\$ You do not need a diode across the fan, and PWM control like this is unlikely to give you the desired control. These fans are wither 2 -3 phase drivers with inbuilt controller, they do not respond well to PWM unless at very low frequencies (<100Hz) \$\endgroup\$ Commented Apr 3, 2018 at 21:22
1
\$\begingroup\$

These fans won't work well for PWM control, it will interfere with the onboard commutation control. You need to control the DC voltage fed to them, and will only get about 50-60% range in speed.

You could use a controller like this to get temp control without an MCU involved. The board itself is MCU controlled, it uses a STM8S003F3P6 so is quite capable, monitoring both temp and rpm feedback.

enter image description here

If you really want an R'Pi to control the set point/range then you could potentially fake out the NTC thermistor on this board with an I2C driven digital pot.

You DO NOT need to put a diode across the fan (or indeed any of the PC fans produced) ...there is no back EMF voltage generated by these fans, they are clamped internally in the commutation driver/controller

\$\endgroup\$
0
\$\begingroup\$

The pi's output is 3.3v and only a handful of milliamps. You'll need to use something that can control 12v and can handle the amperage too- that is most easily done with a FET. I'm partial to the NTD5867NL, which has a low enough gate threshold for 3.3v.

If you are doing on/off only, not PWM, you could use a relay.

\$\endgroup\$
0
\$\begingroup\$

PWM voltage tends to interfere with the Hall sensors commutation to make some audible aliasing noise, which you can reduce with a diode and big cap but why not a tiny series inductor and reverse clamp diode with a low ESR load cap at some high f (100kHz) and variable duty cycle , you now have a SMPS buck regulator. Congrats but you can buy these for < $10 or less or even with remote

\$\endgroup\$
-1
\$\begingroup\$

One way would be using PWM and controlling FAN speed with the duty cycle. Please keep in mind that you need a freewheeling diode across the terminals of the motor.

\$\endgroup\$
1
  • \$\begingroup\$ This type of fan is not suitable for PWM control, and you don't need a freewheeling diode. \$\endgroup\$ Commented Apr 3, 2018 at 21:23

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