PI controller for PWM fans - Page 1
Forum section: electronics / projects

author: Biduleohm
author_rank: Contributor
timestamp: June 14, 2015, 01:10:43 am
content: Hello,The goal is to control PWM 120 mm fans to cool some HDDs in a server. As the server is not far from my bed I need it to be very quiet so I need to set the fan speed to the minimum I can while still cooling the drives correctly.The requirement is that I want to maintain the drives at about 35°C.I already designed a controller based on a LM35 (which will be attached to the case of one of the drives) but it's only proportional and I want to modify it to add an integral term to negate any steady-state error.Here's the current schematic:As you can see the loop is currently of the form of a * x + b with a = RV1 and b = RV2.So I need to (at least) add a cap but I'm not sure if I can just add it without changing anything else and where to add it exactly.NB: the drives have a huge thermal inertia so the loop will probably be very stable without too much tuning, and minimizing loop rise-time isn't a concern at all.Thanks in advance for any help

author: Circlotron
author_rank: Super Contributor
timestamp: June 14, 2015, 01:26:03 am
content: I'd say put the cap in series with R7 and RV1.All that extra stuff around the top two opamps doesn't look like it does very much except provide a fixed voltage to the very last opamp. Why not just use a pair of fixed resistors as a voltage divider and be done with it?Edit -> now I see it's a triangle wave oscillator, my bad

author: Biduleohm
author_rank: Contributor
timestamp: June 14, 2015, 01:43:22 am
content: ThanksI don't need to add another trimmer to be able to vary the integral coefficient? or maybe just varying the cap value is enough?Also I wonder about something: there's not really a setpoint like in the classic PI(D) controllers so I'm not sure if we can say that U1D is treating the error term because it's actually the measure term, no? or I'm just wrong?

author: Circlotron
author_rank: Super Contributor
timestamp: June 14, 2015, 04:06:48 am
content: I suppose U1D really ought to be an inverting integrator, but what the heck. Rough enough is good enough! Given the thermal time constant of your HDD metal case you are probably going to need a pretty darned big capacitor to make the thing work properly.

author: Biduleohm
author_rank: Contributor
timestamp: June 15, 2015, 11:46:29 pm
content: I tend to do things right so I wonder if I can free one of the two op-amp used for the triangle oscillator by using this circuit instead:http://www3.eng.cam.ac.uk/DesignOffice/mdp/electric_web/Semi/03058.png(using Vramp as a pseudo triangle wave) the downside is that the PWM output will not vary linearly with the input value but I think it should be OK.Then with the free op-amp I can design a proper PI loop. I think I'll need a proper integrator because it'll involve some very high value resistor and capacitor that I can't merge with the existing amplifier. Also I can add a proper set-point trimmer.Is this a good idea?Edit: new schematic:I'm not sure about the amplifier + integrator design with U1D (how I do to be able to change Kp and Ki for example?) and the R9, R10 and C3 values are just random for now, also the final comparator isn't connected, but everything else should be ok. RV2 sets the set-point.