Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Computer Fan Controller with Extras

Status
Not open for further replies.

cng1024

New Member
I am planning a fan controller project for a new computer build and would like some advice and general feedback on my ideas.

First off, I plan to use an Atmel AVR microcontroller to control this device.

I would like a touch screen interface for my fan controller. For this, I already have a 240x320 color LCD with resistive touch sensor. I bought a couple of these LCD displays for tinkering and think they will work nicely.

I want to be able to control up to 10 fans through PWM. I'm hoping I can control either 3 pin or 4 pin variety. I am considering using **broken link removed** n-channel mosfet to control each fan.

For temperature information, I want to collect readings from up to 11 sensors. One for each fan, plus an external one for ambient temperature readings. I plan to use **broken link removed** since I have quite a few of these at home. I've already written code to interface with this chip.

I would also like the option of controlling some LED lighting, though I haven't put much thought into how I plan to control these. I'm thinking perhaps through the use of shift registers in cascade to reduce pin count.

I also want to have the HDD and Power LED output as well as the power and reset switch inputs from the motherboard connected to this device.

For the LED outputs, I plan to use **broken link removed** to maintain electrical isolation between the motherboard and my device.

For the switch inputs, I plan to use **broken link removed** to isolate the device from the motherboard. If I've read the datasheet correctly, it also includes diodes to protect the input from back-emf.

Obviously if I plan to use the device as a power and reset switch, it will need to be powered even when the computer is off. My first thought was to tap into the PSU +5vsb for power. I wouldn't do this through splicing, but rather with a proper 24 pin atx socket on a pcb, then a 24 pin harness from the pcb to the motherboard. I am somewhat uncertain about using this method to get power for the device. I think it would work, but I don't have a lot of experience working with high current circuitry.

The other method would be to power the device from a small supply, completely separate from the computer psu. If I went this route, I would use optoisolators to isolate the mcu from the mosfets controlling the fans. The mosfets and fan would be powered through a sata drive or peripheral power cable and I would modify an expansion slot cover to create a pass through for main power of the fan controller.

In case anyone is wondering, I am aware that some of this is a bit unusual but its something I've had on my mind for a couple years now and I think it would be a pretty cool project.

Any thoughts, ideas, suggestions and constructive criticism are welcome.
 
Last edited:
Sounds to be an interesting project in the realms of computer case thermal management. While I would be hard pressed to use as many as ten temperature sensors for any of my own applications, let alone ten fans, it would be a nice project. Based on limited reading it would likely be easier from a parts count view to control a 4 pin verse a 3 pin fan. Based on the previous discussion we kicked around regarding PSUs it might be nice to monitor the main PSU voltages like 12 volts, 5 volts and 3.3 volts. Just a thought on that note.

Several years back I did, mostly out of curiosity, decide to monitor some case temperatures. More as a matter of curiosity as to how much heat the system was generating between idle of not doing much to running the processors at 100%. I only used 4 sensors and they were thermocouples. I wasn't as interested in fan speed control as much as seeing how much heat went in and exited the case. Some of the aftermath of that little science experiment can be found here. :)

There were a few reasons I did the case temps experiment the way I went about it. As can be seen I used a small four channel data acquisition device because it allowed me to easily log the data over a period of time and easily save the log file. The second reason I used the device I did was because I can program for it while I suck at uC programming. :) Maybe as I move into retirement and have the time I can actually become somewhat proficient at uC programming.

Given a choice I would run things off the 5V SB power rather than use an independent supply. More as a matter of because it's there.

Anyway, cool project and if the mood strikes you I would start a blog on the project (like a build log) in these forums.

Ron
 
Definitely an interesting experiment you performed. From a heat exchange point of view, it might be possible to make inferences about the efficiency of case design. One could probably expand on this, for example building a data set that records temperatures at different fan configurations and fan speeds. It may be possible to calculate the most efficient fan configuration and speed. (I have a feeling running a fan at maximum speed is not always the most efficient method for expelling heat.)

Its interesting that you should mention measuring voltages. This was in fact one of the goals of my project. I forgot to include it in my original post. My 'plan a' has been to put a 24 pin atx plug on the pcb and from there, tap into the 3v3, 5v and 12v rails. I have a couple Arduino Mega board (these are a fairly good deal as mcu experimenter boards) and experimented using a voltage divider to tap into supply batteries for battery powered circuits. It works fairly well, though there is some small variation in reading that coincides with battery voltage drop. I think this is at least partly because I didn't use a separate vreg for the avr analog comparator.

I agree that having so many fans and thermistors is probably excessive. I'll probably not use more than 4 of 5 fans or thermistors. The way I see it though, there won't be much additional cost and I would rather have an excess than put all that effort in to find out it isn't enough.

My understanding is that 3 pin fans are generally voltage controlled. The 4 pin variety use the extra pin as a pwm input where rotation speed is controlled by duty cycle. I plan to use a 4 pin header for each channel and pwm to control either fan type. For the 3 pin variety, I would connect a mosfet between the fan and ground and use a capacitor to smooth the signal into a steady voltage. This should be sufficient to voltage control the fan and since the fan is still getting constant power, the tach signal from the fan shouldn't be interrupted. For the 4 pin variety, I'll connect a pull-up resistor to the pwm line, then use a second mosfet to ground. Fan type detection will be done by closing the mosfet gate connected to the fan negative pin, then sending a 100% duty cycle signal to the pwm pin. Once fan speed stabilizes, the controller will start sending 50% duty cycle pwm signals to pin 4 and see if the fan responds accordingly. If the fan responds, it is 4 pin. Otherwise, it is assumed to be 3 pin. I don't have schematics drawn up yet (its all in my head at this point), but I think this should work. The only possible issue is that it requires two pins for the mcu to control each fan. Also, I want to see if there is any substantial current draw on the 4th pin of pwm fans. If not, I don't think I'll need to use a power mosfet for the pwm line.

I would also be interested to know if there is a fan controller ic out there capable of driving 3 and 4 pin fans and able to run a fan at a requested speed based on fan tach signals.

I think I'm decided on using 5vsb to power this project. This seems like the more elegant solution since it doesn't require external cables. I'll isolate fan power so all I'm powering from 5vsb is the mcu and lcd.

It would interest me to document this project for others. I'm not sure if I'd do a build log as I progress or release the entirety of my work once its complete. As I mentioned before, I'm not in the best of health (I suffer from constant migraine headaches, often quite severe) so I couldn't be held to any sort of definite completion schedule and may not work on the project at all for weeks, depending on how I feel. I'm definitely interested in sharing my work though.
 
My understanding is that 3 pin fans are generally voltage controlled. The 4 pin variety use the extra pin as a pwm input where rotation speed is controlled by duty cycle.

During my days of playing around with this stuff I collected some data on 3 wire and 4 wire fans. You may find some of this information useful. While not actually complete I manage to show the big difference between 3 and 4 wire flavors. They both use PWM. The difference being how the 12 volts is applied. I did that about 4 years ago and it's amazing I still have all this stuff out there. :)

More later as I need to get my ass in gear for work. I hope the link is somewhat useful.

Ron
 
Thanks for posting this information. I have found it quite useful in planning my project. I have hoped to avoid pulse stretching techniques for driving 3 pin fans, and had another idea which I think has some chance of success. It may be possible to use a signal amplitude below 12 volts, say in the range 7v-9v, but transposed so that a high pulse is still 12v. The idea is to keep the tachometer portion of the circuit properly powered, avoiding stretch pulses. I think its worth a try and, if it fails, stretch pulsing is a fairly good alternative to fall back on.

I'm still compiling my list of parts and will probably order from Digi-Key before the end of the week. I'm quite anxious to get moving on this project.
 
Never thought about trying as you suggested. Interesting. I am glad the link helped a little, when I was more active with that stuff I was forever making test rigs, jigs and cable adapters. As you move along keep me informed as I would be curious as to how things turn out. Pretty neat project and should be pretty cool.

Ron
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top