![]() | ||
|
|
General Liquid/Water Cooling Discussion For discussion about Full Cooling System kits, or general cooling topics. Keep specific cooling items like pumps, radiators, etc... in their specific forums. |
![]() |
Thread Tools |
![]() |
#1 |
Cooling Savant
Join Date: Jan 2005
Location: USA
Posts: 129
|
![]()
I have been studying the working of ATMEL 89C52 Microcontrollers. To polish what I have learnt, I am going to make a FAN controller for my Water Cooled rig. I have the following questions:
a) The Microcontroller (MC) would sense the temp of radiator and air. If the difference were huge, it would increase the FAN speed. How high should the difference be, so that FAN is made to operate@ 100%, 50% and 25%? I am going to use two sensors for this job. One would show room temp other the rad temperature. I could dip the sensor in water itself but my experimentation has shown that there is only 0.5 C difference (worst-case scenario) between water and rad temp. Mostly they are same. b) To count the number of rotations, I am thinking of connecting the yellow wire (I assume PWM, sends square wave for every rotation) to the MC's interrupt. The number of times interrupt is called would be the rotation count. Is this approach good? c) All the data (temperatures and rotation) would be sent to COM. OK? Future upgrade to this setup would be to calculate flow rate, thermal shutdown.
__________________
NOTE: Suggestions are based on my perceptive. I could be erroneous. Therefore, no one has the right to criticize an individual other than rephrasing and or expressing his own annotations on the subject matter itself. ![]() |
![]() |
![]() |
![]() |
#2 | |
Cooling Savant
Join Date: Jun 2005
Location: Skokie, Illinois
Posts: 322
|
![]() Quote:
On a practical level, what this means is, at the 50% setting, on hot days (summer/large delta t) the fans will run fast and on cool days (winter/small delta t) the fans will run slow. In theory................: Delta t: |5*C|---------|10*C|----------|15*C|-----------|20*C| Fan speed: 25%>>>>>>50%<><><>50%<<<<<<<100% In summer |15*C|---------------------------------------------|20*C| 100%>>>>>><><><><><><><<<<<<<100% In winter: |5*C|----------------------------------------------|10*C| 25%<><><><><><><><><><><><><>25% Also, as ambient temps rise, the delta t increases, but as heat generation rises, the delta t decreaces "How high should the difference be...?" As you can see from the above considerations, the "difference" (i. e. delta t) is a dynamic parameter that is independent of the amount of heat that has to be removed. A better choice would be to tie the fan speed into something that is representative of the amount of cooling needed...like CPU temp. But that's been done already, so what fun would that be?
__________________
My new rig.... Intel SE440BX-3, PIII 550 (@ 680) MX440 275/332 (@ 350/400) and 3DFX Voodo 5 5500 160/160 (@180/180) Two Opticals and 120 gigs (w/28gigs in RAID0) on 4 Maxstors |
|
![]() |
![]() |
![]() |
#3 |
Cooling Savant
Join Date: Jan 2005
Location: USA
Posts: 129
|
![]()
This is what I have practically observed:
When water temperature increases so does the CPU temp. With full load, FAN running at 12V, the difference between room temp, and water remains constant i.e. difference of 2C (this holds true regardless of load at set voltage). The max CPU I have seen is 55C. The min is 10C above ambient i.e. 41 C (room temp when 31C). Water being 33C. Turning off the fan, the water temp gradually rises i.e. linearly with load (that is understood). Fan running at 5V, the temp remains constant with normal use (No gamming). However, running say, NFS Carbon... The temp rises. The difference between air temp and water gradually increases. I have noticed difference of 8 C max. My aim was to maintain the 2 degree difference of water-air. This would work great in summers but I sense flaw in winters. Since CPU might be cool enough yet the fan would spin fast as it would sense greater difference (water to air ratio) under load. ----------- Now I cannot directly control the fan from mobo since its a 0.8amp and my mobo supports 0.4amp max as per manual specs. I can use transistor but....wheres the fun in that! Furthermore, I was thinking to design a software through which I could see the temps in windows and control the fan speed. That would make life easier since I could switch between performance mode and quiet mode. Now you guys have to guide me. I cannot just stick LM35 near the cpu. I can but I doubt it would sense the actual CPU temp (I can use Arctic Silver’s epoxy, but again where to ‘stick’ it?). What are my options?
__________________
NOTE: Suggestions are based on my perceptive. I could be erroneous. Therefore, no one has the right to criticize an individual other than rephrasing and or expressing his own annotations on the subject matter itself. ![]() |
![]() |
![]() |
![]() |
#4 |
Pro/Staff
Join Date: Oct 2001
Location: Klamath Falls, OR
Posts: 1,439
|
![]()
Practically, you don't care about the air temperature, do you? All you care about is the CPU temperature.
Because the CPU temperature will be controlled by the water temperature, all you have to do is maintain the water temperature to a certain threshold. The water temp must not be above X, where X is dependent upon your desired CPU temperature and the C/W of the water block (and the other stuff like coolant type, coolant mass flow per time, etc...). You can determine the ideal water temperature if your coolant system is constant. Then, simply use a feedback loop to adjust fan speed. Everything else just takes care of itself. To test the system, change variables and see what happens: - Hot ambient air means that the coolant temp rises and the fan speed will increase. - Hot CPU means that the coolant temp rises and the fan speed will increase. - Cold ambient air means that the coolant temp decreases and the fan speed decreases. - Cold CPU means that the coolant temp decreases and the fan speed decreases. - You eat ice cream in the summer, become happy but the CPU temp does not change, so the coolant temp does not change and the fan speed remains unchanged. |
![]() |
![]() |
![]() |
#5 |
Pro/Staff
Join Date: Oct 2001
Location: Klamath Falls, OR
Posts: 1,439
|
![]()
By the way, I just wrote a small bit of temperature control firmware for a customer using an MSP430 microcontroller. What I did was use a temp to voltage temp sensor being read as slowly (and thus accurately) as possible. Based upon the temperatures, I adjusted some solenoids to control airflow.
Since I couldn't directly measure the temperature of the important structure, I measured the temperature of something that was directly attached. This is analogous to your situation. The coolant isn't the CPU, but it IS directly attached via a non-variable junction. So, you will see a directly correlated (linearly) temperature that should suffice. The biggest problem will be the temperature compression, not any lack of correlation. The advantage of the MSP430 for a hobbyist is that I have a free C compiler for a 14-pin DIP package. Plus, that microcontroller has a set of built-in A-D peripherals , a good timer, and very low power consumption. |
![]() |
![]() |
![]() |
#6 |
Cooling Savant
Join Date: Jan 2005
Location: USA
Posts: 129
|
![]()
No, not interested in air temp.
But the setup you are mentioning has a flaw i.e. the program/microcontroller would work good only for my rig. I want it to be generic. ( this is when I consider in C/W rating). Your idea most certainly will work for both summers and winter by maintaining the temp. You are saying that I should take CPU temp readings and control FAN speed accordingly, right? Furthermore, in summers my room temp remains 31C. Now even with full fan speed I get 33C water temp with CPU at 41 (idle). Following is a consideration (as of yet, I have not practically tested this): Now if say even at 7V water temp remains 33C, then there is no use running the fan at 12V. My point is that the best my rad/fan can give is 2 degrees above room temp. And if same is true for both 12V and 7V, how can the microcontroller decide to lower the speed? Since water temp remains constant at certain fan speed range. Thanks.
__________________
NOTE: Suggestions are based on my perceptive. I could be erroneous. Therefore, no one has the right to criticize an individual other than rephrasing and or expressing his own annotations on the subject matter itself. ![]() |
![]() |
![]() |
![]() |
#7 |
Pro/Staff
Join Date: Oct 2001
Location: Klamath Falls, OR
Posts: 1,439
|
![]()
OK, if you want this to work for any and all rigs it becomes more complicated.
My suggestion is to have a tweaked parameter on the microcontroller that is derived for each system: calibration. Basically, you want the water temperature to be at or below a certain point. Have a default value on the microcontroller for that water temperature and then feed an updated value to it from the computer when it boots. I assume your RS-232 interface to the microcontroller will be two way, right? Also, counting pulses using the interrupt pin is ... messy. If your max frequency is X Hz, then sampling at 2X Hz is sufficient to reconstruct the state transitions and count. So, if you have something like a 50Khz timer interrupt, the code below will work well for fans that go up to 25,000 rpm. Code:
static int LastFanValue = 0; static int FanPulses = 0; static int TicksSinceEvalRpm = 0; static int CurFanRpm = 0; #define TICKS_PER_RPM_EVAL 50000 #define RPM_EVALS_PER_MINUTE 60 void TimerTick() { TicksSinceEvalRpm++; int iCurVal = GetFanValue_Register() & MAX_FAN_VALUE; if (iCurVal != LastFanValue) { FanPulses++; LastFanValue = iCurVal; } if (TicksSinceEvalRpm >= TICKS_PER_RPM_EVAL) { CurFanRpm = (FanPulses * RPM_EVALS_PER_MINUTE) / 2; FanPulses = 0; TicksSinceEvalRpm = 0; } AdjustFanSpeedFromTemp(); } void AdjustFanSpeedFromTemp() { if (TicksSinceEvalRpm == 0) { // Adjust voltage for radiator fan } } |
![]() |
![]() |
![]() |
#8 |
Cooling Savant
Join Date: Jan 2005
Location: USA
Posts: 129
|
![]()
Yep that will do the job. A tweak setting in software would make it easy.
However, during boot up the fan would run at full speed (in summers) as room temp would be 31C which is bad. Soon as windows loads, software would take over. And yes, it is going to be a two way communication through RS232. Timer interrupt is a good idea. In 89C51, I have only one left with serial com. I do not know why it didn’t hit me, since through timer I can count multiple Fan rpms. BTW, I have been 'googling' but could not find much info regarding the 'yellow' wire. All I know is that it sends a square wave, now how to feed it to Microcontroller. i.e: Any idea what is the output voltage of the yellow wire? For the microcontroller coding, I would be using assembly language. For the software, J2SE ...JAVACOM. I am studying your coding as I post. ohh and thanks.
__________________
NOTE: Suggestions are based on my perceptive. I could be erroneous. Therefore, no one has the right to criticize an individual other than rephrasing and or expressing his own annotations on the subject matter itself. ![]() |
![]() |
![]() |
![]() |
#9 |
Pro/Staff
Join Date: Oct 2001
Location: Klamath Falls, OR
Posts: 1,439
|
![]()
I'm glad you picked up on the ability to monitor multiple fans. My original code sample had names like TicksSinceEvalRpm_0 and parameterized subroutines for each attribute, such as GetFanValue_Register(iFanIndex), but I thought it was too complicated for a quick post. Get one fan working and then move to N fans.
As for the fans, I'm not sure what you mean by the yellow wire. For the big four-pin molex connectors that goto hard drives and such, the blacks are ground, the red is +5v, and the yellow is +12V. No PWM is present from the PSU. For a fan connected to the motherboard, the typical 3-wire connection has power, ground and tach sensor. The power may be pulsed, and the tachometer signal may only be valid when power is on. This complicates your design, of course. Alternatively, you can use an LC (inductor plus capacitor) filter on the square wave output of you PWM controlled power to change it to flat DC current. Then, the tachometer value would be valid as long as the voltage is enough to power the fan (5-7V usually?). Or, you could only watch RPM while the power is on (with a brief delay after powerup to let the fan innards settle down). It gets complicated when doing PWM. I think this is why some fans have four-pin connections, to allow the fan innards to stay continuously "on" while the motor is pulsed. This way, the tach sensor is always valid. |
![]() |
![]() |
![]() |
#10 | |
Pro/Staff
Join Date: Oct 2001
Location: Klamath Falls, OR
Posts: 1,439
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#11 |
Cooling Savant
Join Date: Jan 2005
Location: USA
Posts: 129
|
![]()
The fan I have supports -33 open collector tachometer (through the yellow wire) and Option '-68' Locked Rotor Alarm (through green wire). Red is +V and black -V, a total of four wires.
It also supports ("-82," high-pass/low fail) , don’t know what that is. As far as I know, -33 give a square wave per revolution through the yellow wire. I need to know its voltage with respect to ground and details of its working. FAN INFO: http://www.nidec.com/fanpdfs/ta450dc7.pdf Pic: http://cgi.ebay.com/12V-DC-Fan-Nidec...QQcmdZViewItem Yeah it has an onboard flash memory of 8KB. Ok I am getting the idea.
__________________
NOTE: Suggestions are based on my perceptive. I could be erroneous. Therefore, no one has the right to criticize an individual other than rephrasing and or expressing his own annotations on the subject matter itself. ![]() |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|