Site Navigation

Your Account

Choose Language

Using servos and controlling unused IO pins

RepRapFirmware allows you to connect other devices to outputs that are not required for their primary purpose. The DueX2 and DueX5 expansion boards for the Duet WiFi and Duet Ethernet also provide additional outputs.

Starting with firmware version 1.16, pin numbers in the M42 command are logical pin numbers as listed below, not Arduino-like pin numbers. The M280 servo control command uses a subset of the same pin numbers.

To see where these pins are on the 2nd Generation Duets, see the Duet wiring diagrams

Logical pin numbers ¶ 

Note that these logical pin numbers are not the physical pin numbers on the expansion header, or the internal pin numbering within the firmware.

Pin numbersUsual functionPWM capable?Usable for servos?Notes
0-7Heaters 0-7yesyesDisable the heater using M307 H# A-1 C-1 D-1 to make the pin available, where # is the heater number, and make sure that no tool is configured to use that heater. The outputs on the expansion connector are active low with 3.3V signal level. On the DueX5 expansion board, heater channels 3-7 are available as 5V active-high signals on the PWM1 - PWM5 connectors respectively. On the DueX2, heater channels 3-5 are available on PWM1 - PWM3. Caution: the heater output terminals will also be driven by the PWM signal or servo pulses.
20-27Fans 0-7yes20-22 onlyDisable the fan using M106 P# I-1 to make the pin available, where # is the fan number. Fans 3-7 are on the DueX5 and DueX2 expansion boards.
40-49Endstop connectors 0-9nono40-44 are input-only. On the Duet WiFi and Duet Ethernet, if a DueX2 or DueX5 expansion board is connected then 45-49 are the endstop connectors on the expansion board and are input-only; else they are additional endstop connections in the expansion connector. On the Duet 0.6 and 0.8.5, 45-48 are the endstop inputs on the expansion connector.
60-Miscellaneous pinsvariesvariesThe pins available depend on which Duet you have - see below
100-Pins on expansion devicesvariesvariesThe pins available depend on which Duet you have - see below

Board dependencies ¶ 

Duet WiFi and Duet Ethernet ¶ 

The miscellaneous pin numbers 60-63 correspond to the CS5-CS8 pins on the expansion connector. These were originally allocated for use as the E2-E6 endstop pins and are labelled as such on the expansion connector, but they are now used to address thermocouple and RTD daughter boards on a DueX2 or DueX5 instead. Because most users don't need more than the four thermocouple and RTD channels supported on the Duet WiFi, we make CS5-8 available as general purpose I/O if you do not have any daughter boards fitted to the DueX2/X5. Here is the mapping between pin numbers, signal names, and the labels on the expansion connector:

Logical pinSignal nameExpansion connector labelExpansion connector pin numberPWM capable?Servo capable?Notes
60CS5CS550nono
61CS6E3_STOP9nono
62CS7E4_STOP14nono
63CS8E5_STOP19nono
64ENC_SWENC_SW on CONN_SD connector7 on CONN_SD connectornono
65Z_PROBE_MODMOD on Z-probe connector3 on Z-probe connectornono
100-103GPIO pins 1-4yesnoThese are on the DueX2 and DueX5 expansion boards
120-135SX1509B expansion I/O pinsyesnoThese are on an SX1509B-based expander board at I2C address 0x71 connected to a Duet 2 Wifi/Ethernet

Logical pins 64 and 65 are supported in firmware 2.01 and later only. Note that the Z_PROB_MOD pin is driven automatically when some Z probe modes are selected.

Duet 2 Maestro ¶ 

Logical pinSignal nameExpansion connector labelExpansion connector pin numberPWM capable?Servo capable?Notes
60PA21/RXD1/AD8nono
61PA22/TXD1/AD9nono
62PA3/TWDnono
63PA4/TWCnono
64Z_PROBE_MODMOD on Z_PROBE connector? on Z_PROBE connectoryesyes

Duet 0.6 and 0.8.5 ¶ 

The mapping between logical pin numbers for miscellaneous pins and the corresponding signal names on the expansion connector is as follows.

Logical pin numberExpansion connector signal name
60PA10/RXD0
61PA11/TXD0
62PA12/RXD1
63PA13/TXD1
64PA14/RTS1
65PB12/TWD1
66PB13/TWCK1
67PB16/DAC1 (also used as CS signal on external SD card socket)
68PB21/AD14
69PC4

0 Comments

Add Comment

View Statistics:

Past 24 Hours: 13

Past 7 Days: 80

Past 30 Days: 311

All Time: 1,806