Designing a PWM to Analog mini board for fans

Hello all!
I'm building a custom 3d printer, and I had problems with PWM outputs not playing too well with several fans, so I'm designing a PWM to Analog mini board, with an opamp as a lowpass filter, and a transistor for current.
Since I'm lowpass filtering in small signal, no inductors are needed, just a couple of resistors and capacitors, EMI should not be a problem, and the pcb should be very small. My aim is just to use an all 24V system (from a Duet3d Duet 2 Wifi), but it would be rather easy to make the circuit voltage-agnostic so you could be able to mix and match voltages in the future.
Is anyone interested in such a circuit? I'm thinking about having some pcb boards manufactured, and since most services are about 20 pieces minimum order, I will have plenty of them...
Any thoughts?

Maybe all you need to do is change the PWM frequency.

But if you really want to go the analog way: did you try to build a prototype already? For any significant current that transistor is going to dissipate a lot of heat!

First thought: where's the schematic and the vendor link for the device (fans?) you are trying to
control ?"

It might be better to change fans, it will be much more efficient that way. Try this link for PCBs, it is my favorite. PCB Prototype & PCB Fabrication Manufacturer - JLCPCB

Since you are designing the board, Analog Devices makes several PWM to voltage output devices, that could save you a lot of design time.

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.

Before committing to this method, have you tried changing the fan speed with an analog variable voltage to see if the fan motor is happy with lower than designed supply voltage.

I would say that your fan is a brushless DC Fan, it has a controller built into it to control the startup and speed, some of this type do not perform very well with an adjustable power supply.

Tom... :slight_smile:

wvmarle:
Maybe all you need to do is change the PWM frequency.

But if you really want to go the analog way: did you try to build a prototype already? For any significant current that transistor is going to dissipate a lot of heat!

I already tried a "manual frequency sweep" from 10Hz to some KHz, and there was not a good one. Also, the expansion board (Duex5) has a fixed PWM frequency of 500Hz, so I have to deal with that.
I'm building the prototype right now, and I'm already aware of the power dissipation. But I'm under 100mA, and in the worse case (about 50% PWM) the BJT would burn about 0.6W max, which is acceptable for my case, just a little heatsink will do. If I had to use higher currents, it absolutely would be a problem tho.

raschemmel:
First thought: where's the schematic and the vendor link for the device (fans?) you are trying to
control ?"

This is the early schematic:


Using TLV9352 as the opamp and TIP41A as the BJT I can get up to VCC-0.5V.

The fans are mix and small match brushless fans (4010 most of them), about 80mA each. No more data electrical data about them.

gilshultz:
It might be better to change fans, it will be much more efficient that way. Try this link for PCBs, it is my favorite. PCB Prototype & PCB Fabrication Manufacturer - JLCPCB

Since you are designing the board, Analog Devices makes several PWM to voltage output devices, that could save you a lot of design time.

Thanks, I already used jclpcb and pcbgogo in the past with success :slight_smile:
I'll have a look at Analog Devices ic's, thanks for the advice!

TomGeorge:
Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.

Before committing to this method, have you tried changing the fan speed with an analog variable voltage to see if the fan motor is happy with lower than designed supply voltage.

I would say that your fan is a brushless DC Fan, it has a controller built into it to control the startup and speed, some of this type do not perform very well with an adjustable power supply.

Tom... :slight_smile:

Thanks Tom!
You are right, my fans are 4010 brushless fans at 24V, and I already checked they work with lower voltage. In fact, the do so quite linearly with at least a range of [12V-24V]. The thing is it's very difficult to find good airflow blower fans at 4010, and the ones I managed to find are not so tolerant of PWM'd supply (as brushless fans that they are). Some of them whine horribly, loss a lot of rpm in the very same moment I got them under 99%, or directly switch off. Changing frequency doesn't help as I explained in another post, so the only thing I could do besides having them at 100% all the time is going analog...

Your design choices seem rather arbitrary - why would you use a TIP41a to drive an 80mA fan? Or an NE5532 given that it does not work rail - rail?

The TLV9532 however seems very appropriate choice given that you plan to make it suitable for a wide range of voltages.

If for the intended application you would be driving more than a single fan would it be better to use a dual op amp?

The BD139 has a thermal resiistance junction - ambient of 100C / W so you would certainly need a small heat sink.

The analog devices PWM - voltage seem to be limited to use around 5V - and are much more expensivve than an op amp and a few components.

johnerrington:
Your design choices seem rather arbitrary - why would you use a TIP41a to drive an 80mA fan? Or an NE5532 given that it does not work rail - rail?

The TLV9532 however seems very appropriate choice given that you plan to make it suitable for a wide range of voltages.

If for the intended application you would be driving more than a single fan would it be better to use a dual op amp?

The BD139 has a thermal resiistance junction - ambient of 100C / W so you would certainly need a small heat sink.

The analog devices PWM - voltage seem to be limited to use around 5V - and are much more expensivve than an op amp and a few components.

It was a fast schematic draw with the components of another (audio related, hence the 5532) one. After that I searched for a more suitable opamp and came with the TLV. BD139 was my first option, but at the currents I'm working, TIP41 has less voltage drop, and is still very cheap too. I didn't make the maths, but maybe even with the tip41 could get rid of the heatsink. BTW, TLV9532 is already a dual opamp part!

4010 is a size designation; not a type or power indication. A quick search popped up 24V fans of that size rated 120-250 mA. So go worst case: 250 mA.

At 24V that is 6W (pretty impressive for such a small thing). Even at the best case of 120 mA that's still 2.88W. If you want to lower the voltage by half (12V to the fan, 12V across the transistor - most dissipation in the transistor at this point) that could be as much as 1.5W dissipation. You will need a small heat sink for that.

wvmarle:
4010 is a size designation; not a type or power indication. A quick search popped up 24V fans of that size rated 120-250 mA. So go worst case: 250 mA.

At 24V that is 6W (pretty impressive for such a small thing). Even at the best case of 120 mA that's still 2.88W. If you want to lower the voltage by half (12V to the fan, 12V across the transistor - most dissipation in the transistor at this point) that could be as much as 1.5W dissipation. You will need a small heat sink for that.

No problem with that, if someone needs more current, it can be heatsinked. With my go-to fans the transistor max dissipation is about 0.6W.
I know 4010 is a size designation, they can be also axial type or radial type. In my case I have both: axial cools the hotend and axial cools the part being printed, but it's rather easier to find good axial fans than radial fans for that size.

PWM outputs not playing too well with several fans

from 10Hz to some KHz, and there was not a good one

Can I ask why you are being so vague about what's actually going wrong when controlling your fans with pwm? There are good reasons why it is almost always done that way.

Hi,
If you use 4 wire fans then this could be a solution;

Google arduino 4 wire fan control

Tom... :slight_smile:

PaulRB:
Can I ask why you are being so vague about what's actually going wrong when controlling your fans with pwm? There are good reasons why it is almost always done that way.

I'm not using an arudino board, but a Duet3D Duet 2 Wifi + Duex5, for a 3d printer using e3d toolchanger plates. That plates force the printing tools to have rather smallish fans. The problematic fans are some 4010 and 3010 axial and 4010 radial. I use a fixed 500Hz PWM frecuency because of the Duex5. Fans range from stopping whenever I lower PWM from 100%, to whine horribly to lose all air flow even at 99% PWM. Fans consume about 0.1A at most, at 24V. Axial fans are easier to replace, but 4010 radial fan with good airflow are very difficult to find. That's why I want to do a PWM->Analog conversion.
So:

  • Frequency can't be changed (500Hz)
  • Fans can't be changed (4010 radial good flow fan difficult to find)
    -> PWM to Analog low current (<100mA) solves my problem, so going to build a mini pcb
    -> Many people before in 3d printing forums have had the same problem, hence I'm ofering it to anyone else, and I thougt that people using arduinos (myself have used arduinos for some other projects) may want some.

TomGeorge:
Hi,
If you use 4 wire fans then this could be a solution;

Google arduino 4 wire fan control

Tom... :slight_smile:

I wish I could but I have several problems for that kind of fans:

  • Finding a 4010 radial fan with good airflow, 24V and 3/4 wires
  • Controlling it from a Duet3D board, which PMW signal controls ground, not VCC.

I guess it's worth experimenting, but there's a danger that if the fans won't run at much less than 100% pwm, they won't run at much less than 100% voltage either, so swapping to voltage control may not solve anything.

The whining is, I agree, because of that 500Hz pwm frequency. Maybe you could use an "arduino" (maybe just an attiny85) to read the duty cycle of the 500Hz pwm signal from the Duex5 and output a ~30KHz pwm signal to drive the fan.

PaulRB:
I guess it's worth experimenting, but there's a danger that if the fans won't run at much less than 100% pwm, they won't run at much less than 100% voltage either, so swapping to voltage control may not solve anything.

The whining is, I agree, because of that 500Hz pwm frequency. Maybe you could use an "arduino" (maybe just an attiny85) to read the duty cycle of the 500MHz pwm signal from the Duex5 and output a ~30KHz pwm signal to drive the fan.

I've tested the fans with a regulated power supply, and they are quite linear from 12V to 24V at the very least, it's the PWM itself what breaks things.
In the other hand, Duex5 has that fixed frequency, but Duet2 Wifi is configurable, so I've been able to test the fans with several frequencies, and no frequency solves the issue. My brushless fans just dislike PWM a lot.

PaulRB:
Maybe you could use an "arduino" (maybe just an attiny85) to read the duty cycle of the 500Hz pwm signal from the Duex5 and output a ~30KHz pwm signal to drive the fan.

An ATtiny402 is much cheaper than the 8g and has the ability to read PWM duty cycle directly.
Otherwise if DIP package is important I'd go for an ATtiny84a. Also cheaper than the ATtiny85 (but a bit more than the 402). The main advantage of the 85 is being able to put out a 250 kHz PWM.