Duet Electronic Controller
Documentation © Think3DPrint3D Ltd 2016
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
5.1 Networking the Duet controller
The Duet has an ethernet port and runs its own web-server, provided on the SD card. It can therefore be controlled from a web-browser on a wired or wireless device on a network, as well as directly over USB by conventional printer communication programs like Pronterface and Repetier. The Duet Web Control (DWC) interface is the recommended control method as it gives access to the advanced features and settings of RepRap Firmware which are not available using conventional printer communication programs. More information on the DWC interface is given in the RepRap wiki http://reprap.org/wiki/Duet_Web_Control
Various options for connecting the printer to a network are summarised below. In addition RepRapPro have published very detailed instructions for connecting to a Duet using the web interface and you should refer to these if you are not sure how to proceed. The following is a brief summary.
5.2: Connect using DHCP
If the PC you intend to use for printer control is on a network then the simplest way to connect to your printer may be to use DHCP and NetBIOS, by editing your config.g as follows. First give your printer a name:-
M550 PMiniKossel1 ; Machine name and Netbios name (can be anything you like)
The P in front of the name is essential, to identify this as a command. Then activate DHCP, using semi-colons to comment out unwanted lines, and removing the semi-colons to uncomment lines and make them active:-
M552 P0.0.0.0 ; Un-comment for DHCP
; M552 P192.168.1.14 ; IP address, comment for DHCP
; M554 P192.168.1.1 ; Gateway, comment for DHCP
; M553 P255.255.255.0 ; Netmask, comment for DHCP
NOTE: DHCP is supported in firmware v1.09 or later. If the Duet is getting its IP address from the router, via DHCP (ip address in config.g is set by ‘M552 P0.0.0.0′ to enable this), and you can’t connect using the name of the printer (set in config.g by ‘M550 P[name]’), either your router does not support DHCP/NETBIOS naming, or your computer may be using an external DNS server, rather than using the router DNS, which would mean it can’t connect to a local IP address. Setting a static IP address as below should allow you to connect.
5.3 Setting a Static IP Address
If your network/router doesn’t support DHCP and NETBIOS naming, you need to set up your Duet to have a static IP address by setting the IP address, netmask, and gateway IP address in config.g. The defaults settings in sys/config.g on the SD card are:
IP address: 192.168.1.14
5.4 Separate Network option
The RepRapPro documentation linked above covers a variety of other networking options including setting up a separate network for your printer. This is a useful option if you don’t have any other network access. It requires a PC with dual internet connections - typically a laptop with wifi and an Ethernet socket. (If you don’t have a suitable PC with a spare ethernet port and also don’t have or are not allowed to use a network, then you will have to use Pronterface or Repetier over USB to connect to your printer.
Assuming you are able to use the ethernet socket on your PC, you will need an ethernet cable to connect it directly to the ethernet port on the Duet. You will then need to set up a separate network between your PC and the Duet. This is done by configuring your PC’s ethernet port so it uses different settings from the rest of the network (if any), and changing the Duet’s config.g to set its IP address and match the netmask to your PC.
NOTE: Most PCs now support autoconfiguration of ethernet connections and so do not require a cross-over cable between the PC and Duet ethernet ports - an ordinary patch cable should do.
Your PC will typically be connected to your wifi network and allocated an IP address by DHCP. You will need to obtain the IP address, netmask and gateway address it uses, and change them for your previously unused ethernet connection as below. If you don’t know how to do this see Section 5.3 above.
Typical wifi network addresses could be:-
ip address: 192.168.1.10
You should now set up a separate network (subnet) on your ethernet port (not the wifi port), by editing the TCP/IP settings to, for example:
ip address: 192.168.2.10
Changing the third number in the ip address (from 1 to 2) creates a separate new network so that data sent to 192.168.2.[number between 0 and 255] will go to the ethernet port, rather than be routed to wifi.
Then set the Duet to be on the same subnet, by changing the config.g to:
M552 P192.168.2.14 ; Set the IP address
M553 P255.255.255.0 ; Set netmask (Subnet Mask)
(gateway doesn’t matter)
5.5 Connect to the Duet
Connect the USB cable from your PC to the USB port on the Duet to power it up on 5V only. Do not power on the main 12-24V power supply yet. Connect an RJ45 ethernet patch cable between the Duet and your point of network connection, either your router or your PC’s ethernet port, and open a browser window.
If you are using a router and DHCP, enter the name of your machine (lowercase and with no spaces). For example, if you have set the following in config.g:
enter this into your browser’s address bar:
If you are using a static IP address on a network, enter this instead. For example if you set the following in config.g:
then in the browser address bar enter
If you are using a separate network with a direct ethernet connection to your PC, then enter the IP address you chose for the Duet, for example (Section 5.4)
In all cases you should see the Machine Control page of the web interface as below (you may have to click “Connect” in the top left-hand corner of the page):-
5.6 Commission the Duet and explore the web interface
The process of commissioning the Duet and familiarising yourself with the web interface will partly depend on whether the Duet is installed in a newly built and untested printer (the riskiest case), as an upgrade to a previously tested and working printer (less risky) or on the bench with motors, heaters, etc attached to create a test environment (the safest setup).
A reasonably safe sequence of testing steps is suggested below:-
1 Test endstops
Use G-code M119 to confirm endstops are working correctly.
2 Check thermistors and correct ambient temperature measurements (optional)
See “Checking the thermistors” in https://miscsolutions.wordpress.com/2015/01/05/upgrading-the-mini-kossel-to-duet-electronics-part-2-software-and-commissioning/
3 Connect power supply to printer and test heaters
Use the web interface controls to turn on heaters and monitor activity on the graphical display.
4 Check motor direction and homing
Use the web interface controls to move motors, check homing is in the correct direction and stops when endstops are triggered.
5 Test IR Z-probe
6 Calibrate printer
Refer to your printer supplier’s detailed instructions.
Precise details of how to carry out these steps will depend on your printer type and setup.
For a detailed sample set of instructions relating specifically to the Think3dPrint3D Mini Kossel Release 3 printer kit, see Section 1604 of Chapter 16 of the documentation (also accessible from the Documentation tab on the website listing.