PWM fan controler, missconfiguration?

Hey,
i try to regulate temperature through a exhaust fan (lower the temp → higher pwm). it needs around 65% to cool to 23°.
my settings:


the fan will just go to 30% doesnt matter if the temperature is higher or lower.
any idea?

Are those appropriate gains? What is the output? Have you plotted the output values alongside the setpoint and measurement on a graph widget?

Is there a specific reason you need to use a PID controller instead of using a Bang-Bang controller? The thermostat in most homes is a bang-bang controller and they regulate temperature just fine… much easier than a PID controller with basically the same results.

Hey :slight_smile:
First; kyle thank you for this amazing piece of software. My salad likes it :slight_smile:

And yes i plotted input out and setpoint for several minutes but the output is alwaxs 30% or pwm off if i dont use the min value option. Does not matter if the setpoint is below or above the input.

I am not sure if the gsins are correct as i cant test if the oitput is always the same. I tryed different gains with the same outcome.

Bsng bang is surely working but the noise of my fan going full rpm stops me from using that.

1 Like

You don’t have to have the fan set to full RPM with the bang-bang… you can set it to any PWM duty cycle you want.
First, you have to use the correct bang-bang module…
select the “Bang-Bang PWM raise/lower/both” controller. It can speed up the fan when the temp is high, and lower the fan speed when the temp is low, or turn the fan off completely.
This is going to be MUCH easier to tune and dial in than a PID for what you are trying to accomplish.


I’ve actually used this Function to control a fan that was keeping the Pi cool and it worked perfectly.

The P, I, and D outputs are what I’m referring to, which will indicate which gains are influencing the total/summed output value. Check the PID channels on the graph widget and you’ll see several output values.

@Lucid3y3 tryed the bang bang pwm controler… it works like a dream :slight_smile: thanks for the suggestion.
Maybe i need two different controlers on for light on and one for off. need to think about it.

Regarding the PID values i will have a look when i dont have plants growing :smiley: i am working in a bit of stress here… ;D

That’s how I have my system setup…
A fan RPM Function and humidifier VPD Function for day while the lights are on and creating excess heat…
And at night during lights off I only run the fan at about 50-60 % just so there’s some air circulation to help prevent leaf condensation as humidity rises because the temperature drops when the lights turn off. I avoid running the humidifier at night.