RC Low-Pass Filter for Blower Fan
-
@wilriker said in RC Low-Pass Filter for Blower Fan:
Can anyone tell me what I will get on the signal line of a fan? I mean, when I put a multimeter to it and ground the other side, what will I measure? Is there a specification that these signal lines follow?
I want to know what speed my fan really is at when I command it to run at 30% (I know the spec'd full speed).There are two problems with this:
- If you ground the negative wire, the fan will run at full speed, because the PWM on the Duet switches the negative feed to the fan (like all other controllers that I know of);
- The tacho line may not produce a sensible output when you PWM the fan, because these fans were never designed to be fed a PWM'd supply.
The solution is to use a 4-wire fan that has a separate PWM input. RepRapFirmware supports a single fan tacho input, and DWC can display the RPM for a 4-wire fan whose tacho output is connected to that input.
-
@wilriker I'm glad I could I was able to offer you some help.
For your additional question;
The signal line of the fan is a pules output. Most fans will provide 4 pulses for every revolutions. The pulse wire is pulled to ground, so some kind of pull-up resistor is needed. Just using a multi-meter will not give you any usable information. You would need an oscilloscope to see the pulses. The issue with reading the speed and controlling the speed at the same time is, most fan controllers use the ground for the PWM signal. There are ways around the problem....- change the PWM control circuit from controlling the ground, to control the Vin. (doable, but not the best way)
- when a speed check is needed, change fan drive circuit from PWM mode to full on mode, so the fan's negative will be connected to ground. Then after 1 revolution (or more) of the fan, read the speed, then turn the fan drive circuit back to PWM mode. The easy way to control and read fan speed at the same time, is to get a 4-wire fan.
This article should give you some more information about fan speed control, and fan speed reading.
Fan Speed Control Is Cool! -
@iamturbo1978 said in RC Low-Pass Filter for Blower Fan:
Most fans will provide 4 pulses for every revolutions
The fans I have produce 2 pulses per rev.
-
@dc42 Thanks for bringing that up. I wanted to say there are 2 pulse fans. My Delta (company) fans are all 4 pulse per revolution.
-
Thanks @dc42 and @Iamturbo1978
I already was afraid of getting the answer that I would need an oscilloscope to get speed readings.
@dc42 Just for clarification: I did not mean to ground the negative side of the fan but the second probe of the multimeter as I hoped I would get some kind of voltage through the signal wire that would then need to be A/D converted back into RPM.
Very interesting though that you mention that probably most PWM circuits are switched on ground. In my absence of expertise in this field I assumed this would be something special about the Duet. -
Not to dissuade you from the academic pursuit of fan PWM, but wouldn't it be easier to simply acquire a better suited blower fan?
https://www.digikey.ca/short/jrmcdf for example?
-
@dc42
Hi, can the pwm output be damaged by a capacitor ?
for my blower fans I also had to try around a little with the PWM frequencies
with 30Hz it works good for me -
@knaudler said in RC Low-Pass Filter for Blower Fan:
@dc42
Hi, can the pwm output be damaged by a capacitor ?Yes. Connecting a large capacitor directly across a PWM output (without a series resistor) is likely to damage the mosfet, due to the current surge it causes every time the mosfet turns on.
-
@dc42 said in RC Low-Pass Filter for Blower Fan:
Yes. Connecting a large capacitor directly across a PWM output (without a series resistor) is likely to damage the mosfet, due to the current surge it causes every time the mosfet turns on.
What qualifies as a large capacitor? I had my 220ยตF capacitor wired in without a series resistor - but only for testing. I did not use this longer than a couple of minutes and so far everything still seems to work.
-
@phaedrux said in RC Low-Pass Filter for Blower Fan:
Not to dissuade you from the academic pursuit of fan PWM, but wouldn't it be easier to simply acquire a better suited blower fan?
That's probably true - but who says I want it to be easy? But seriously, I chose my blower fan (exact model: TFD-B5015M12B) because it gives my enough airflow while still being at an acceptable noise level. The one you proposed is already about 7dB louder - which is more than 4 times louder.
Also that's part of the fun (and in some cases frustation) I chose by pursuing the path of building a better print from a crappy one.
Today I stopped at my local electronics dealer and asked her for a 6.8Ohm resistor rated for 2W. She only had 5W in stock, so I took this chunky beast instead.
This is based on me having basically no clue of what I am doing but I figured if I have a fan with about 1.7W power I would get a problem with my standard 1/4W resistors. If that assumption was false, please correct me. -
@wilriker said in RC Low-Pass Filter for Blower Fan:
What qualifies as a large capacitor? I had my 220ยตF capacitor wired in without a series resistor - but only for testing. I did not use this longer than a couple of minutes and so far everything still seems to work.
If you continue using 220uF then I expect the mosfet will fail. To work out what value would be safe without a resistor, I would need to look at the switching time of the mosfet on an oscilloscope. But the easy fix is to use a series resistor so that the charging current cannot exceed the 3.5A rating of the mosfet, e.g. at least 3.5 ohms @ 12V or 7 ohms @ 24V. Using a series resistor will also give you better speed control.
Even better is to use a series inductor before the capacitor and a high PWM frequency, for example 1mH, 1uF and 50kHz. With older Duets you would also need to add a flyback diode.
-
@dc42 As I said this was only for testing purposes and sadly I seem to not have damaged my MOSFET yet. But good to know that I could.
I bought a 6.8Ohm resistor today that will be wired in series as a replacement for my 1kOhm resistor I already have in the circuit I built meanwhile (but that won't let enough current through to even let the fan spin up).
In your "Even better" recommendation, do I get it right that in this case I replace the resistor by the inductor? And what makes this solution better?
-
Yes, replace the resistor by an inductor (and use a smaller capacitor). This solution is better because it gives you a variable smooth DC output that is proportional to the PWM, and the mosfet doesn't have to handle high peak currents.
With the resistor and capacitor, the output will also depend on the load on the fan, because it's essentially a balance between the rate at which the capacitor charges through the series resistor and the rate at which it discharges through the fan. But you may find that it works well enough.
-
@dc42 said in RC Low-Pass Filter for Blower Fan:
- The tacho line may not produce a sensible output when you PWM the fan, because these fans were never designed to be fed a PWM'd supply.
I would still want to give this a try even if it may output bogus values - only then I know for sure.
So where would I connect the tacho line to and what would I have to do in config?EDIT: I just found https://duet3d.dozuki.com/Wiki/Connecting_and_configuring_fans#Section_Connecting_4_wire_fans where it says how and where to connect the tacho line to. What is not clear to me is how/if I have to configure something or if this is bound to
M106 I1
.@iamturbo1978 said in RC Low-Pass Filter for Blower Fan:
Try this,
- change the PWM frequency to 100Hz
- Take (3) of the 22 ohm resistors and wire them in parallel.
- Change the 1k ohm resistor with the resistor pack from step 2.
That should help you out, with what you have on hand.
Yesterday I changed my 1kOhm resistor to a (regular) 6.8 Ohm resistor and set frequency to 100 Hz. First of all the fan spun up with this put in series on the fan wires - in contrast to before where the fan would just not run at all.
Now the problem is that at 100Hz it runs virtually only full speed all the time, no matter of what I set speed to. If I reduce frequency to 10-15Hz I can hear a difference in speeds but still I think it runs significantly faster then it it should. I did not yet measure output voltage, though.I want to try to figure out how I can measure the fans speed before I further tinker on the RC-filter or switch to a LC-filter. Just wanted to let you know what came out of it so far.
-
@wilriker said in RC Low-Pass Filter for Blower Fan:
I would still want to give this a try even if it may output bogus values - only then I know for sure.
So where would I connect the tacho line to and what would I have to do in config?EDIT: I just found https://duet3d.dozuki.com/Wiki/Connecting_and_configuring_fans#Section_Connecting_4_wire_fans where it says how and where to connect the tacho line to. What is not clear to me is how/if I have to configure something or if this is bound to
M106 I1
.If you want to try connecting the tacho output of a 3-wire fan to the Duet, you must connect a diode between the fan tacho output (cathode) and the Duet RPM input (anode), to prevent 12V being fed into the Duet RPM pin.
Yesterday I changed my 1kOhm resistor to a (regular) 6.8 Ohm resistor and set frequency to 100 Hz. First of all the fan spun up with this put in series on the fan wires - in contrast to before where the fan would just not run at all.
Now the problem is that at 100Hz it runs virtually only full speed all the time, no matter of what I set speed to. If I reduce frequency to 10-15Hz I can hear a difference in speeds but still I think it runs significantly faster then it it should. I did not yet measure output voltage, though.That's all to be expected using an R-C filter. A higher value resistor will give you more speed control, but will limit the maximum speed.
-
@dc42 said in RC Low-Pass Filter for Blower Fan:
If you want to try connecting the tacho output of a 3-wire fan to the Duet, you must connect a diode between the fan tacho output (cathode) and the Duet RPM input (anode), to prevent 12V being fed into the Duet RPM pin.
From you calling it the "Duet RPM pin" I assume there is just the one (PB6) and whenever there is a signal fed into it it will be providing this information automatically with no further config, right?
Yesterday I changed my 1kOhm resistor to a (regular) 6.8 Ohm resistor and set frequency to 100 Hz. First of all the fan spun up with this put in series on the fan wires - in contrast to before where the fan would just not run at all.
Now the problem is that at 100Hz it runs virtually only full speed all the time, no matter of what I set speed to. If I reduce frequency to 10-15Hz I can hear a difference in speeds but still I think it runs significantly faster then it it should. I did not yet measure output voltage, though.That's all to be expected using an R-C filter. A higher value resistor will give you more speed control, but will limit the maximum speed.
And another day I learned something new here.
From how I understood you regarding the LC-filter this would give me both, a smooth DC output as well as a good control on speed, right? -
@wilriker said in RC Low-Pass Filter for Blower Fan:
From you calling it the "Duet RPM pin" I assume there is just the one (PB6) and whenever there is a signal fed into it it will be providing this information automatically with no further config, right?
Yes.
From how I understood you regarding the LC-filter this would give me both, a smooth DC output as well as a good control on speed, right?
Yes. make sure that your Duet is recent enough to include flyback diodes on the fan outputs.
-
@dc42 said in RC Low-Pass Filter for Blower Fan:
Yes. make sure that your Duet is recent enough to include flyback diodes on the fan outputs.
Yes, I got a 1.03 which already has them.
One last question: I saw that inductors are also rated for an amperage besides their inductance. What would I have so get for this case? Or what do I have to consider? The fans amperage (140mA)? Or something else?
-
@wilriker said in RC Low-Pass Filter for Blower Fan:
@dc42 said in RC Low-Pass Filter for Blower Fan:
Yes. make sure that your Duet is recent enough to include flyback diodes on the fan outputs.
Yes, I got a 1.03 which already has them.
One last question: I saw that inductors are also rated for an amperage besides their inductance. What would I have so get for this case? Or what do I have to consider? The fans amperage (140mA)? Or something else?
I would choose somewhat higher than the fan current, e.g. 250mA or more.
-
@dc42 Thanks again.
Earlier tonight I was playing some more with my fan and the RC-filter. I used my multimeter to measure the voltage and found something that at least to me seems strange - but maybe this is normal and I just don't know.
When I set the fan speed to 30% output voltage (after RC) never actually was 30% of Vin. It always was above it. In my case it should have been about 4V but with the RC-filter it was depending on frequency (higher frequency=higher voltage) but even at a ridiculous
F2
it still was about 8V. I can imagine that this could be expected using the small resistor and large capacitor.
But I also tried without the RC-filter and this was also a little bit frequency dependent (higher frequency=lower voltage) but it never came down to 4V either. At least it got closer and was "only" 5.6V.Now what am I missing? Is a multimeter just not the right tool for this task?