# Learning - project pwm

#### MrWoo

Joined Jun 18, 2007
11
Hi.
I like to learn all sorts of things, and the latest is some electric theory. I have decided to learn using a rather common project, a fan controller for cpu 12v dc fans.

At this point, I have poured over sites and schematics and datasheets looking at examples, as well as scads of tutorials and the like to learn a bit. I feel I have an OK understanding of linear models as well as pulsed analog ones. I am using multisim 10 for now until I graduate to a "non-frying of components" level.

For the basic linear voltage circuit, I am going to pick a bit of a challenge. Designing circuits to handle a 12v source off a psu has been done. There is plenty of current available and only the control circuit needs to handle the heat generated by the load on the fan. So, I choose to control 3 fans with a motherboard 3pin fan header. Research is rather sketchy on the actual max load the motherboard headers can handle. I have seen an average of 6 watts per all headers, as well as 3watts per header, as well as some documentation stating that a single header is capable of up to 6watts.

So, not knowing what the actual upper threshold of current is for a motherboard fan header, erring on side of caution. In a linear voltage output from a mobo header, I have been playing with a very simple circuit that uses a pair of transistors, specifically a 2n3904 and TIP32a. Simply, 12V source is applied to collector of TIP32a. 2N3904 collector to TIP32a base. 2N3904 base to V from fan header. Both transistors emitters go to the fan V in. This effectively opening the TIP32a linearly, with the slight voltage drop, while isolating the acutual load from the fan header.

This is fairly straight forward, as one can calculate the load on both sides. However, there is also the trend to include PWM circuits into the fan headers. Research has shown both low and high side circuits. The low side is generally what is seen for the DIY PWM circuit. Understanding that a transistor or FET is being induced to allow the voltage from the fan to ground, at a rate, is not too hard to grasp. The reverse where the voltage is actually modulated is also not too terribly hard to grasp.

But here is where most of the grasping really starts.

For instance, on my motherboard, the Intel 975xbx2, I have the Andigilog aSC7621 chip onboard. This particular chip has 4 fan outputs (PWM). All 4 are capable of utilizing the newer 4pin configuration, where the 12v is fed continuous, and the fan itself uses the 4th pin, the SIGNAL, to modulate the duty cycle. The problem here is that while in the datasheets, the example shcematic tells of simply using an external MOSFET to convert to 3pin configuration, it does not state implicitly that it is a high or low side circuit. I am assuming low side, but it is hard to tell, because there is no schematic. The PWM signal, as stated in the datasheet is up to 5.5v. To make matters worse, or better, the frequency of the PWM is adjustable. Using SpeedFan, one can have a fan header @ 10Hz, up to 30kHz. While I find that 10Hz can run my 120mm 12v .30A fan down at 5% duty cycle, there is a definiate rotor click, as well as LED fan "blink". Tuning the frequency to 23kHz fixes the rotor click and the LED "blink", but forces the fan to stall at 5%. 10% duty and it starts and maintains.

Now, heh, do a voltage reading. On the 4pin header, reading the 12v is solid 12v, no matter the duty. Reading the SIGNAL, @10Hz, with neg lead on the case, and there are from 32 to 0 mV. Read the same SIGNAL @23kHz, and it is 0 to 180 mV. Now also read the 3pin voltage. Here it is a bit different, @10Hz, jumping around like crazy, @23kHz, solid 12v. Now put pos lead on pos 3pin, neg lead on ground of 3pin, and you will see @10Hz jumping around, @23kHz linear voltage looking, 12 - 0v.

Assuming that Intel has already used a MOSFET in converting the PWM Signal to a 3pin configuration, how does one tell if it a high or low side PWM signal? Couple that to this little issue, that the 4pin header is (assuming data sheet is correct) only @5.5v max, while the 3pin is @12v.

Ah, more learning. I have some circuits now that use an OP AMP to drive a 12v fan using a 5v feed. There is a MOSFET in it, a BUZ71L. I have tried other MOSFET's as well as transistors and found lot's of working designs.

But we have not only a voltage difference, but also a possible method of PWM implementation. Assume we deal with the 12v 3pin header. It is pulsing the voltage or the ground path. The modulation is already there. A quick changing MOSFET should mimic this. I have that working in sim now. NOTE: Please bear in mind that my project goal is to LEARN, in this case, how to isolate the actual load to 3 fans and protect the origin from overload, while maintaining the source "speed". With that in mind, ahem, the MOSFET chosen should handle the load of 3 fans, arbitrarily let's say a 3A model. So, the PWM signal is put to a MOSFET, high or low side, and it replicates the gate signal, pulse on @ % duty.

Next, we have the issue where we have a total of 5.5v, and the assumption is that on a 4pin header, the signal is NOT pulsing, but is a signal for a PWM fan. Now, I don't know, nor know how to detect if this 5.5v signal is linear or pulsed. Either way, learning both cannot be bad.

So let's say the 5.5v is pulsed. Again, probably low side. So, we use a MOSFET to control a 12v signal, and it should work. An intersting note is that many schemtics show a 'kick start' capacitor, as well as a pull-up resistor and some diodes. Lot's of different designs out there. In protecting the motherboard, how does one design such a circuit for protection?

And then we can guess that maybe the 5.5v is actually a linear voltage, designed to trigger the circuitry in a PWM fan. Now one must build a PWM circuit, and use the 5.5v through most likely an OP Amp, and output the PWM 12v according to the 5.5v input.

Whew. Hopefully that is enough detail to describe what I am dealing with. The actual reason for this post is to, obviously, glean some knowledge from those who know more than I.

Specifically, I wish to develop the following circuits, with each circuit capable of withstanding a 1.5A load, while protecting the signal (motherboard fan header):

1. 5.5v linear input to 12v PWM output
2. 5.5v PWM input to 12v PWM output
3. 12v PWM input to 12v PWM output (simply keep same, but isolate fan header)
4. 12v linear to 12v PWM output
5. 12v linear to 12v linear (simply keep same, but isolate fan header)

I am open to learning anything ATM. PIC I would like to learn, but first wish to understand these concepts. I welcome any advice or criticism that helps to learn. I welcome any reference to schematics or components that may work better.

Again, I am just wishing to learn something, and this is nothing new under the sun, but does present itself as a great project because I have access to many different computers with different chips, as well as many different fans. It would seem a logical choice.

Thank you to whomever may wish to divulge some info.

Respectfully,
MrWoo

#### MrWoo

Joined Jun 18, 2007
11
Hmm. I found some more data on the 4pin headers. It would seem that there is what is labeled as "low frequency" and "high frequency" PWM. The lower frequency, say <20kHz, within the "audible" level, you can hear commutation noise from the fan. The >20kHz would seem to eliminate that.

Evidentily the newer chips which support high frequency PWM need not supply an external FET, in the fact that being designed for a 4pin fan, the FET is built into the fan. So, that COULD mean that my mobo's 4pin header is applying a contstant voltage, expecting there to be a 4pin fan with the FET built-in. That being the case, one would have to design a PWM circuit to drive the 3 proposed fans off of that 5.5v signal. One schematic I looked at shows the PWM signal OUT, going to the PWN signal IN pin on the 4 wire fan, with a 3.3v source fed through a 2k Ohm resistor BEFORE it reaches the fan. I am left to assume, because I don't know, that the PWM output is less than 3.3v, and that the FET inside the 4 wire fan requires say 2v minimum on gate, so that 3.3v ensures FET starts to operate?

But, on the 3pin headers, there must already be an external FET in place on the mobo somewhere that is using the PWM SIGNAL out for it's related channel(s). What ramification does that have on me building a circuit for it? I would presume none, as it is already pulsing through a FET somewhere. All I would need to do is have my FET take it and open it's gates to run the 3 fans whilst isolating the source signal. Hmm.

Which leads us to another need. How not only to design a circuit that uses (I think) a 5.5v signal and convert that to a 12v PWM, but also how does one go about creating low or high frequency PWM models? I think the higher frequency, from my playing with it on my board, would be the better choice. But, what do you say?

Thank you again,
MrWoo

#### MrWoo

Joined Jun 18, 2007
11
Yet again, this time an example based on a TI MSP430F417 microcontroller. The schematics relate to the PWM output of the MCU to a 3wire or 4wire fan. While this is not really like the aSC7621, it does provide an example wiring diagram.

Here is the pdf file that has the schematics.

Thank you,
MrWoo

#### Attachments

• 114.1 KB Views: 517

#### beenthere

Joined Apr 20, 2004
15,819
I have to give a shudder when thinking of adding pulse-generating circuitry inside a computer. I would not do it. Motherboards have enough problems with their own signals.

This is a technician's point of view, by the way. It may be attractive to an engineer and/or hobbyist to regulate the cooling fan speed to keep some temperature maintained inside the computer case. I just want to extract the heat, so running the fans at full speed seems to me to be the way to do it. As much cooling as possible is just enough.

That said, Microchip has quite a bit of stuff dealing with speed regulation of brushless DC motors - http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1523.

Joined Jan 10, 2006
614
An option I have used in the past is to switch between the 12 volt and 5 volt supplys depending on temperature. Just make sure the fan initialises at 12 volts, as some wont reliably start with a 5 volt input.

#### MrWoo

Joined Jun 18, 2007
11
I am sincerely thankful for those thoughts. The link is a good one for lot's of info I had not found yet on thier site.

Let me state that I don't really want a fan controller. I am just using it as a good project to learn some new stuff with. I could have chosen some robotics or light dimming or whatever. I thought though the whole isolating the motherboard, learning how to read datasheets for components, and the fact that I have access easily to different versions (different mobo's with different chips) would be a good place to dive in.

I have been looking into the interference that PWM circuits put into place. I did not realize that could happen.

While I do wish to build the things I speak of, it is not that important if I make it and it is at best a homemade solution that poses problems with say the cpu or hdd or something. What is more important is that I learn by hands on work, and this is something that could turn out to be of benefit to me or my friends (my guinea pigs lol) in the way of fan control. Or it could be that I build it, more importantly understand it, and progress to other projects that actually do something. Such as inline probes for pH & EC readings in water, with a calorimetric flowmeter, outputting 4-20mA and then with a DAQ writing code that converts it to real values and logs it into a database that then has a front end to graph the results. lol, which is what I have. But, I want to do more automation. More controlling. More computer interface.

Thank you again for your time,
MrWoo