PWM to Analog converter circuit

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:
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:
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:
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.
 
@pete910

I built something about a month ago and then whilst evaluating it my oscilloscope decided to fry its EHT transformer so I got sidetracked looking at that. I didn't know it was the transformer originally but I had several days of fun and learning along the way trying to fix it and the replacement scope I got in to fix it.

I designed a circuit to switch a 10v mosfet fully on using just a 3.3v-5v PWM signal while I waited for the original logic mosfet I planned on using and this looked good.

It has no rpm feedback, or if it will have some it'll be unreliable. It should be able to drive 10s of amperes with only minimal heating as the mosfet I chose has a fairly low on resistance of 40mOhms.

I've obviously got no pump to test it on but I should be able to find a high power inductive load of some kind around here, or just slap all my fans and a few power resistors on it and see what it draws.

Now that I've got at least one working scope I was hoping to get back to it over the next few days and will post up some findings. I am also building a circuit for someone on the forums so it'll probably be done around the same time.
 
Last edited:
Right. Here's a quick video showing the high current development circuit in use. I don't have quite as much as 2A easily available, either on my power supply or as a load so 1A will have to do for the moment.

The following circuit is based around a few small signal transistors to convert a <5v PWM signal into a >10v PWM signal that can drive a power mosfet, which in turn is to drive the fan/pump array.


The biggest problem with this circuit is the losses across the mosfet which can be as much as 1.3v. The second issue is the speed of the pump/fan can go down to zero with this circuit so it's not really safe to use unless you really know how to set up your fan curve. I feel what it needs is a lower limit that it can't go beyond.

I think there are likely to be better, cheaper and safer off the shelf solutions to anything I could put together. :)
 
I think pumps usually have a nominal 12v requirement, although they could be overvolted if desired.

Yesterday I did put together another circuit using a P channel mosfet that can be trimmed with a resistor, or potentiomter so that it doesn't drop below, say 5v or 7v depending on a resistor selected. The circuit worked well, ramping the speed of the fan up and down in response to my PWM signal.

The only issue I'm having is that I'm dropping 1.2v across the mosfet and it is getting warm, something which you wouldn't expect with a fet as it is being used as a switch and not in it's linear region. Mind you the only p-channel fet I have on hand is a high voltage one and they tend to have higher on resistance, need a higher gate charge and voltage to switch them on fully.

I'm considering purchasing a different p-ch mosfet that has a lower on resistance, maybe an order of magnitude lower than the one I have. I can live with a small voltage drop. :) The main problem is that there are literally many thousands of the things to choose from. :/
 
Last edited:
Some progress on the higher current circuit.

I got some new P-channel logic level mosfets from CPC today (they are still doing free delivery on any order). They are a FQP27P06 mosfet with lower on resistance than the IRF9640 I was using previously. The result is a 11.6v voltage across 1.2A of fans at 97% duty cycle.


This circuit should allow the use of fan feedback as it maintains a lower threshold which is controllable by a resistor/potentiometer.

Heat may be an issue but larger heatsinks can be employed to cope with that. The heat is only an issue at low duty cycle as the transistor is then in its linear zone so acts like a resistor itself.

In a few days I will try out a logic level N channel mosfet with silly low on resistance used in high side configuraion and maybe low side as well to see the differences and benefits in real life. I expect this to allow the fet to run ultra cool and control around even more fans, certainly more than I have and can power.
 
Here's an interesting variation.

Bow asked for a kit of parts for producing a combination of existing PWM fans, some 3 pin fans off a graphics card header.

k2iv83.jpg


The kit contains:-

1x PWM converter circuit with 3 fan output.
1x 4 pin PWM connector
1x 3 pin fan connector
2x 4 pin PWm headers
Some small heatshrink
Some medium sized heatshrink
Some large heatshrink
Some terminals for fan connectors.
Some black wire
A Molex connector (I left the SATA on so the length of wire can be cut perfect)

The PWM converter is one I built and tested two weeks ago. It makes sense to send as is and let Bow modify to his own needs.

I could have thrown in a graphics card fan connector as well but it wasn't needed for this build.
 
Awesome :)
I guess I have to pinch off two cables of the 4-pin header and connect them to the Molex, while the PWM and RPM signal cables go into the VGA header?

That's the basic idea. You might as well leave the tach wire in the connector and run off to the spare motherboard header you mentioned, or swap it for the 3 way connector if you would rather use that.
 
Hey Tealc,

Do you think this converter will enable to control a 36W watercooling pump (12V/3A) off a PWM header on a motherboard header or a PWM header of a Aquaero 6 XT?

Thanks,
deFi

It isn't designed for that sort of load. The limit of the shown circuit is around 1A.

Using a logic level MOSFET in high side configuration will allow switching of a 3A load but affords no tach feedback and no limits on PWM duty cycle, so if set up by the user incorrectly could lead to pumps stalling.
 
I'm afraid you are a bit off with your routing there.

R1 is 1k
1k -> I usually go with 330 Ohm 1/2w but 1k is fine but will limit your power output.
R3 is 10k
R2 is 470k
Your PNP is the wrong way around.

The GND goes to the top trace.

The Capacitor needs to be swapped around as it'll go bang that way around.
You also need to isolate the emitter of the PNP so it doesn't feed the capacitor, bridging the collector to the capacitor line.

PWM feeds in to R1.
 
There are no ICs here, just two transistors. You did swap the wrong one. The n channel MOSFET is the bs170, the PNP bjt is the b772. Turn the bjt around so that the it is base, collector, emitter from bottom to top. The bs170 needs to have its source pin on the ground rail.

The cap I find to be good around 22uF. 1uF is a little low. 10uF will work ok if its all you have.

I use a 50k trimmer but you might be alright with a lower value. All that happens is that you lose some control over ultra low power fans.
 
Last edited:
No that doesn't sound right. The b772 is not a to-220 so maybe that's where confusion is coming from. The pinout needs the emitter being provided with the 12v.

Send me a trust message and I will send you a proper schematic.
 
I may be up and running again in a little bit as I'm planning to get a shed/workshop to go out the back. I may even have a semi complete naked board in a box at my Mums that might even be close to fully working. I can't remember but did spot one as I was looking for a IR receiver the other day and doubt I would have kept it around if it were fully incomplete or faulty. I tended to build them 2 or 3 ahead of 'orders' and added heatshrink to complete.

I quite enjoyed making them so will do some again, I just haven't pushed it because Phanteks were doing theirs, although by reading some posts they were not without issues.
 
Last edited:
Back
Top Bottom