Home     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
   
 Home     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

Author Topic: Automatic 4-fans (120mm) PC-box cooler/regulator + temperature indicator/alarm  (Read 35943 times)

0 Members and 1 Guest are viewing this topic.

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
It was about time. About two years ago, i had start designing the PC box of my dreams. This PC box was supposed to be at first practical. I had many parameters in my mind when designing it. In hurry:

1.  The box should be part of the whole PC furniture
2.  The box had to be big enough to fit at least 2 complete PCs
3.  The keyboard deck should be vandal proof.
4.  The height of the keyboard should be MAX 70cm above ground
5.  The monitor should stand MAX 25cm above the keyboard
6.  There should be a place between those two, that would be an angled plane. That would be the control panel of the box/pcs and not only.
7.  The box should be able to become air tight close (for later peltier cooling project)
8.  The box should be easy to reach
9.  The box should be as close to the control panel as possible, so that USB, DVDs, LEDs, card readers and staff would be fit onto the control panel with no cable extensions...
10. My legs should be able to go all the way back (the overall depth is 95cm) and my knees should not hit anywhere under
11. Any part of the furniture must be able to handle 110 kilos of load, no matter if this part is fixed or moving
12. My legs should rest on a 20cm leg-rest that exists deep under the furniture
13. The box must be well cooled with under-powered silent fans, so that it will be as silent as possible.
14. The overall width of the furniture is 1,35 meters
15. On the monitor deck, bookshelves are standing, thus the monitor deck must handle a hell of heavy load.
16. Nothing is considered to be wireless inside my room. Absolutely nothing. So considerations for all wires (internet, intranet, telephone, power, UPS power, sound etc etc etc etc) must be taken into account

Maybe there was more parameters that i have currently forgotten....

Tens of ideas came from my mind. More than two years i was in the designing room with a 3d modeling software, making and deleting projects. Others was too big, others too small, others had the PC away from the control panel, others had a tiny keyboard place, others had big keyboard place but with no durability... None was perfect enough for my tech lab. Until one day, a lightning struck inside my head giving the boosts in my imagination. Check the 3d models of the tech labs furnitures!



« Last Edit: June 21, 2009, 18:36:09 PM by kam »

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
From design to reality
« Reply #1 on: June 21, 2009, 19:04:28 PM »
I could be considered a a lucky bastard, as i am a CNC technician, and daily i visit different woodworking industries. Also, i happen to be good to my work and good in PR ( ;D ;D ;D). Because of the previous facts, i have easy access to woodworking machines, from the simplest band saw, to the finest "edge of technology" so far CNC machine. Therefore, i can release my imagination when designing furniture.

It took me about a week (not daily work of course) to full-fill the whole furniture (all 4 of them including the leg support). I have attached some photos from what we are interested of: The computer furniture!


kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
The main subject of this project is the fan controller
« Reply #2 on: June 21, 2009, 19:19:22 PM »
Hopefully, my efforts and calculations proved to be according to my expectations. The furniture is working perfect, and is ergonomic.

But hey, the subject is the controller, not the furniture

Well, now you've got the point. I need to cool this box. I could have all 4 fans to work at full load but it would be like a truck in my room. I could have them undervoltaged as well. that would work ( at about 800rpm i get about 8 to 8.5 degrees higher temperature) but it would not be "me".

The project that i am currently making is a PIC fan controller. The PIC will have two temperature sensors: one to measure the ambient temperature and one to measure the box temperature. The sensors are implimented by the DS1621 chip that i love and trust.

The controller shall operate into two modes: The manual mode and the automatic mode. In manual mode, the speed of the fans shall be set by hand and shall bekept no matter the temperature. In automatic mode, the speed is changed according to PC box temperature. The speed is divided into 5 steps. Each step corresponds to different rpm of the fans. I could have make 4 different PWM controllers but i preferred to make one and power all the fans from the same mosfet. I expect to have some tens of rpm differencies between the fans, even though all of them are exactly the same.

There will be an rpm measurement taken from each and every fan separately. There will also be a master fan. This fan will be the rpm feedback. All fans are monitored according to the maser fan. They should have rpm within a threshold. Also, none of the fans should have less than the maximum rpm threshold that each speed (1-5) has.

Attached i have an open office spread sheet (converted to excell format). Within this, i have kept measurements of the temperatures (ambient and box) that i get after hours of operation in the same speed (rpm). The results are for further setting of the automatic operation of the box.

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
The circuit
« Reply #3 on: June 21, 2009, 19:33:43 PM »
The circuit is controlled by a PIC 16F88. The PIC will control the LCD ( 20x4 classic or blue LCD with backlight) via two CD4094 SIPO shift registers. Also, it will control the fans with the built-in PWM controller, via an IRF520 mosfet with heatsink. The temperature is taken from two DS1621 digital temperature sensors. The fans will have their rpm feedback pin connected to four BC328 amplifiers. the signal will be 12V at this point. Following, a CMOS buffer (4049) will make the signal into clear rectangular pulses. Right after, the signal shall be dropped down to 5V using a 4081. A 4017 will select each time only one fan's signal to be driven through a 4066 bi-directional switch. The rpm interface circuit described above will be a separate PCB placed near by the fans. On this board, the mosfet will also be placed. This PCB will be conneted with the main controller with 7 wires (using an 8-pin connector).

A buzzer will be the alarm if a failure occurs.

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
The menu system and the menu control
« Reply #4 on: June 21, 2009, 20:00:35 PM »
The most interesting, hard and impressive part is the menu system.

it will be controlled by a rotary encoder with momentary pushbutton attached. I found those beauties from an ebay bid for as low as 20cents a piece. I bought all 15 pieces of the bid for 3 euros... You can see one of them in the first picture attached.

The main screen is the one shown in the first attached image. In this screen, the ambient and box temperatures are indicated, as well as the rpms of the 4 fans. Also, the fan gear selected will be indicated (1 to 5) . Below that, there is the mode (Auto of Man for manual). Last, on the bottom left corner, the signal "mute" appears if the user selects the buzzer to be inactive.

To enter the menu system, the user must keep the rotary encoder pressed for about 2 seconds. The first screen appeared is as the second image attached. Then, by rotating the encoder left or right, the user can select the value to change. The values are as follows:

Operation: Auto or manual
Sound: On of Off
Speed 1 D.C.: A value from 0 to 255.
Speed 2 D.C.: A value from 0 to 255.
Speed 3 D.C.: A value from 0 to 255.
Speed 4 D.C.: A value from 0 to 255.
Speed 2 temp: A value from 0 to 255
Speed 3 temp: A value from 0 to 255
Speed 4 temp: A value from 0 to 255
Speed 5 temp: A value from 0 to 255
Startup speed: A value from 1 to 5

The first two values are straight forward. The next set of 4 values indicates the PWM duty cycle for each speed. Zero D.C. is 0 and max (100%) D.C is the value 255
Following set of 4 values indicates the PC box max temperature that each speed works. If for example the temperature inside the box is greater than the value in Speed 3, then the PIC will shift up one speed and will go to 4 etc.

The last value is the startup speed. This is the speed that the fans will operate (if in manual mode was pre-selected) when the circuit starts up or resets due to brown out or other interference.

To change a value, the user will have to select first this value and then click once. Then the LCD will display an image like the attached photo 3.
By rotating the encoder, the value is increased or decreased accordingly. Then, one click will transfer the cursor to the bottom menus (Edit-Discard-Save). The Edit will send the cursor back to edit mode. The Discard will discard any changes and the save will save the ne value of the parameter. With the encoder the appropriate action is selected and confirmed with a click. The LCD is changed back to the previous "parameter selection" menu.

To leave the menu and return into operation screen, the encoder button should be pressed and held for about 2 secs.

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
A first schematic impression
« Reply #5 on: June 22, 2009, 18:31:41 PM »
That would be just a first schematic for the controller (and just the controller). Right now, this is the way it works, but it could change...

spic0m

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 841
Built it quick kam cause i'm also preparing my htpc with LinuxMCE and I WANT IT! :)

kourt

  • Guest
Great   :o

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
i am waiting a batch of transistors that i run out of (  :-\ ). As a matter of fact, it is working in the pcbh techlabs. Right now, this is the cooling system of the box. I just need to make a nice pcb and hook up all together. Oh, and a nice article for the people.

sysKo

  • Guest


This is my pc front Lian Li TR-5B 5.25" LCD Panel Thermometer and is very good!!!

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849


This is my pc front Lian Li TR-5B 5.25" LCD Panel Thermometer and is very good!!!

perfect! And how many fans can you control/monitor?

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Bad news, back to the R&D
« Reply #11 on: June 26, 2009, 18:22:38 PM »
Actually i was kinda expecting to see that happen. My goodies just arrived, and together the 3 beloved transistors came. I hook up all of them to the breadboard, did some soft-work and saw the results. I was rather astonished by the accuracy and the sampling rate of the 4 rpm counters within just one PIC (that does some tens of other jobs as well together), but i was also disappointed from the numbers acquired from the above results. The four fans when are in full power have almost the same rpms, around 1200rpm. But when i pwm them, i get funny results. Differences of up to 300 rpm!!! I planned to have 5 speeds for the fans, 600,800,1000,1100 and 1200 rpm, but with these differences, it is impossible.

The solution:
Another PIC shall be imported to the system. The only work of this pic will be to keep the fans in steady rpm with constant PWM change. A threshold of 20-40 rpm shall be kept of course. Each fan will have it's own mosfet. I will also try a transistor for lowering the cost ( :D ). The PIC shall receive a signal with the speed selection from the main controller (1st PIC) and the only thing to return is the rpm for each fan and an error message when in failure.

As you understand, the above scenario will take out the PIC built in PWM generator as i need 4 independent PWM signals. The new PWM signal will be generated from software according to the rpm readings.

Hopefully this will not delay that much the whole procedure.



An estimation of causes:
it would be rather un-scientific not to try to estimate the causes of this malfunction. How can be that 4 identical fans, that runs in identical rpm when in full speed, have such differences when underpowered. Stupid estimations have been made from time to time from more clever and reliable people than me. Bill Gates for example estimated, during the birth of the XTs, that 640k of memory would be far enough for any software.................. This gives me the right to make an estimation as well. I think that during runtime, dust goes inside the fans. Furthermore, more dust goes inside the push-fans than in the pull-fans. This dust has no observable occurrence when the fans are full powered as they generate enough torque to overcome such little frictions. But when they get so much power, as to revolve in certain rpm (as a result of the reduced torque), the push fans will have bigger friction of the pull-fans and therefore less rpm. And this is actually that i observed. The 2 push fans (in the push-pull arrangement) had significantly less rpm than the pull fans.




kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
More problems...

But that's the idea and the salt of a project.  8)

I tried several ways to have a single PIC to control 4 fans with PWM simultaneously. That precisely sucks. don't try this at home. I could instead use a pic with 4 built in PWMs. Although that could be a solution, it would not be as elegant as i wanted, and it also would be more expensive as expected. A chip like this would cost me more than 10 euro. Also, 16bit code would be used, making things more complicated.

An one hot summer night... Out of the blue... Microchip strikes again with the Microchip MAPS...

Those boys do work!!!

Well, in less than a minute i found the solution. And that is final (hopefully). A bus will be driven from the main PIC, the one that drives the LCD, reads the temps etc. It will still read the rpms. Each fan will have it's own dedicated PIC. Those pics are the 12F615. I found them really cheap and handy. They are as small as a 555 chip(8 pins), they are cheap, they have one built in PWM controller and a built in 4 or 8 oscillator. Those 4 pics shall be connected to the main PIC with the BUS. They will only receive data with a 2 byte protocol such as for example:

xxxxyyyy - dddddddd

And that would mean in out world that the PIC number xxxx (0-16) should do an action yyyy (eg 0001=set speed) with data dddddddd. I can only imagine one command, the "Set speed" command until now. But further on i may enrich it. The speed could be expressed in 10s, so a number 01101110 (110 in decimal) would mean speed 1100 rpm.

Each chip will do nothing more than set a PWM for it's fan so that to maintain this speed. Feedback shall be acquired from the fan so that the PIC will always change the PWM output to maintain this speed. Splendid~!

I am really in find of this idea! I go to work at once




spic0m

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 841
I'm more than interested in this, have you calculated an estimated cost of all that stuff? I mean the circuitry not the fans :).

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
I'm more than interested in this, have you calculated an estimated cost of all that stuff? I mean the circuitry not the fans :).


I would say around 40 euro including the LCD, the connectors and the rotary encoder. The main PIC costs about 4 euro and each other PIC around a euro or so. The LCD is a standard 20x4 with backlit, that you may not find it more than 17 euro.