Skip to main content
WARNING! From February 2022, these pages are no longer maintained.
Please see the current Duet3D documentation at https://docs.duet3d.com/
Help

Revision to Using servos and controlling unused IO pins

Tony

+[summary_image|1039]
+
[title|Using servos and controlling unused IO pins]
[toc]
-[summary]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.[/summary]
+[summary]RepRapFirmware allows you to connect other devices to outputs that are not required for their primary purpose. The Duex 2 and Duex 5 expansion boards for the Duet 2 WiFi and Ethernet also provide additional outputs.[/summary]
== Important note on connecting servos ==
-When a servo stops moving, it can pump a large amount of energy into the +5v rail due to regenerative braking. If unchecked, this may increase the voltage of the +5V rail above the safe limit. The 1.04 revision of the Duet WiFi/Ethernet has an extra 220uF capacitor on the 5v rail to help absorb this, so does the Duet Maestro. Older Duets don't. So when using servos with them it is advisable to add your own 220uF capacitor between the +5V and ground servo wires.
+When a servo stops moving, it can pump a large amount of energy into the +5v rail due to regenerative braking. If unchecked, this may increase the voltage of the +5V rail above the safe limit. The 1.04 revision of the Duet 2 WiFi/Ethernet has an extra 220uF capacitor on the 5v rail to help absorb this, so does the Duet 2 Maestro. Older Duets don't. So when using servos with them it is advisable to add your own 220uF capacitor between the +5V and ground servo wires.
== Logical pin numbers ==
| yes
| yes
-| Disable 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 from version 0.8a onwards, heater channels 3-7 are available on PWM1 - PWM5, prior to that heater channels 3-5 only are available on PWM1 - PWM3 . Caution: the heater output terminals will also be driven by the PWM signal or servo pulses.
+| Disable 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 Duex 5 expansion board, heater channels 3-7 are available as 5V active-high signals on the PWM1 - PWM5 connectors respectively. On the DueX2 from version 0.8a onwards, heater channels 3-7 are available on PWM1 - PWM5, prior to that heater channels 3-5 only are available on PWM1 - PWM3 . Caution: the heater output terminals will also be driven by the PWM signal or servo pulses.
|--
| 20-27
| yes
| 20-22 only
-| Disable 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.
+| Disable the fan using M106 P# I-1 to make the pin available, where # is the fan number. Fans 3-7 are on the Duex 5 and Duex 2 expansion boards.
|--
| 40-49
| no
| no
-| 40-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.
+| 40-44 are input-only. On the Duet 2 WiFi and Duet 2 Ethernet, if a Duex 2 or Duex 5 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-
== Board dependencies ==
-=== Duet WiFi and Duet Ethernet ===
+=== Duet 2 WiFi and Duet 2 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:
+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 PT100 daughter boards on a Duex 2 or Duex 5 instead. Because most users don't need more than the four thermocouple and PT100 channels supported on the Duet 2, we make CS5-8 available as general purpose I/O if you do not have any daughter boards fitted to the Duex 2 or 5. Here is the mapping between pin numbers, signal names, and the labels on the expansion connector:
{table
| yes
| no
-| These are on the DueX2 and DueX5 expansion boards
+| These are on the Duex 2 and Duex 5 expansion boards
|--
| 120-135
| PC4
}
+
+''Image from [https://upload.wikimedia.org/wikipedia/en/2/2a/Hobby_servo_motors.jpg|wikipedia]''

To undo the changes made by this version, click 'Revert Changes.' This will automatically restore the previous version of this guide.

Revert Changes