It is currently Thu Oct 30, 2014 7:15 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Microcontroller-based fan speed regulator
PostPosted: Thu Jun 28, 2007 1:46 pm 
Offline

Joined: Fri Jan 20, 2006 10:12 am
Posts: 546
Location: UK
Here's something for the more electronically minded among you: A very simple fan speed regulator based on a PIC10F202 microcontroller.

Most fan controllers merely adjust the voltage supplied to the fan, or the pulse width in the case of PWM, and let the fan do with that as it will. That works fine of course, but it's possible to go one step further and regulate the fan speed to a specific RPM by including it in a negative feedback loop. This can be done by measuring the tachometer output from a suitably equipped fan and adjusting the voltage or pulse width until the tach signal matches the desired speed. This has the benefit that the fan always spins at the same speed regardless of the pressure differential, temperature, phase of the moon and whatever else affects fan speed.

Here is the circuit:
Image
Most of the hard work is done by the microcontroller, so the circuit ends up very simple. The PIC10F202 is small and very cheap (just a few pence), but it lacks more advanced features like EEPROM (so the fan speed setting can be stored when the power is off) and an analogue-to-digital converter (to allow temperature control), but that's ok because this is just an experiment intended to be simple, not a finished product.

The circuit is designed so that it can work in-line between a motherboard fan header and the fan itself, drawing power from the 12V fan supply and allowing the tachometer signal to pass back to the motherboard for RPM monitoring. There are two push buttons - one to increase the speed and one to decrease it. The two transistors change the 3V pulses from the microcontroller to the 12V that a fan needs. The capacitor C3 smooths the output voltage (it effectively turns the circuit into the simplest possible switch-mode regulator) so that the fan's tachometer output works all the way down to the slowest speeds and to reduce the clicking noises that some fans make at slow speeds with PWM. It does decrease the efficiency, but it does the job with the minimum component count.

Here's a photo of the circuit assembled on a breadboard:
Image
It looks a bit of a mess, but you can see just how few components it uses. It could be made small enough to stick to the back of a fan hub.

And here's a shot of the oscilloscope trace of the tachometer (top) and PWM (bottom) outputs:
Image
The PWM output is not very clear because it's at a much higher frequency than the tachometer signal (I chose 1.3kHz as it's the fastest that the PIC can reasonably do, and the faster it is, the easier it is to smooth to a DC voltage).

It works ok, regulating the fan speed quite precisely. It measures the number of tachometer pulses over a 3.1s period, which theoretically allows for a range of speeds from 10-2500rpm. 3.1s yields a rather slow response, but it's the best I can do without a more advanced microcontroller that can measure the time between two individual pulses. It employs basic proportional control but it's stable until the output voltage drops to around 3V, at which point it has a hard time because small decreases in the output stop the fan completely.

The firmware for the microcontroller is also very simple, taking up a mere 482 bytes in total. If you want to see the source code (in assembly), it's here: Fan Controller.asm

_________________
https://mrevil.asvachin.eu/


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 29, 2007 7:21 pm 
Offline

Joined: Mon Feb 28, 2005 4:21 pm
Posts: 2764
Location: NEW YORK WORD AND STUFF YEAH OK
that is really neat :)

im not knowledgeable about such things, but I know how to turn out tricks on corners, you know, pimp things.

Can you make it? I would sell it.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 30, 2007 11:23 am 
Offline

Joined: Fri Jan 20, 2006 10:12 am
Posts: 546
Location: UK
~El~Jefe~ wrote:
...Can you make it? I would sell it.

I can make it alright, but the trouble is that I make these things by hand, which takes such a long time that it turns out to be unprofitable, especially for materially cheap things like this.

I normally just put these ideas out for other people to use themselves, but I suppose not many people have the equipment necessary to program a microcontroller, even if the circuitry itself is simple enough to be assembled by anyone who can pick up a soldering iron.

_________________
https://mrevil.asvachin.eu/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group