Duet 2 Mosfet switch off ringing
-
@dc42 said in Duet 2 Mosfet switch off ringing:
@peter_o, please can you post a trace using a single x10 probe connected to the negative fan wire, with oscilloscope ground connected to Duet ground. I will find that easier to interpret.
@dc42, here as requested: Standard probe x10, ground connected to "always on fan GND" and probe to PWM fan 2 "-" in question.
The pattern is changing from pulse to pulse, I've shot two different ones:
-
@jens55 said in Duet 2 Mosfet switch off ringing:
@peter_o said in Duet 2 Mosfet switch off ringing:
You talked 'differential' mode earlier and here you are talking single probe. If you connected the scope ground lead to one side of the fan, unless your scope is running on battery power and not connected to AC or grounded any other way, you can cause all manor of havoc.
Yes, thanks for giving the warning. I've learned that from Daves Eevblog videos.
Sorry, that I didn't write this clear enough:
I used a diffentical probe with resistor chains and amplifier. (Micsig DP 10007)As dc42 suggests, the proper way of doing the measurement is referenced against the Duet ground.
See last post. That is now standard x10 probe.
Also since the Duet switches the ground line, that introduces some unexpected things in your measurements and you really need to be aware of what is happening.
N-type mosfets, yes. That was the reason for me to use a "real" differential probe except for the last two shots. Sorry for not clarifying this enough.
-
@peter_o, thanks. It looks to me that your fan has no input capacitor at all and doesn't like PWM. It may look better if you connect a 0.1uF capacitor in parallel with the fan.
-
Yes it's one of these cheap 50mm blowers often used in chinese style 3d printers.
(Sometimes I write for the german hobbyists 3d print forum, e.g. [https://drucktipps3d.de/duet-2-erste-eindruecke/]. That's the main reason, why I'm nerding into things like this, to gain a better understanding. The forum community is using low cost components. It's not that easy to convince them to use higher quality components like premium fans or duet boards. )
I've added a 100nF and now it looks like this, again with a changing pattern:
-
I'll try some different capacitor values on my cheap lab setup to avoid overloading the duet's mosfet and will come back with the best result.
Thx so far, dc42 and all for spending the time!
-
Amazing difference for 100 nF !
-
@peter_o said in Duet 2 Mosfet switch off ringing:
I'll try some different capacitor values on my cheap lab setup to avoid overloading the duet's mosfet and will come back with the best result.
Thx so far, dc42 and all for spending the time!
Don't make it too large, or you will increase power dissipation in the mosfet.
-
For convenience I used an arduino setup with an IRF3708 mosfet in my "lab2".
Measurement with the differential probe over the fan.First the same blower as above with 0.1µF again.
It's a different mosfet, but the pattern ist exactly the same. Changing bewtween patterns:Same setup with 0.47µF
Quite some switching time. I understand your warning, @dc42.A Sunon Maglev 40mm fan without capacitor is not behaving better.
Sunon Maglev with 0.1µF
Sunon Maglev with 0.47µF
My conclusion: A more premium fan shows the same problem.
And a capacitor can improve the situation, but seems not to solve it completely.
Thanks for the tip, @dc42!If there are no other ideas, I will leave it with that for now and do some experiments on breadboards with an optocoupler in front of the gate to have 12V avaiable for the gate. Of course this would be no solution for a given 3D printer board.
-
@peter_o said in Duet 2 Mosfet switch off ringing:
Measurement with the differential probe over the fan.
What kind of signal are you expecting to see with a differential probe over the fan when the MOSFET turns off?
The fan will be as we say "Hanging in the breeze" with a connection to VPOWER+ on one end and the other end will have no connection anywhere so the fan coils will be able to boing all over the place if they want to. That doesn't mean the fan is going to turn on and off at all, just that the flying-free voltage on this disconnected fan is boinging around a lot.
What do you want to see under these conditions?
-
Ok. I see. That's a strong argument indeed. Thx.
The argument should be the same, when measuring the "Fan -" Pin vs. GND with a standard probe and high impedance oscilloscope setting.
On the other hand I remember, that these effects vanished, when I used a cheap external mosfet board with optocouplers. Have to go back and check and look into that schematics.
I will fiddle around some time the next days and take your argument into account. Maybe I gain some more understanding. The electronics beginner I am. -
@peter_o said in Duet 2 Mosfet switch off ringing:
these effects vanished, when I used a cheap external mosfet board with optocouplers.
Are you sure that that board had an open drain configuration with no additional components attached to the mosfet's Drain pin? Having additional components such as the resistor/diode in the diagram below may suppress voltage changes by the fan when the mosfet is off.
-
Quite sure. The schematics of the Duet 2 seem to be basic:
https://github.com/Duet3D/Duet-2-Hardware/blob/master/Duet2/Duet2v1.04/Duet2_1.04c_Schematic.pdfNo gate driver as in your example.
Alan, in addition to my last post I think we can see cases within my screenshots, where the inductance effects of the motor are high enough to trigger the gate again and swith the mosfet on for some time. That would be a little more than just flapping around.
-
@peter_o, 2-wire fans were never intended to work with PWM. So it's a minor miracle that some of them do, and it's no surprise that they generate strange transients when you PWM them.
The ringing of this type of circuit can be controlled to some extent by adjusting the turn-off time of the mosfet. On Duet 2 and Duet 3 this turn off time is controlled by the value of the mosfet gate series resistor. The choice is a compromise. A high value gate resistor leads to a slow turn-off and turn-on, which increases the power dissipation in the mosfet. A low value gives fast turn-on and turn-off, but that may excite ringing in the load (if it is inductive) and generate EMI.
Opto isolators are slow unless used carefully; so your mosfet switch probably has a slow turn-off time. If it's a large mosfet driving a small load such as a fan, it will be able to handle the increased power dissipation.
-
Hi @dc42 ,
thanks for the explanaitions and your time!So, if I would insist in bringing that EMI away, I should probably use a 4 wire fan.
Otherwise it's just the way 2 wire fans are kind of running by PWM and I should come to terms with it.BTW: I never had any doubt, that the duet boards are carefully optimized designs. It's just abount gaining some small understanding on my side.
Thx again!