Skip to main content
/

Site Navigation

Your Account

Choose Language

Help

Revision to CAN connection

David Crocker

== Wiring scheme ==
-The CAN-FD bus is a two-wire bus with 120 ohm nominal impedance. Unshielded twisted pair cable is normally used; however over the short cable lengths typical of desktop 3D printers and CNC machines, the cable type is not critical. The bus should be terminated by 120 ohm resistors at each end.
+The CAN-FD bus is a two-wire bus with 120 ohm nominal impedance. The bus should be terminated by 120 ohm resistors at each end.
The Duet 3 MB6HC main board has a RJ11 CAN connector and permanent termination resistor, so it must be at one end of the CAN bus. Most Duet 3 expansion boards have two RJ11 connectors and two jumpers which can be fitted to provide termination. If the board is used at the other end of the CAN bus, only one of the RJ11 connectors will be used and the termination jumpers should be fitted. if the board is used at an intermediate position then both RJ11 connectors will be used and the termination jumpers should '''not''' be fitted. Although the two RJ11 connectors are labelled CAN_IN and CAN_OUT, they are connected in parallel and it doesn't matter if the cables to them are swapped.
The Duet 3 Tool Board is an exception, because it is too small to accommodate RJ11 connectors. Instead it has a single 4-pin JST ZH connector which is intended to be used for CAN_IN and CAN_OUT functionality. The Tool Distribution Board provides four similar JST ZH connectors. Preferably, connect each Tool Board to the Tool Distribution Board using two twisted pair cables, and remove the two jumpers on the Tool Distribution Board that are provided to bypass that connector. However, unless the cables are very long, you may get away with using a single twisted pair between the Tool Board and the Tool Distribution Board and leaving the jumpers in place.
-If a Tool Distribution Board s that the end of the CAN bus, then leave the CAN_OUT RJ11 connector not connected, and fit the termination jumper.
+If a Tool Distribution Board is at the end of the CAN bus, then leave the CAN_OUT RJ11 connector not connected, and fit the termination jumper. On the Tool Distribution Board, CAN_IN and CAN_OUT are '''not '''interchangeable.
-== Cables ==
+The Duet 3 Mini has a 2-pin Molex connector instead of the RJ11 connector, and built-in termination.
-To be completed.
+The polarity of the connections between boards matters. In all cases, connect CAN_H on one board to CAN_H on the next board, and similarly connect CAN_L to CAN_L.
+
+=== Cables ===
+
+Unshielded twisted pair cable is normally used; however over the short cable lengths typical of desktop 3D printers and CNC machines, the cable type is not critical. On very large printers, twisted pair cable must be used.
+
+[image|2970|align=right]
+
+Twisted pair cables terminated in RJ11 connectors are sold in some countries as "High Speed ADSL cables". One supplier of such cables is [https://www.kenable.co.uk/en/search?controller=search&search_query=high+speed+adsl|Kenable].
+
+You can also make up your own cables. Kits of RJ11 (usually 6P4W) connectors and the corresponding assembly tool are readily available. For the cable, you can buy a length of twisted pair ribbon cable and separate it into individual pairs; or for short distances, use telephone cable. This image shows a cable made to connect a Duet 3 Mini to a Tool Distribution Board.
== CAN addresses ==
-To be completed.
+In Duet 3 systems, each board has a CAN address, which is a number in the range 0 to 126. Each board must have a unique CAN address. The address of the main board is always 0. You can choose the addresses of the expansion and tool boards as you wish, however we suggest the following:
+
+- Use addresses 1 to 15 for EXP3HC expansion boards
+
+- Use addresses 20 to 39 for tool boards
+
+- Use addresses 40 to 59 for external driver boards
+
+Some boards have default addresses in the range 120 to 126. Therefore we advise against using addresses in this range. However, if you have just one board of a particular type (e.g. just one tool board) then you may leave it at the default address if you wish.
+
+The Tool Distribution Board is purely passive and does not have a CAN address.
+
+=== Setting CAN addresses ===
+
+==== EXP3HC ====
+
+The EXP3HC expansion board has a 4-bank DIP switch to set the address. The CAN address is set by the switches as follows:
+
+{table
+|! 1
+|! 2
+|! 3
+|! 4
+|! Address
+|--
+| off
+| off
+| off
+| off
+| 126 (board requests firmware on startup)
+|--
+| on
+| off
+| off
+| off
+| 1
+|--
+| off
+| on
+| off
+| off
+| 2
+|--
+| on
+| on
+| off
+| off
+| 3
+|--
+| off
+| off
+| on
+| off
+| 4
+|--
+| on
+| off
+| on
+| off
+| 5
+|--
+| off
+| on
+| on
+| off
+| 6
+|--
+| on
+| on
+| on
+| off
+| 7
+|--
+| off
+| off
+| off
+| on
+| 8
+|--
+| on
+| off
+| off
+| on
+| 9
+|--
+| off
+| on
+| off
+| on
+| 10
+|--
+| on
+| on
+| off
+| on
+| 11
+|--
+| off
+| off
+| on
+| on
+| 12
+|--
+| on
+| off
+| on
+| on
+| 13
+|--
+| off
+| on
+| on
+| on
+| 14
+|--
+| on
+| on
+| on
+| on
+| 15
+}
+
+==== TOOL1LC, EXP1XD, EXP1HCE ====
+
+These boards all have a default address as shipped, and revert to that address when the factory reset procedure is used. The default addresses are:
+
+{table
+|! Board
+|! Default address
+|--
+| TOOL1LC
+| 121
+|--
+| EXP1XD
+| 122
+|--
+| EXP1HCE
+| 123
+}
+
+If you have just one of these boards (or at most one of each type) in your system, you can leave the address set to the default. Otherwise you should change the addresses of every board. To do this:
+
+* Connect just one of the board to the CAN bus (or you can leave the other boards connected to CAN but disconnect the power to them)
+* Power up the system
+* Verify that you can communicate with the board at its default address. For example, to verify a tool board you could send M115 B121 or alternatively M122 B121
+* Use the [[Gcode#Section_M952_Set_CAN_FD_expansion_board_address_and_or_normal_data_rate|M952 command]] to change the board address to the required one. For example, to change the address of a tool board to 20, use:
+
+M952 B121 A20
+
+* Power down the system and connect the next board to be configured
+* Power up the system and use M952 agani to set the address of the new board, choosing a different new address this time
+* Repeat until you have configured all the boards
+
+If you need to factory reset a board:
+
+* On those boards having two buttons, power the system up while holding both buttons down
+* On those boards having a reset jumper, fit the jumper and then power up the board
+
+The board will reset its address to default and request firmware from the main board.

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

Revert Changes