PWM to Analog converter circuit

Soldato
Joined
13 Mar 2011
Posts
7,484
Location
Bada Bing
this is really impressive Tealc :D

When i built my first computer, i wanted all the fans to ramp up and down with cpu load and i eventually tried to source a PWM fan controller, it was from a manufacturer called Sunbeam

I can imagine a fan controller where there is one feed from the cpu header, another with a molex input and then the rest of the fans connect up to the 3-pin connectors for full-PWM-3pin-control :D
 
Soldato
OP
Joined
13 Jul 2009
Posts
7,200
Location
Llanelli
Hi Panyan. Well yes this is possible. If I'm thinking about this right the circuit which I built above is simple because it's designed for a range of fans with a known impedance and current rating. Problems arise when you try different fans, and multiple fans. It's just too simple a circuit unfortunately. That said it'll drive most quiet fans perfectly fine, and to really slow speeds, really quite ridiculously slow speeds and still give RPM feedback.

What you'd need to do is have a PCB with mutliple circuits all laid up next to each other, driving separate fans. This isn't tricky at all as the PWM signal wire can be shared easily amongst multiple circuits. These parts can be quite cheap if you buy a few in at a time.

Overall I'm really impressed with the circuit, and will use it, but want to experiment on other combinations of resistor and transistors before comitting it to my rig.
 
Soldato
OP
Joined
13 Jul 2009
Posts
7,200
Location
Llanelli
Nothing is ever perfect.

Other ways of doing this involve losses. The circuit above has at 1v loss from top end taking it down to 11v. Substituting cheaper components drops this down to 10v.

Now toying with the idea of increasing the voltage to compensate for losses but I'm beginning to think this is getting a little out of hand.

Might just be better to forget the tach readout and go for straight MOSFET switching of DC fans on and off where fans are too powerful for the initial circuit.
 
Soldato
Joined
1 Jul 2011
Posts
8,664
That's the way I lean... assuming the 12v pulse to fans of similar rpm range will run at similar speeds.

At present I'm running 8 fans total. 2x PH-F140TS on PWM adapter & Y splitter1200rpm max, 3x FN053 500-1500rpm, & 4x TY-140 900-1300rpm. All seem to be ramping up and down nicely. I'm using one of the 2x PH-F140TS on adapter as master / rpm monitor and it shows 1200rpm max.
 
Soldato
Joined
1 Jul 2011
Posts
8,664
Okay, heard from Phanteks that it should be no problem running 2 or 3 of their fans so will try again. Do you think I need to worry about possibly damaging the PWM circuit on motherboard if the adapter smokes?
 
Soldato
OP
Joined
13 Jul 2009
Posts
7,200
Location
Llanelli
I don't think so. Transistors work like one way valves and should prevent any current flashing back into the PWM.

I'm a little surprised by Phanteks recommending more fans considering that the circuit is designed for one. Throwing more on will just reduce the current, voltage and speed to each fan and heat up the B772, or at least it does with my example. You could slap a heatsink on the B772 but it'll still be limited.
 
Soldato
Joined
1 Jul 2011
Posts
8,664
Got another reply from Phanteks saying at worst it damage the IC of PWM adapter but to wait while they check into it more.

Phanteks is very quick replying. Asked late yesterday, answered 9:30 this morning. I asked more questions and had reply in less than an hour.

Great support!
 
Soldato
OP
Joined
13 Jul 2009
Posts
7,200
Location
Llanelli
Ordered some S8050 for £2.28 for 100 :)

Also noticed that I got the resistor R2 and R4 positions mixed up. The R2 limits current coming from PWM and R4 has an effect on voltage going to the B772 base terminal, plus also adjusting current to S8050.
 
Soldato
Joined
1 Jul 2011
Posts
8,664
Great!
I don't read / write "Electronic" but you explain it just enough so I understand :)

I'm too darn impatient... waiting for Phanteks is like waiting for kettle to boil. ;)
 
Soldato
OP
Joined
13 Jul 2009
Posts
7,200
Location
Llanelli
So I swapped the resistor around so that the 10k between the big transistor and the little transitor is now 1k and I can get a few fans running at near max speed(I think) I put on a 0.4A Yate fan and it shows up as 0.28A, I will compare against direct 12v power use later. I didn't swap the resistor on the PWM signal to 10k though but that shouldn't make that much difference to a MOSFET, although it will to a BJT.

Of course this is off whatever current my 555 circuit can provide through the MOSFET so it may be totally different on a motherboard PWM header which provides a few mA.

It's my own fault as I pieces together the circuit from a few different emails an my own knowledge, 10k made sense in the circuit where it was so didn't think it important.

What sort of speed drops did you see between 1, 2 an 3 fans attached Doyll?
 
Last edited:
Soldato
Joined
1 Jul 2011
Posts
8,664
system running at idle was 640rpm ET6 = 10% @ 30c - 100% @ 50c

Hooked Phanteks adapter as master fan

1x fans = 1061rpm (no idea why it's not similar rpm to master fan on cooler; expected approx 850rpm)
2x fans = 740-770rpm
3x fans = 600-610rpm

Same as above except ET6 = 90% @ 50C - 100% @ 50c

1x fans = 1236rpm
2x fans = 1150-1160rpm
3x fans = 1020-1030rpm

Wish I could get to motherboard header to connect direct but it's under cooling fan.
 
Soldato
OP
Joined
13 Jul 2009
Posts
7,200
Location
Llanelli
Thanks for that mate.

Not a massive difference but you can see that the voltage is sagging a bit judging by the speeds.

Ok some developments.

Since changing that resistor I've noticed that I can now power 3-4 standard 1000-1500 fans to within a very close margin of the 12v rail, this means that it doesn't sag very much and almost gives me full speed and great speed reduction at the lower duty cycles.

Analog electronics is always a balance though and now I don't get such good speed reduction when I use a single fan. I'm adding extra power to the circuit (by increasing the voltage and current going to the B772) so it's staying closer to 12v as the extra power I'm supplying isn't used up in the low part of the PWM cycle and remains in the capacitor.

Fortunately we can solve this in a couple of different ways.

1) Modify the capacitor value so that it has more or less capacity to cope with the amount and power of the fans. Adjustable capacitors are not readily available though.

2) Modify the resitance between transistors to limit the current available in the circuit. Variable resistors, or potentiometers are cheap, readily available and can be mounted on a wire, or on the PCB. If you put a 1k resistor between the transistors (acts as highest possible power), and then a variable resistor of 5k or maybe 10k in series with that you can set the circuit up for your fan array so that you get the reduction in speed that you want based on the curve you have set. With this you could power 0.1A or 0.4A of fans, more if the resistor is less than 1k, although I haven't tested that yet.

I suppose you could go with a larger capacitor than 10uF, say 33uF and that might allow for even larger current to be drawn, if it can be filled by the B772 in time.

So my next experiment will be to change that cap and to look into the use of a potentiometer. It adds a layer of complexity but meh it's just a twist of a knob. Once it's set it'll be set and not needing touching until you change the fan array.

Update: In simulation (with alternate non-ideal components) a larger capacitor value just smooths the power going to the load and makes the circuit a little slower to react to changes in duty cycle but has no major effect on the amount of voltage present at the output terminals.

I wish I had an oscilloscope so I could see this stuff in the real world.
 
Last edited:
Soldato
Joined
1 Jul 2011
Posts
8,664
In the morning I plan to do some 1 hour tests with 1x, 2x and 3x fans on PWM adapter. Will let you know results when I'm done.
 
Soldato
OP
Joined
13 Jul 2009
Posts
7,200
Location
Llanelli
I managed to find some time today.

I didn't take many pictures but did take some video as it's much better to see stuff hapenning rather than just seeing static images.


If I repeat myself or don't explain something then it's probably because some videos didn't make the cut.

So I tried a 10k preset, then a 510 ohm resistor, then both and then hooked up the 4 fans to my PC and tested them at their lowest speed and restarted. My graphics card PWM was used as it's easy to adjust.
 
Soldato
OP
Joined
13 Jul 2009
Posts
7,200
Location
Llanelli
So yesterday I had a fiddle with a few things.

Firstly I looked at the 10k ohm resistor running from 12v to the B772 base terminal. I didn't want to blow stuff up so didn't try a preset potentiometer but rather used a few resistors in parallel.

At 7.41k
P1040767.jpg


P1040771.jpg


It made no difference..

So I added another 15k to make somewhere around 5k

P1040778.jpg


....and it made no difference.

So on went a 2.2k resistor, to make not far off 2k. No difference again.

P1040784.jpg


So it seems changing this value makes no bit of difference to the power capability of the circuit. I also tested this in Multisim later and it's exactly the same situation.



So onto experiment two.

Change the Mosfet. This little Mosfet is good up to 5.5A and silly voltage.

P1040786.jpg


The BS170 which was used originally was good to much lower levels of voltage and current.

P1040788.jpg


So here it is in situ on my stripboard. The pinout of the larger Mosfet was different so I just wired it up with jumper wires. It adds capacitance, inductance and stuff but meh.

P1040789.jpg




The larger power Mosfet actually adds around 10% more capacity to the circuit when compared with results from earlier experiments and slows down the sag in voltage a little. The price differential is quite large though. BS170 can be had for around 10p while IRF730 cost me around £1 from Hong Kong ages ago. They are available for 36p from the component suppliers but you have to take a massive postage hit with those. The IRF730 is probably not the most ideal transistor for the circuit but it's what I had to hand with a datasheet. I originally bought them to design a fan controller that never got made. Thinking about it though a logic level Mosfet might be much better at 5v as they switch fully on at much lower voltages, but I don't have one, or at least I don't think so.

Stuff I tried with the IRF730.

1) No pre-resistor, straight into Preset potentiometer. Ouch.

2) 510 ohm & Preset

3) 5 fans and compare

4) 6 fans and compare.

5) 7 fans and compare

6) Temperatures when running slow

7) Stupid fast 2500rpm fan when already running 7 fans.

So I think this demonstrates that it's better to use 4 or 5 fans at max, and all fans be of similar specification ie. Current draw and rated speed.

I've also had a look at running two Mosfets, a P-channel and a N-channel and the circuit just goes totally crappy in simulation. I don't think that'll work.

I now understand why the preset destroys itself when I take out the resistor and go with preset. With a 510 ohm resistor I have up to 20mA going through the resistor at 12v (V=IR), that's 0.2W (P=VA). When I remove this resistor and go off the preset and have it at say 100 ohms, then I have 200mA at 12v, which is 2.4W and as presets are rated at lower than this they burn. I'm not 100% sure why the Mosfet melts itself too though. Feedback perhaps.

Edit: Just checked and the presets I've used are actually 0.1W rated so are being over powered if there is 20mA running through the circuit (at 99% duty cycle).

Perhaps a 1k + Preset would be a better long term solution. 12v /1000 = 0.012A and then power = 12*0.012 = 144mW. Still a little over.

I'd then need to take a hit on the overall power though, taking it down to 4 fans, or use a higher gain PNP transistor.
 
Last edited:
Back
Top Bottom