This guide describes how to setup a Single Board Computer (SBC) with Duet 3. It assumes you are using Raspian (the operating system that runs on the Raspberry Pi) and are using the SD card image specifically setup for Duet 3. In the future other SBCs may be officially supported. Most of the time you can start at Step 2 as you will receive a SD card pre-flashed with the image of Raspian, however If your SD card supplied with the Duet 3 mainboard becomes damaged or lost, start at step 1.
You will need at least an 8Gb class 10 SD card.
If you are planning to use the SBC for more than plain 3D printing or if you have an SBC with little RAM + external display, it is HIGHLY recommended to obtain a class A1- or A2-rated microSD card instead of the shipped SD card. If your SD card speed is insufficient, you may experience occasional problems when data between the SBC and Duet is exchanged.
There are multiple programs to write an image file to an SD card. If there are any issues with this step, try following the Raspberry Pi documentation for flashing OS images
You need to use the latest Raspian image setup for Duet 3 that is available from the Duet 3D software site. You may choose the lite image for a GUI-less setup and the full variant for setups where a display is attached:
https://pkg.duet3d.com/DuetPi-lite.zip
https://pkg.duet3d.com/DuetPi.zip
Under Windows, MacOS and Linux, flash the file using using balenaEtcher
Select the image, select the SD card. Click flash. Will take about 5 minutes.
Once this is complete Windows may prompt you to format the disk. Do not do this, it is because Windows does not recognise one of the partitions on the image.
This step is optional if you are going to connect to the SBC using an Ethernet network, or if you are going to plug a monitor, keyboard and mouse into the SBC.
Navigate to the “boot” partition on the SD card (note on Windows the other partition will be inaccessible and give an error if you try and access it, this is normal as it is formatted in a filesystem that Windows does not support).
Create a new file named “wpa_supplicant.conf” (exact naming is critical, do not have a ".txt" at the end of the file).
In a text editor add the following:
country=GB
update_config=1
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="SSID_OF_NETWORK"
psk="PASSWORD_OF_NETWORK" |
Replacing the SSID_OF_NETWORK with your wifi SSID and PASSWORD_OF_NETWORK with your password.
Save and safely eject the SD card.
Put the SD card in the SBC, connect the ribbon cable to the Duet 3, connect a USB cable to the Duet 3 for power and connect a . Ensure there is NO SD card in the Duet itself.
Note the orientation of the red stripe on the ribbon cable indicating pin 1.
It is acceptable, especially with longer ribbon cables than shown here, to route the cable around the back of the SBC, however pin 1 must connect as shown.
Ensure the USB supply is sufficient to power the peripherals attached to the Pi, especially screens that do not have a separate power supply. See here for more details on 5v power jumper position selection.
Using a Pi4 may require a separate power supply for both the Duet and Pi4 due to power draw. The same holds true if using peripherals that draw power via USB.
Put the SD card in the SBC, connect the ribbon cable to the Duet 3. Note the orientation of the red stripe on the ribbon cable indicating pin 1.
The Duet 3 Mini+ cannot power the Pi. You must power the Pi separately. The Raspberry Pi is sensitive to the input voltage, and many smartphone chargers or other USB power supplies cannot supply sufficient voltage. Therefore, we strongly recommend that you use the official Raspberry Pi PSU, or another PSU specifically designed to power a Raspberry Pi. If the red LED on the Pi is not continuously illuminated, the power supply is insufficient.
Connect a USB cable to the Duet 3 for power. Ensure there is NO SD card in the Duet itself.
Turn on power to Duet and SBC.
If you have a screen attached when power is applied you will see the SBC boot up. Once bootup is complete the Chromiun browser will launch DuetWebControl in full screen. press F11 if you want to exit fullscreen.
If you are connecting over the network then go to http://duet3.local/
note the SBC takes about 1 minute to boot for the first time and about 30 seconds subsequently.
If http://duet3.local/
does not show Duet Web Control (DWC) then follow these trouble shooting steps:
Note that these steps assume the hostname of your SBC is "duet3" if you have changed it then the mDNS resolution will be the new hostname, not "duet3". Also note that you cannot use the gcode command M550 to set your printer hostname.
If you get a "HTTP ERROR 500 - This page is not working" response
either when going to http://duet3.local/
or to the IP address, then the SBC is on the network, but Duet Software Framework (the Duet3 software that runs on the SBC) is not operating correctly.
Ensure there is no SD card in the Duet itself. In order to run in SBC connected mode, the Duet SD card slot must be empty. If an SD card is present in the Duet, it will attempt to start in standalone mode.
Note this is optional if you have a screen and keyboard attached to the SBC
In the future it is the intention that all the required interaction between a user and the Duet 3, including the SBC, can be done through Duet Web Control. At this point in time it is necessary to have either a ssh command line, or VNC connection, in order to update the Duet Software Framework software that runs on the SBC.
DuetPi lite (no GUI) has SSH enabled by default and wpa_supplicant.conf is present on the boot partition, because usually you don't have a display attached to those setups.
DuetPi (with GUI) does not have SSH enabled by default, but you can enable it by putting an empty "ssh" file on the boot partition.
Under Windows the easiest way is via “Putty”:
Download & Install Putty.
Enter duet3.local or your SBC IP address and select ssh.
Agree to the security alert - its Putty Saying it has never connected to this SSH server before.
Login with username “pi” and password “raspberry”
Under macOS and Linux the "ssh" program is accessible from the command line. macOS guide here.
ssh pi@duet3.local
For all systems, once connected, you will be presented with a command line:
pi@duet3:~ $
To update the Duet Software Framework and other system components type:
sudo apt update
(the sudo password is raspberry)
Then
sudo apt upgrade
If you prefer a desktop environment to a command line then you can use the realVNC client to connect.
First follow the steps above in "Connecting via SSH" until you are at a command line on the pi.
type
sudo raspi-config
Navigate to Interfacing Options.
Install the realVNC client on the machine you want to use to connect. You can use the free version non commercially.
Once installed open the realVNC client, go to "file" -> "new connection" and use duet3.local or the IP address of your SBC to connect. the username and password are the same as for ssh.
Once your Raspberry Pi has established an internet connection, it is recommended to install the latest updates. To do so, connect via SSH or VNC (see above) to your Raspberry Pi or open a terminal (if you have keyboard and monitor connected) and run:
sudo apt-get update
sudo apt-get upgrade
This will install the latest software components and the latest RepRapFirmware version on your Duet 3. You can do this regularly to update the system as new firmware is released.
To switch between stable/release package feed and unstable/beta package feed, see DSF installation.
By this step you should have Duet Web Control showing when you go to http://duet3.local/
or the IP address of your SBC.
The default SD card image does not come with the system files configured for your printer - there are many different types of machines that are supported so you need to generate a config.g, homing files, and other system macro files that are required.
The online RepRapFirmware configuration tool has been updated to support the generation of config files for RRF3. Though you may still need to manually implement some of the more advanced features.
The changes required to create a set of Duet 3 config files is outside the scope of this guide. Please see the Migrating from RRF2 to RRF3 guide for a list of the gcodes that need changing to get a config.g setup for duet 3.
Once you have a set of system files they can be uploaded via the "system" tab in DWC.
This is an optional step if you only have a single duet3 on your network. It is required if you have more than one duet 3 as each duet 3 on a network needs a unique host name.
The name of the printer is its hostname on the network, you will need to connect to the SBC over SSH or VNC (as described above) in order to run the Raspberry Pi configuration utility and change the hostname. In future there will be an easier way to set the hostname within DuetWebControl. Note that you cannot currently use the gcode command M550 to set your printer hostname
sudo raspi-config
When you next boot with a screen, or log in with VNC, Chromium may give you the following warning. Select “unlock Profile and Relaunch”.