Designing a PWM to Analog mini board for fans
-
where are you based?
-
Europe -> Spain -> Valencia
-
I'm interested (located in germany).
If we can get enought peoble together, maybe we can arrange a package containing all (non-soldered) components along with the PCB./Julien
-
And me .
-
Nice!
This weekend I will update the post with schematics and simulations, and wait to see if more people are interested. If I have enough time I'll build a protoboard version and measure it with an oscilloscope and share it too.
-
This is what I did:
It's a LM324N opamp and a IPP114N03L MOSFET (N-channel, V.ds=30V, I.d=30A, V.gs=+-20V) but those things were chosen according to what fell to hand in my bits box.
The RC is 10k and 10uF, so if my maths is right cutoff frequency is 1.59Hz and rise time 0% to 99% = 0.46 seconds, i.e. very slow c.f. any PWM signal applied. The opamp and MOSFET are driven from the 24V line, but my fan is only 12V, so the pullup on the PWM is to 12V.
Mine is just built on stripboard.
I'd potentially be interested in a PCB (or two) but I'm nervous of the consequences of our idiot politicos Brexit 'deal' - if it falls fowl of the new VAT rules coming into the UK (there is no longer a low value exemption on import VAT) the Post Office will want an 8 quid handling fee to collect the VAT even if the VAT is only pennies.
-
Got some simulations done for my first schematic idea:
With this schematic, a 500Hz PWM frequency and a fan drawing 100mA at 24V (modelized as a 240Ohm resistor, 24V/240Ohm = 0.1A) these are the results:
for 25% PWM:
for 50% PWM:
for 75% PWM
for 100% PWM (full blast)
And this is a zoom-in for singal stability at 50% PWM:
As is, the analog voltage stabilizes in 150ms aprox, with a max voltage of (Vfan-Qvce) (transistor has a little voltage drop by itself), in this case 24V-0.2V -> 23.8V. Every PWM voltage will have this (-0.2V) applied, so 50% would be 11.8V instead of 12V, and so on.
Max. current depends on the transistor selected, with the caveat that the opamp has to supply enough current to the transistor base (with a typical beta about 80-100, that is, about a hundredth of the current required by the fan). Typical opamps supply about 10-20mA, so it should be good up to 1-2 amps (plenty overkill, as this is not designed for a heater but for fans!) We have to also check the maximum transistor disipation, which will happen somewhere in the middle of the ouput (PWM of 50%).
Later on I'll build it in a protoboard and check the real thing with an oscilloscope and report.
-
@achrn you schematic is ok because you are supplying 24V for a 12V fan. Mosfets have quite a high gate voltage that will substract from supply voltage, so voltage applied to the fan will not be able to reach near 24V (final voltage will depend on the mosfet used).
I'm using a BJT so I only lose about 0.2V from VCC, and a second order lowpass filter for the opamp, for an even steadier signal. BTW, did you check the dissipation power for the mosfet? It's eating quite a lot of power when regulating at 50%... I can't use a BC337 for example because it's only good up to 650mW, and I'm on the verge of it with my fans...
-
@achrn Brexit is indeed a problem right now... Maybe one small PCB + SMD components can be shipped as a postal letter?
-
@Egon-Net said in Designing a PWM to Analog mini board for fans:
Brexit is indeed a problem right now
Here in the US we are not in the EU and still will not need to pay that tax and post office fees, so the root cause may be different than what you think.
-
Question from a non-electrician:
The time to reach the desired Voltage takes around 90-120s, is there a way to shorten this without sacrificing precision or risking an overshoot?/Julien
-
milliseconds, not seconds!
-
And regarding max voltage, I had it wrong, the opamp model I used was too ideal and supplied more than what was supplied to him... Real max Vmax then should be Voutmax from opamp - Vbe from transistor I'm looking for components to minimice this.
-
@Egon-Net said in Designing a PWM to Analog mini board for fans:
Real max Vmax then should be Voutmax from opamp - Vbe from transistor
May be worth adding a few components to achieve a more ideal requirement set. For example,
-
No significant voltage drop at max voltage (as it is with the existing PWM).
-
Decoupling pwm input voltage from output voltage. E.g. 12V in, 24V out or vice versa, or 3.3 or 5V PWM input and 12V outout.
-
Preserving the common (+) of existing PWM driven fans. (your design seems to change it to common (-)).
Other stretch goals are high efficiency (no heat when running at let's say 50%) or galvanic input isolation (opto coupler?).
Just a thought.
Overall, your idea for a PWM -> Voltage fan control is very good and much needed.
-
-
@Egon-Net said in Designing a PWM to Analog mini board for fans:
@achrn you schematic is ok because you are supplying 24V for a 12V fan. Mosfets have quite a high gate voltage that will substract from supply voltage, so voltage applied to the fan will not be able to reach near 24V (final voltage will depend on the mosfet used).
Exactly, which is why I caveated with the observation that I was using what I had to hand. The opamp output swing limits it further too - it doesn't get the gate to 24V either (even if teh PWM was coming in at 24V). Sorry, I should possibly have been more explicit that I wasn't advocating it as a great circuit (which, again, is why I might be interested in a better implementation).
There's a moderate heatsink on teh mosfet.
-
This post is deleted! -
@Egon-Net said in Designing a PWM to Analog mini board for fans:
milliseconds, not seconds!
yeah, thats more logical
-
@zapta said in Designing a PWM to Analog mini board for fans:
@Egon-Net said in Designing a PWM to Analog mini board for fans:
Real max Vmax then should be Voutmax from opamp - Vbe from transistor
May be worth adding a few components to achieve a more ideal requirement set. For example,
-
No significant voltage drop at max voltage (as it is with the existing PWM).
-
Decoupling pwm input voltage from output voltage. E.g. 12V in, 24V out or vice versa, or 3.3 or 5V PWM input and 12V outout.
-
Preserving the common (+) of existing PWM driven fans. (your design seems to change it to common (-)).
Other stretch goals are high efficiency (no heat when running at let's say 50%) or galvanic input isolation (opto coupler?).
Just a thought.
Overall, your idea for a PWM -> Voltage fan control is very good and much needed.
Hi @zapta! I'll try to answer in order:
-
The voltage drop issue is hard to resolve. I can only think in two ways for achieving it: some kind of step-up voltage converter, or going full signal filtering. The step-up will add quite a bit of complexity and would force the output voltage to be fixed (12V? 24V?), and I want to avoid a full signal filter, because it would use quite big inductors, that end up being big, heavy and expensive. I've been looking at opamps/BJT combos that allow me to stay within 0.5V of VCC, and I think I can live with it. I will have a look at existing integrated PWM to Analog too (I think analog devices makes such an IC), because yes, it would be nice to go up to the supply rail.
-
Decoupling is more or less done already. I can further add a voltage divisor and add later gain in the filter so you could use any voltage combo, even things like 3.3v -> 24V
-
I think I haven't understand you correctly. You use the PWM+ wire from Duet. In the base design you use both PWM+ and PWM- (they are called Fan+ and Fan-). Duet's do the PWM on the ground side (PWM-), so you can use any voltage for the fan.
Regarding the other comments, heat is unavoidable once you give up filtering in full signal, because there must be some analog component that does the regulation (we are not switching voltages) but since we are dealing with currents <100mA, it should stay well under 1W. And IMHO adding galvanic isolation is out of the question for the complexity it would add when we are just dealing with fans...
Thanks for your comments, that's really what I need to help me think out of the box! You never know what one's maybe missing!
-
-
@achrn said in Designing a PWM to Analog mini board for fans:
@Egon-Net said in Designing a PWM to Analog mini board for fans:
@achrn you schematic is ok because you are supplying 24V for a 12V fan. Mosfets have quite a high gate voltage that will substract from supply voltage, so voltage applied to the fan will not be able to reach near 24V (final voltage will depend on the mosfet used).
Exactly, which is why I caveated with the observation that I was using what I had to hand. The opamp output swing limits it further too - it doesn't get the gate to 24V either (even if teh PWM was coming in at 24V). Sorry, I should possibly have been more explicit that I wasn't advocating it as a great circuit (which, again, is why I might be interested in a better implementation).
There's a moderate heatsink on teh mosfet.
I've just tested TLV9352 as the opamp and TIP41A as the BJT, and it leaves me at 0.5V from supply voltage. It might be quite difficult to get better than that with this kind of schematic...
-
Ill get a hand full if Brexit is not going to make shipment to Germany crazy expensive. Are you heading for SMD or through hole components?
This is not only super convenient for Fans but i will use this analog voltage to control some LEDs with an Arduino Nano