Connecting and configuring fans (2024)

This document is relevant to: all Duet boards
Firmware versions: all firmware versions

Duet mainboards support a variety of fans; depending on the Duet board, two-, three- and four-wire PWM-capable fans, running at voltages of 5V, 12V, VIN or an externally-supplied voltage. Fans can be always-on, thermostatically-controlled, and/or G-code controlled.

Supported fans

The rotation speed of most commonly-available fans is usually voltage-controlled, i.e. lowering the voltage reduces fan speed. However, Duet boards use Pulse Width Modulation (PWM) to control the speed; this effectively means the fan is getting the full voltage, but this is being turned on and off very quickly. The speed of most fans can be controlled this way, but some fans only support voltage control not PWM, and will only work at 100%. The fan speed may not always scale smoothly with PWM. Ideally, choose fans that support PWM speed control.

Duet boards and fan outputs

Duet boardNumber of fan headersTotal maximum current limitSupported voltages
Always-on2-pin3-pin4-pin
Duet 3 Mainboard 6HC13-3800ma @ 12V, 10A @ VIN (fuse)12V / VIN / external power, in 2 banks
Duet 3 Mini 5+-2-2800ma @ 12V, 7.5A @ VIN (fuse)12V / VIN / external power, in 2 banks
Duet 3 Expansion 3HC13-3800ma @ 12V, 7.5A @ VIN (fuse)12V / VIN / external power, in 2 banks
Duet 3 Toolboard 1LC--11(v1.0 board) 800ma @ 12V12V
(v1.1 board) 800ma @ 12V, 2A @ VIN12V / VIN
Duet 3 Expansion 1XD-2--4A @ VINVIN
Duet 2 WiFi and Ethernet23--2A @ 5V (total 5V/3.3V), 1A @ VIN (fuse)5V / VIN / external power
DueX2 and DueX516--2A @ 5V (total 5V/3.3V), 1A @ VIN (fuse)5V / 12V / VIN / 5V external power
Duet 2 Maestro13--2A @ 5V (total 5V/3.3V)5V / VIN / external power, in 2 banks

Note: fans can also be connected to spare heater outputs. These run on VIN voltage, and usually have enough current capacity for even the biggest fans.

Duet 2 WiFi/Ethernet and Maestro can support 3- and 4-wire fans, see below for details on how to connect them.

Board-specific notes on voltage selection

General recommendations

  • Our intention is that in a 3D printer with a single print head, you define/use Fan0 for the print cooling fan and Fan1 for the heatsink fan. This is the easiest configuration to use because it's what most G-code slicing software (and the firmware, in RRF 2.x and earlier) expects by default.
  • If you have a multi-tool setup, you can define the print cooling fan of each tool as part of the tool. This gets around the issue of Slicer software not supporting multiple part cooling fans. See "Allocating fans to tools" section below.
  • Mixed-voltage setups are not directly supported, but the Duet switches the fans' connections to ground, so you may be able to connect each fan's positive side to the appropriate voltage and its negative side to the appropriate pin on the Duet.
  • Each controlled fan can be configured in firmware as a gcode controlled fan or as a thermostatically-controlled fan.
  • See table above for our recommendations on continuous current draw. However, a current 'blip' that goes over this limit for a few seconds while the fan starts up should not harm them.

CAUTION!
Fans are polarised. When connecting a fan to a fan connector, the fan's positive wire (usually red) must be connected to the positive pin of that connector, usually marked V_OUT+ or V_FAN+. The fan's negative wire (normally black) must be connected to the negative pin if it is a PWM controlled fan connector, usually marked out[n]- or FAN[N]-, or the GND pin if it is an always-on fan connector.
If you connect the fan the wrong way round, you may damage the fan, the Duet, or both.

Fan wire colours

2-wire fans usually have black and red wires. 3- and 4- wire fans usually come with pre-crimped housings, and the wire order is standard. The colour of the wires may not be, though. Below is the most common wire colours.

2-wire fan3-wire fan4-wire fan
-negative (GND)BlackBlackBlackBlackBlack
+positive (+V)RedRedYellowRedYellow
TachometerYellowGreenYellowGreen
PWMBlueBlue

Fans can also come with wires all the same colour, eg all black or grey, unhelpfully. You will need to identify which wires are which to ensure you connect them correctly.

Connecting fans to Duet fan pins

Duet 2: Using 12V fans when VIN is 24V

If you need to use 12V fans but your VIN is 24V and all your fans are 12V, then on the Duet 2 Wifi / Ethernet you have the following options using a buck-down converter:

  1. Note that the Duet 3 has an internal 12v regulator so no buck converter is needed.
  2. Wire the buck regulator input directly to the VIN terminals, and the output to the centre pin of V_FAN1
  3. Wire the buck regulator positive input to the VIN end of V_FAN, the output to the centre pin of V_FAN, and ground to any power ground connection (possibly the ground side of an always-on fan output)2
  4. Put a jumper on V_FAN at the VIN end. Wire the buck regulator input to an always-on fan output. Wire the positive wires of 12V fans directly to the buck regulator output, and the negative wires to the FAN- pins of the controlled fan outputs as usual3
  5. Here is an example wiring diagram for connecting the buck converter.
    Connecting and configuring fans (1)

Notes

1 all the fans must be 12V and there is no fuse protection

2 all the fans must be 12V and the input of the buck regulator is protected by the 1A fuse

3 the connection of a 12V fan is more complicated, but you can use 24V fans as well. The buck regulator input is fuse protected

Using fans with mixed voltages

When using mixed fan voltages, the voltage fed to the centre pin of the V_FAN jumper must be the highest fan voltage in use. You can use a lower voltage fan in the same system by connecting the positive fan wire to the lower voltage supply (e.g. +12V from a buck regulator) and the negative fan wire to the FAN- pin of your chosen fan connector (leave the VFAN pin of that connector not connected).

Always-on fans

Most Duet boards provide at least one connector for fans that should be on any time the power is on. Many setup guides suggest this is how you should wire your hot end fan (but see thermostatic fans, below) to prevent heat from creeping back and melting the filament, jamming the hot end. You may also wish to attach a fan to move air across the underside of the Duet board, keeping the stepper drivers cool. Simply plug any such fan into one of these sockets, connecting the red wire to V_FAN and the black wire to GND.

If you want to run your other fans on a Duet 2 from 5V but your always-on fans from 12/24V, you can wire them directly across the power supply pins and ignore the Duet's connectors.

Thermostatically controlled fans

As mentioned above, many hot ends require a fan to keep the heatsink cool, so that the filament remains solid until it passes through the heat break into the melt zone. This fan should be on any time the hot end is hot enough to melt plastic, but can safely be off when the hot end is cool even if the rest of the machine is on. Duet boards support this mode of operation. Plug your fan into one of the PWM fan pins, and configure it as a thermostatic fan for the appropriate heater by putting the appropriate M106 G-code in config.g. For example:

M106 P1 T45 H1

This sets fan 1 to run any time the temperature of heater 1 is above 45 Celsius. See M106 for details. We recommend you use the FAN1 connector for a thermostatically-controlled hot end fan, because on the Duet 2 WiFi / Ethernet in RRF 2.x it defaults to being on at power up , to provide maximum safety if you restart your Duet when the hot end is hot.

A thermostatically controlled hot end fan will be turned on automatically when you auto tune any heater that it monitors.

Note: thermostatic fans SHOULD NOT be mapped to tools.

G-code controlled fans

Printing PLA (and perhaps other plastics) benefits from additional cooling of printed layers, particularly when layers are printing quickly. That said, excessive cooling can cause problems with first layer adhesion or even interfere with a new layer's bonding to the previous one. Many slicer programs will introduce fan control G-codes to run the fan strongly for layers that print quickly, and only start running the fan after the first few layers. Attach/define such a fan to one of the connectors FAN0, FAN1, or FAN2. If your slicer doesn't support specifying which fan to control, it defaults to FAN0.

The gcode command to set the fan speed is M106 Pnn Svv where nn is the fan number (default 0 if the P parameter is not present) and vv is the required speed. The speed can be expressed either in the range 0 to 1, or in the range 0 to 255. A value of 1 or less will be assumed to be in the range 0 to 1. A value of 0 corresponds to off, and a value of 1 or 255 corresponds to full speed.

In RRF 2.x, on Duet 2 WiFi/Ethernet, FAN1 is set up as a thermostatically-controlled fan by default because it is typically used to control the hot end heatsink fan. To use it as a normal controlled fan, you must first cancel thermostatic mode by sending M106 P1 H-1.

Firmware settings

Most slicers do not support having multiple separate print cooling fans so they simply send M106 Snnn, rather than allowing the choice of which fan is allocated to which hotend.

To solve this, other fan channels can be mapped to fan 0 when a specific tool is selected for example:

M563 P0 D0 H1 F0 ; tool 0 uses extruder 0, heater 1 and fan 0M563 P1 D1 H2 F1 ; tool 1 uses extruder 1, heater 2 and fan 1M563 P2 D2 H3 F2 ; tool 2 uses extruder 2, heater 3 and fan 2

After this whenever tool 0 is selected, sending M106 Snnn will control fan 0. With tool 1, fan 1 and tool 2 fan 2.

Note: thermostatic fans SHOULD NOT be mapped to tools.

For more examples see the tool definition section of the config.g file.

Allocating multiple fans to a tool

You can bind more than one fan to a tool for part cooling. Then all fans will be controlled by M106 Snnn commands. Use M563

M563 P0 D0 H1 F0:2:3 ; tool 0 uses extruder 0, heater 1, and fan 0 mapped to fans 0, 2 and 3

Fans will still be independently controllable through DWC.

See Connecting servos and controlling IO pins.

Connecting and configuring fans (2024)
Top Articles
Latest Posts
Article information

Author: Velia Krajcik

Last Updated:

Views: 6318

Rating: 4.3 / 5 (54 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Velia Krajcik

Birthday: 1996-07-27

Address: 520 Balistreri Mount, South Armand, OR 60528

Phone: +466880739437

Job: Future Retail Associate

Hobby: Polo, Scouting, Worldbuilding, Cosplaying, Photography, Rowing, Nordic skating

Introduction: My name is Velia Krajcik, I am a handsome, clean, lucky, gleaming, magnificent, proud, glorious person who loves writing and wants to share my knowledge and understanding with you.