Welcome! Log In Create A New Profile

Advanced

External fans

Posted by appjaws1 
Re: External fans
August 29, 2014 04:50PM
I've just released firmware 0.78p which contains a fix for the PWM frequency problem. There was a bug deep in the one of the libraries in the Arduino core, a line of code whose sole effect was to mess up PWM channel 0 when any of the other 7 PWM channels was programmed. My best guess is that someone added that line of code while debugging something and forgot to remove it.

I've set the PWM frequency to 25kHz, which is what most 4-wire fans are designed for. The power mosfet is rather slow at switching, but a reasonable range of control is available. You may get a greater range if you add a pullup resistor in the range 330 ohms to 1K between the 2N7000 gate and +12V, or (better) a pullup resistor in the range 100 ohms to 470 ohms between the 2N7000 gate and +5V.

Edited 1 time(s). Last edit at 08/29/2014 04:50PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: External fans
August 30, 2014 07:07AM
Hi David,
Thank you for the change in firmware, you are a great detective.

However I have loaded the firmware update and tested one of my fans and it did not work.
Just for my piece of mind please check the following wiring diagram to check that I have connected everything properly.



With M106 S0 I get 10.69v at the gate and 0v at the drain
With M106 S255 I get 0.02v at the gate and 0v at the drain

I tried a pull up resistor by disconnecting the duet fan -ve and connecting the gate to the duet +ve via the 330 ohm resistor. Was that correct?
With this arrangement I get 12.28v at the gate and 0v at the drain.

Do you think the mosfet is damaged? How can I test it?

Again thank you for all your help and support, can't wait for my 2 nozzle board upgrade.

Paul


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Re: External fans
August 30, 2014 08:52AM
If the fan is not running at all, then the fan or the +12V connection is faulty.

If the fan is running all the time, then either the 2N7000 is faulty (e.g. damaged by static), or the fan interface needs something other than an open-drain drive. You have already said that there is 3.4V on the brown wire when it is disconnected, so the fact that you are now measuring 0V suggests a shorted 2N7000. If you disconnect the brown wire from the 2N7000, then the fan should run at max speed with the brown wire open circuit and at minimum speed with it connected to ground. If that is the case, try a new 2N7000. Make sure it is supplied to you in antistatic packaging. To protect it from static, connect the gate to the source until you have finished wiring it to the Duet.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: External fans
August 30, 2014 12:51PM
Thanks again David,

Well I am ready to give up. The fan is running at max speed all the time.

Quote
dc42
If the fan is running all the time, then either the 2N7000 is faulty (e.g. damaged by static), or the fan interface needs something other than an open-drain drive. You have already said that there is 3.4V on the brown wire when it is disconnected, so the fact that you are now measuring 0V suggests a shorted 2N7000. If you disconnect the brown wire from the 2N7000, then the fan should run at max speed with the brown wire open circuit and at minimum speed with it connected to ground. If that is the case, try a new 2N7000. Make sure it is supplied to you in antistatic packaging. To protect it from static, connect the gate to the source until you have finished wiring it to the Duet.

With the brown wire disconnected I am getting 2.4 volts between the source and gate and 0.18 volts between source and drain and 2.2 volts between gate and drain
I don't know where the 3.4 V came from

Paul


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Re: External fans
August 30, 2014 01:10PM
FWIW in my testing I have the fan black and red wires connected to the pins immediately above the pins that the standard hot end fan (pink and black wires in the hot end loom) are connected to. The lowest fan speed is obtained with M106 S30. Going to S20 or below makes the fan speed up again.

Edited 1 time(s). Last edit at 08/30/2014 01:10PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: External fans
August 30, 2014 01:29PM
PS - Paul, you are welcome to send me your fan for testing, or even bring it here if you are within easy reach of the Surrey/Hants border.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: External fans
August 31, 2014 09:18AM
Quote
dc42
FWIW in my testing I have the fan black and red wires connected to the pins immediately above the pins that the standard hot end fan (pink and black wires in the hot end loom) are connected to. The lowest fan speed is obtained with M106 S30. Going to S20 or below makes the fan speed up again.

Still confused.

The pin above the black hot end wire is the pin you said I should use as the ground pin, that would make the source and gate connected together.
If you can spare a little time could you please draw a simple wiring diagram.

Do you think the BC 337 transistor that you recommended would switch faster than the 2N7000 mosfet?

Paul


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Re: External fans
August 31, 2014 10:40AM
Quote
appjaws1
Still confused.

The pin above the black hot end wire is the pin you said I should use as the ground pin, that would make the source and gate connected together.
If you can spare a little time could you please draw a simple wiring diagram.

No it doesn't, because the gate is connected to the FAN0 negative output, which is switched to ground by the power mosfet. When the power mosfet isn't connection it to ground, the LED and series resistor pull this pin up (weakly) towards +12V.

Quote
appjaws1
Do you think the BC 337 transistor that you recommended would switch faster than the 2N7000 mosfet?

It's not the 2N7000 that's the problem, it's the power mosfet on the Duet. Ideally, we would take the power mosfet out of the circuit. However, now that I have reduced the PWM frequency to 25kHz, the switching speed of the power mosfet is less of a problem. I can control my Arctic F12PWM fan from 450 to 1370 rpm., and I am not using a pullup resistor.

Diagram attached. The yellow wire only needs to be connected if you want to monitor the RPM, so I suggest you leave it disconnected until you get the rest working.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Attachments:
open | download - Scan 238.JPG (88.4 KB)
Re: External fans
August 31, 2014 02:50PM
Can someone please explain for me why this form of control is advantageous over simply controlling the fan with a simple M106 Sxx command? I have the same fans as @appjaws1 and control them with a M106 ommand from S185 which just gets them moving, through to S255 where you could clear a garden full of leaves with them winking smiley I'm sure I must be missing something important and am keen to further upgrade when it confers an advantage - thanks for any insight
Re: External fans
September 01, 2014 07:24AM
Quote
MrCrispi
Can someone please explain for me why this form of control is advantageous over simply controlling the fan with a simple M106 Sxx command? I have the same fans as @appjaws1 and control them with a M106 ommand from S185 which just gets them moving, through to S255 where you could clear a garden full of leaves with them winking smiley I'm sure I must be missing something important and am keen to further upgrade when it confers an advantage - thanks for any insight

Well the good news is that since dc42 has corrected the frequency problem in the duet and released firmware update 078q-dc42, I can now control my fans with the complete range from 35 to255 using the normal fan output on the duet, previously I was getting the same range as you which is what started this whole control issue.

dc42 Thank you for your diagram. I have attached a diode to the yellow fan wire and am ready to connect to the duet but I am having trouble identifying PC4, the numbering is probably on the back of the duet so could you explain where PC4 is whilst looking at the front of the duet board please.


Thank you for all who have helped with this fan control problem.

Paul


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Re: External fans
September 01, 2014 07:29AM
With the Duet mounted the usual way up so that the expansion connector is at the top, PC4 is the middle pin in the bottom row of the expansion connector (i.e. the 13th pin from either end).

Remember, you won't get usable RPM readings (other than at full speed) if you run the fan from the FAN0 output, only if you use the PWM input of a 4-wire fan to control the speed as zpl and I are doing.

Edited 1 time(s). Last edit at 09/01/2014 07:30AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: External fans
September 01, 2014 08:57AM
Thank David,

That is not where you have it connected is it? You and I are using that expansion connector to connect the to the duet expansion board. I have a ribbon cable from the expansion board extension connector which I use to connect the blue and white wires.
Would I be correct in thinking that the 13th pin would be the correct one to use on this connector?


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Re: External fans
September 01, 2014 10:01AM
I added a wire on the back of the Duet to an extra header pin that I already had on the bottom of the Duet board.

According to the DueX4 schematic, PC4 is pin 10 on the X4 expansion connector. So it's the 10th wire in your 25-way ribbon cable counting from the end where the first wire is +5V.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: External fans
September 01, 2014 02:25PM
If you are printing the extra fan parts you will need to ensure that for the 2 ormerod modified parts you need to copy the x-idler-bracket.stl and the z-bearing-clamp.stl files from stl/individual parts in the Ormerod directory ormerod stl parts to the directory that you are running the scad files from.
The scad file then will pick up the original part and apply the modification.


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Re: External fans
September 01, 2014 04:00PM
Hi @appjaws1 - your .scad file for the x-idler-bracket appears to actually trying to import "X Idler Hub Bracket.stl" which isn't a standard Ormerod part, and changing the name to "x-idler-bracket.stl" doesn't fix it in your .scad file - could you have a quick look at your file please?

Also when producing the arms - type 1 works absolutely fine, but types 2 & three produce the attached when I try it if amended as per your parameters - what am I doing wrong here?


Many thanks

Edited 1 time(s). Last edit at 09/01/2014 04:26PM by MrCrispi.
Attachments:
open | download - type2.jpg (16.3 KB)
open | download - type3.jpg (14.9 KB)
Re: External fans
September 01, 2014 04:37PM
Quote
MrCrispi
Hi @appjaws1 - your .scad file for the x-idler-bracket appears to actually trying to import "X Idler Hub Bracket.stl" which isn't a standard Ormerod part, and changing the name to "x-idler-bracket.stl" doesn't fix it in your .scad file - could you have a quick look at your file please?

Also when producing the arms - type 1 works absolutely fine, but types 2 & three produce the attached when I try it if amended as per your parameters - what am I doing wrong here?


Many thanks

I think you are using an old file of mine that I posted along time ago.

I am attaching 2 stl files for the x-idler-bracket and the z-bearing-clamp.

Looking at your photos it appears that you have not put the correct arm length in the scad file, details for each setting are at the top of the scad file.

Hope that helps and that you will soon have extra fans working.
Paul


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Attachments:
open | download - x-idler-bracket.stl (91.5 KB)
open | download - z-bearing-clamp.stl (82.3 KB)
Re: External fans
September 01, 2014 06:58PM
Ok - I've found the files I should have been using smileys with beer in another thread - in case anybody else struggles, I've attached them both and have confirmed they work correctly with Paul's files in the post above. I also found out what I was doing wrong with the .scad parameters - I had changed the U0 & length parameters correctly, but hadn't also changed the type parameter...all good now smiling smiley

Edited 2 time(s). Last edit at 09/02/2014 05:29PM by MrCrispi.
Attachments:
open | download - appjaws-Z-bearing-flange-rear-fan.scad (677 bytes)
open | download - appjaws-X-idler-flange-front-fan.scad (716 bytes)
Re: External fans
September 02, 2014 04:59PM
I took a slightly different approach to the cooling, with two fans riding with the hotend, and this fan duct:

[www.thingiverse.com]



It's a modified version of dc42's one-piece fanduct, where I just cut a hole in the side to let the air off the hotend heatsink out (and a small flap to keep it from blowing down on the print). I also blocked the ports to the "exhaust nozzles" in the bottom, and instead cut a hole into them from the back of the fan duct. To that hole, I glued a radial blower, which is then responsible for cooling the print. The fan I have for cooling the hotend is rather slow and silent, but cools the hotend well enough. It also means that when the "print cooling" fan is off or at low speed, the printer is pretty silent. At full speed it raises quite a storm, much more than I ever got with the stock cooling solution. It does add some mass far out on the X carriage, but the fan itself is very lightweight.

I just ran a separate cable (a RC servo extension lead) down to the FAN0 header on the Duet, but it would be sufficient with just one more wire in the wiring loom as you can get the +12V from the hotend heater or the other fan.

Edited 1 time(s). Last edit at 09/02/2014 05:02PM by jstck.
Attachments:
open | download - fanduct_2fan_II.stl (355.3 KB)
Re: External fans
September 02, 2014 05:08PM
Also noticed something odd in the fan behaviour when printing with this. I have Slic3r set to do "auto-cooling", and it will speed up the fans whenever doing bridging or short layers (time-wise). However, it seems to be speeding up the fan a little while (10-15 seconds) before getting to that layer, and also slowing it back down before the layer is finished. As far as I can tell from the gcode, the M106 commands to control the fan are in "the right place".
My guess is that the M106 command is executed right away, while the G1 commands are queued up / buffered, so the M106 is then done "too early" relative to the moves. Can this be the case?
Re: External fans
September 02, 2014 06:10PM
Quote
jstck
My guess is that the M106 command is executed right away, while the G1 commands are queued up / buffered, so the M106 is then done "too early" relative to the moves. Can this be the case?

Yes, that's correct. At the moment G0/G1 moves are fed right into the look-ahead queue and not waited for unless they're intended for homing, so other commands can be executed earlier than expected. I set the fan speed to 100% in my end G-code and the fan actually starts blowing just before my prints finish. This hasn't really bothered me yet, but it may be worth to have another look at sometime soon.
Re: External fans
September 02, 2014 06:26PM
It doesn't bother me that it "starts early", but I did print something where it did a lot of bridging (In just one particular layer), and when the fan slowed down for the last few millimeters of it that bit got visibly more "saggy".

Simple workaround is to just not use the autocooling and run fan at high speed for models that have bridges in them.
Sorry, only registered users may post in this forum.

Click here to login