PWM to Analog converter circuit

What fans are using mate?

In all the time I've built these things, and we are going into the dozens of units and two years here, I've never heard a pop from them. Don't get me wrong I've blown transistors, had smoking potentiometers, scalding hot resistors and transistors but I've never had any audible feedback from the components.

I've seen fluctuating readings before but that's generally when the speed, and corresponding voltage, of the fan drops below around 4v or 5v and therefore leaving the PWM signal stronger, so the motherboard picks that up instead.

I've not really tested with PWM quite as low as 15%, it's generally designed for 30%+ PWM. I've never stated this because in a lot of cases you aren't able to go quite that low with PWM duty cycle.
 
What fans are using mate?

In all the time I've built these things, and we are going into the dozens of units and two years here, I've never heard a pop from them. Don't get me wrong I've blown transistors, had smoking potentiometers, scalding hot resistors and transistors but I've never had any audible feedback from the components.

I've seen fluctuating readings before but that's generally when the speed, and corresponding voltage, of the fan drops below around 4v or 5v and therefore leaving the PWM signal stronger, so the motherboard picks that up instead.

I've not really tested with PWM quite as low as 15%, it's generally designed for 30%+ PWM. I've never stated this because in a lot of cases you aren't able to go quite that low with PWM duty cycle.

XSPC 1650 fans. Not sure why it suddenly requires a higher PWM duty cycle to reach the same RPM.
 
Ok mate. You could probably retweak the potentiometer if you find 40% too high for idle. Let me know if it remains stable at 30 or 40%.

I shall have to run some endurance tests on low PWM myself and see what effects it has. It's funny that I've never had thus issue before but I suppose its all good feedback and could help me develop it further and make it better.
 
Ok mate. You could probably retweak the potentiometer if you find 40% too high for idle. Let me know if it remains stable at 30 or 40%.

I shall have to run some endurance tests on low PWM myself and see what effects it has. It's funny that I've never had thus issue before but I suppose its all good feedback and could help me develop it further and make it better.

No worries mate. I mean, it still works, just letting you know what I've encountered.;)
 
Here's another one I've made for a Gelid Icy Vision. This was made for Lugusto. The leads are new. At work we made 20 off samples for a new customer who decided after we made them that they wanted an even smaller connector. I've had to supply the PH header connector though as we just don't use them at all.

First of all bare. You'll notice a fan header on board. I always put this on just in case the end user ever fancies adding a case fan. It's not connected to the fan tach so it'll just go right on. I've added a cable tie to the potentiometer and used it to add a strain relief for the connecting wires.
PWM-bare_zps018bbf10.jpg


Then with the shrink. This is the thicker adhesive lined shrink. The pinched end acts as a strain relief for the other wires.
PWM-clothed_zpsc738e7c3.jpg


I've set it up to work with around 0.45A of fans and it goes from 5v-12v on a 20-100% duty cycle.

If you need to adjust bear in mind that the screw on the potentiometer needs to go anti-clockwise for more fan speed, clockwise for less.
 
Last edited:
Hi mate,

I've been keeping my PC on 24/7 and I noticed that gradually over the past few months I've had to increase the PWM duty cycle to get the fans at the same RPM as previously. Is something deteriorating as I haven't touched anything at all.

Cheers

smsmasters
 
What happens exactly is: I keep the PWM duty cycle at 30% which keeps the fans' RPM at ~900, then after a while the RPM suddenly drops to 0 and the fans stop working. I have to manually increase it to 100% again. Is the PWM converter deteriorating? I haven't touched anything at all.
 
I was thinking it might be the filters on case fan intakes. Your description does sound like something strange is going on. Guess we will have to wait and see if Tealc knows.
 
I've no idea. These things don't tend to drift, or at least I've never noticed any drift. I've also never had to adjust my PWM , not even once since setting up. As we've seen when I first deveoped the circuit a transistor failure tends to short circuit and 100% fan speed, and not a dwindling reaction to PWM.

I'm going to build another for smsmasters and if that does the same then the issue must lie outside the circuit.
 
Last edited:
Do you ship these to Canada by any chance?

What level of customization do you have?

I was looking at one for a video card(so the small connector and if possible a molex to get power) that an run upto 2(normal plug on this side) fans(running one, but want to leave the option open). as well as maybe 2 normal ones like you seem to sell for other users. I have lots of 3 pin fans and my board sucks at controlling them.

I can not send you a Trust message because I just signed up here.

I have made and tested what is basically the same design as yours on a breadboard(but very basic with no adjustments), but you have nice new parts and I have hacked together second hand parts from old phones/chargers/ect.
 
Hi.

I've never shipped one outside the Uk & Ireland before. I'm not sure what sort of impact the postage costs would have. Edit: Around £4-5, maybe less if you can wait.

Because they are hand built they are customisable within the limits of the connector options I have, which are fairly good and covers everything you'd find inside a PC, and then more if needed.

How did your test go with your version? What components are you using as replacements? If you considering making a few and it seems you understand how it works then it might be worth at least getting the same components in yourself. Nothing on there is particularly difficult to get hold of.

Components:-

BS170
2SB772 or just B772
1k
10k
470k
4 pin PWM or 3 pin 6471 series type connectors and terminals (can be sourced as a kit)
PHR-4 JST PH series connector (can be sourced as a kit of male/female and associated terminals and even wires)
Basic 0.1" pitch header or 6471 male terminal and connector.
22uF 16v electrolytic capacitor
50k or 100k 20 turn box potentiometer.
Some sort of heatshrink
Some cable, 24AWG or 22AWG UL1007/UL1569 or similar.

I think that's it. Everything can be had from eBay.



@smsmasters - Please continue to bear with me. I've had a busy week.
 
Last edited:
While I somewhat understand the basic idea on how this is working, I am far from any kind of engineer. Any extra information would be great. I am more beginner than anything.

The PNP I was using was a MJ15012 because it has the highest gain of what I had. Others worked, but required a lower value resistor from the NPN to the PNP to get any decent speeds.

I still have to use 500 ohm's from the NPN to the base of the PNP(considering you get away with 10k, I may have something wrong here.).

I think this is my biggest issue, I need better parts.

I have a 1402D for the NPN. I had others, but this seemed to work the best.

I tried a generic mosfet(so generic I can not even find a datasheet for it) and while it worked, the range seemed to be less and it seemed to stop the fan too easy.

I have fan connectors/wires/some pcb/caps/resistors all from my pile of mostly scavenged parts(I did pick up resistors for another project). No heatshrink that big, but it is not hard to get. And absolutely no potentiometers.

The biggest issue I have is that I do not know what the PWM spec calls for and if I meter the pwm pin I get 5 volts at full speed(5.5 with the mosfet for some reason) and only 2.4xx with the transistor. This difference does not seem right to me.

Without a better understanding of how/why that is happening, I would be a bit worried about causing damage to the board long term.

Because I do not do too much of this kind of thing, Ordering parts may not be as much of an option(getting a pack of parts to only use a few and all). I will still look into it and see what I will be able to do.

Thanks for the input.
 
Scavenged parts is how I started too. In the early days of building this circuit I used all sorts of transistors and resistors trying to get it working. I blew a few of them too.

It's a good idea to build a 5v 555 PWM circuit to test your circuit on, or you could use an Arduino. I don't even use my PC PWM signal anymore as I know my 555 box will do the job nicely. Plus you'll pick up some good knowledge by building it.

MJ15012 is a bit on the heavy side. As power transistors allow higher and higher currents their gain also reduces. Still 20-100 gain should be something you can work with. Higher gain means you can drive it with less current to get the same output. Lower gain means you have to have higher current flowing, and things get warm, and if you are using an NPN that'll need to pull harder on the PWM source.

I don't use an NPN any longer. I chose a small signal N-ch Mosfet as the first switcher so that the current through the inversion section of the circuit is regulated solely by the trimmer (and protector resistor). The other benefit here is the mosfet does not load the PWM signal source, something which an NPN could easily do if not protected by a resistor on its base. Small signal is good because it is fast to switch, and cheap.

The 10k is not from NPN collector to base PNP it is from Vcc to base PNP. This needs to be there so that the base is biased on when the NPN/N-ch is in the on position. It doesn't have to be 10k but 10k is a good choice as it limits current nicely. The collector, or drain in my case has the current limiting of a potentiometer, and a resistor to prevent too high a current flowing through the potentiometer that could burn it out. The potentiometer are available through ebay for less than £1. They are 0.5W 20 turn 50k. You can use 1k, 2.2k, 3.3k and other resistors to set up your own flow of current, as I did in the early days. If you are building a circuit just for yourself then you can experiment with your available resistors to get the current you want.

PWM signals are generally 5v. If you put a resistor in series with the base of the NPN you'll create a voltage divider and it'll appear less.

I made all these things largely before I got my oscilloscope and got them working well. It was only once I got the oscilloscope that I could actually see what was going on fully.

I'm no electronic engineer either, my job is in quality of wiring systems, not electronics. As for parts. Well you can buy 1 off of each part, except resistors. It's not a problem.

Don't get me wrong I could make you up three boards no problem but it will be cheaper and better for your learning experience if you build it yourself. Once you get Trust set up drop me a message and I will share the schematic with you. It's not a complicated circuit.
 
Last edited:
New video to show smsmasters' new circuit working and also to introduce my new (1981) oscilloscope I bought recently. The Gould OS300 is a 20Mhz oscilloscope which is much simpler than my other scope, the Gould OS3000, which developed a fault in the high voltage (-1500v and +9000v) section, which I've traced to the EHT transformer.


The smaller OS300 scope did also have a fault (faults are inevitable in these old units) in the horizontal output that manifested as a blur on the screen and no viewable trace, although I could tell it was there. What was happening was the trace was actually bouncing off the side of the CRT as it was far to the left of where it should be. I've fixed that and it now displays a fairly decent trace.

The PWM converter circuit works just the same as every other circuit I've built.

My garage is in a bit of a mess. I've not put everything away yet after moving in at the beginning of the winter, but I have managed to nab myself a table to work on.
 
Thank you for what is exactly a list of parts.

I do not tend to shop e-bay too much, but if the shipping costs are right, it may be a good option.

A quick look at digikey shows about 4 dollars before tax(13%) and shipping(8 dollars) to make a 2 connector connector with your parts. I already have the board(may still get a strip board to save the breadboard clone for something else), caps, wire and resistors.

So what I am looking at now is what else digikey has for be to make it worth shipping if go that route.

You are 100% right about the learning and experience. I have killed some parts in my experimentation unfortunately, but that is how one learns.

I may have mis written how I had things setup up, but it is just like your early diagrams so it looks like the npn is connecting the 10k/10k voltage divider with the base of the PNP in the middle. Now going to 1k/1k would give me more base current for lower gain transistors(but seeing as the ones you have cost less than a dollar that does not seem to be a good idea).

My measure of the PWM pin may have been effected by a divider. I am not sure what is on the board end and would be reading ground to the actual pwm pin on the board(that pin runs into a 1k resistor and into the base or gate of the switch).

On this topic to see if I am understanding this right.

The PWM pin rapidly(20khz from the spec) switches and this turns the mosfet or transistor on and off allowing the PNP to get its connection to negative.

Would the PNP be getting 6 volts when the gate is closed[divider in play just like a normal voltage divider] and 12 when it is open or does the transistor change this. I am trying to visualize what is happening here

Does this mean the pnp is actually switching this fast as well or is something else going on.

I hate to build something for permanent use without at least understanding what it is doing.

I think I need something like 1000 posts to get TRUST to work, I am not sure I have 1000 posts of information or questions.

If you could toss together a basic idea of the connections I would be grateful. Would like to see exactly what you have setup.

The 555 and parts of a pwm generator also do not seem overly difficult or hard to understand. That would be the basis of a decent fan controller down the line for pwm fans too.

When I have a bit more info I will attempt to get parts and make a breadboard test.

Again, thanks for taking the time to help me with this.
 
Back
Top Bottom