Hello,
I am looking for a way to control a PWM fan depending on a measured temperature.
Fan is a Noctua NF A12 PWM which is connected via a PCA9685 with the Raspberry. Temperaturesensor is a DS18S20.
So I know that there are PID nodes but unfortunately I do not really understand this.
The fan cools a housing and should keep the target temperature in it. I know roughly how I could do this with an if / then circuit but the fan will probably not survive long. The fan must find the right rpm to hold the temperature.
Probably would help to describe how sensitive/critical the temperature control needs to be. There have been quite a lot of discussion of this kind of thing in the old Google Group so you might want to look there too for the PID stuff if that is really what you need.
If it isn't so critical, you could simply mess with the settings until it is about right.
Hi,
its a Housing for a 3D-Printer so its not so critical.
But this PID blocks only give on or of and not for example 30% pwm to hold it or i am wrong with that?
Sorry, I've never really got my head around PID (to me it means "Personally Identifiable Data" which doesn't help my understanding!).
I think that I would just set up a simple feedback loop such that increasing temperature increases fan speed and then tweak parameters till you get something sensible.
No, that is wrong. node-red-contrib-pid gives a linear output between 0 and 1 to indicate the 'power' required (which in your case is speed). You have probably been confused by the use of the node in conjuction with node-red-contrib-timeprop which converts the linear output to a time proportioned (ie pulse width modulated signal) for controlling a heater, compressor or whatever that does not have a linear control.
If it is of interest then do a bit of googling to get the basic idea of what pid is all about then have a look at this blog [1]. It has a flow with process simulator and you can play with the pid setup and see what effect it has on the control.
If accurate temperature control is not required and just switching the fan on when it goes above a setpoint and off when below (with some hysteresis to stop it switching too rapidly) then node-red-contrib-ramp-thermostat may well do what you want. You can just ignore the ramp part of it if you don't need it.
If you only need a temperature-control including hysteresis but without the node-red-contrib-ramp-thermostat 's profile feature , have a look at the use case Hysteresis in the Wiki:
first of all: Hi to everybody! I'm all new to this forum. And I need you already
I try something quite similiar to that. I have a lowboard with all my receiver stuff and a NAS inside, which I can't power on while it's closed. So I installed fans (Arctic F14 PWM), a raspberry is working in there anyway.
My question to you. Have you realized a readout of the fan speed? With my solution, no readout seems to make any sense (e.g. the count of Impulses decreases while the RPM is increasing). That drives me crazy right now. That, and the PWM-Pinout which produces an annoying noise within the fan depending on the frequency.
Do you have a basic hint on how you did that? Did that even occur to you at all?
Yeah... well... There's no real need for that, that's true. But then there is this abandoned pin with an unused signal
Maybe it's a topic for another thread then!