Posted on

Duet WiFi – Generating firmware using Configurator

Configuring our printer for use

  1. Intro to RepRapFirmware
  2. Setup preparations
  3. RepRapFirmware Configuration
    1. Start
    2. General
    3. Motors
      1. Axes setup
    4. Extruders
      1. Motor current
    5. Endstops
    6. Homing Preferences
      1. Z-probe
    7. Heaters
      1. Heaters setup
      2. Tools
    8. Compensation
    9. Network
    10. Cooling Fans
    11. Configuration Finished
    12. Upload Configurations
    13. Conclusion

Intro to RepRapFirmware

Now that we have connected to our Duet WiFi controller and updated all relevant firmware we are going to configure it to our needs. In this case as a classic 3D printer movement mechanisms as a Cartesian source  printer.

I am setting it up same as an Ultimaker 2 works, meaning XY axes are moving up top, and bed are going up and down. Z homes to MAX.

The Duet WiFi uses RepRapFirmware which is drastically different from the Marlin and Smoothieware setup I’m used to, as all setups are done using regular Gcodes and Gcodes specific for RepRapFirmware, which are put into files and in turn are executed (read into memory of the controller) on startup.

You can change any settings by issuing new Gcodes via a Gcode terminal either in the webpanel or by using Pronterface over USB or similar. Any Gcodes issued this way are not retained after a reboot (unless current running configuration is saved).

Duet WiFi terminal in webpanel

Any changes you want kept after reboot must be entered into a file. Either into the general config.g file or as macro files, if you use any such.

It’s a big change from the Marlin and Smoothieware, but luckily we can find a lot of information in the RepRap Firmware FAQ, which is quiet extensive.

Setup preparations

Before continuing we are going to clean up in our files, as some of them are really meant for Delta printers.

Files listed under System Editor tab with description.

  • bed.g is autoleveling for Delta printers – Removing this.
  • config.g our – This is our primary configuration file, where the core configs are stored.
  • deployprobe.g is for deploying a probe for Delta printers – Removing this.
  • DuetWebControl.bin – our Web Interface firmware file.
  • DuetWiFiServer.bin – our WiFi Server firmware file.
  • homedelta.g is a file for homing on a Delta printers – Removing this.
  • iap4e.bin – our Electronics firmware file.
  • pause.g is for pausing the printer.
  • rResume.g Resume file.
  • retractprobe.g is to retract a probe – Removing this.Deleting the following 4 files.

RepRapFirmware Configuration

We are going to use the RepRapFirmware Configuration Tool to do our initial setup and will refer to the Duet WiFi overview I made for my previous blog-post: Duet WiFi controller from the previous Duet WiFi – Intro & Explained.


As you can see, they have a nice and clear start page, where we are going to start our setup by choosing the Custom configuration option and click next.


Next up we setup some basic settings, like board type, firmware version and compatibilty.

Our board is Duet WiFi, and Firmware version is the newest if you updated firmware before this point.

Enable non-volatile memory enables the use of custom commands loaded during startup, which we havn’t put into the firmware – I hanv’t looked much into this to be honest (yet), so leaving it unchecked.*

The compatibility really means how the printer is going to print outputs to terminal when you issue commands, and not as it operates.

In short, it emulates output responses. You can choose from several systems of your chouse: RepRapFirmware, Marlin, Teacup, Sprinter and Repetier.

Marlin is default, but we are selecting RepRapFirmware here.

Type of Ultimaker printer is Cartesian. I’m leaving distance at default and find the exact length of each axis later.

I only changed Firmware compatibility in this step.


In the motors section we have a lot of options. Here’s a screenshot of default settings.

I’m changing the Microstepping for each axis to x32 and enable interpolation.


In order to find steps/mm we will click on the Calculate steps per mm on the far top-right side/corner.

We’ll be presented by a pop-up window where we can insert our parameters.

Our XY motors are the same, using standard 1.8 motors driven by standard GT2 belts using 20-GT2 pulleys.

This leads to 160mm pr steps for x32 microstepping for our X motor.

Click on Y, to check settings and then go to Z.

An 8mm standard (most common cheap) lead screw used on the Ultimakers, also called Trapezoidal screws are rightly named TR8*8 (the ones I have), which means it is 8mm diameter and has, according to this calculator, at pitch of 8mm.

Rightly this leadscrew has a pitch(distance between the raised ridges) of just 2mm and 4 starts (seperate ridges).

Multiplying pitch and starts on a lead-screw equals the length of travel for a full revolution of the screw, which is 8mm.

The last 8 in TR8*8 denotes this travel length. We are using this 8mm as pitch in the configurator.

You can also buy TR8*4 and TR8*2 screws, but the 8mm is the most commonly used and the cheapest.

Click Apply this value botton and the values are automatically inserted into your Steps pr mm section.

Our steps are now updated:

Axes setup

Next we change our Y axis to match X and update maximum for Z axis to 100. I’m leaving the Motor current at 800mA as that is matching what I used on Smoothieware. Drivers are different though, so it might be subject for a future change. But the same applies for  the instantaneous speed change, Maximum speed and Acceleration.

The Motor driver is the variable used in the Gcodes used to setup everything.


I’m using just 1 extruder which is my own Belted Extruder. It is highly geared on it’s own and silent, so I don’t need high microstepping for any of these reasons.

I’ll set it at 32(on) to try out the new driver and change it later if I feel the need. If you follow the above link, and look all the way at the bottom of the page, you can see the steps needed.

In my case I’ll set the steps at 2050 – still need to tune it later.

I’m only changing microstepping and steps here. I really have no idea about the other settings for now, but might change by testing.

Motor current should match my motor just fine.

Motor Current

I have no experience in using this feature, so leaving it at default.

I can see how it might help keep the Z-stage in place if it tends to drop. On the other hand it makes manual movement all but impossible, say if you want to change filament in the middle of a print and need to manually retract and insert new filament.

Subject for change later as much else 🙂


Next stop on our way is configuring our Endstops.

Here’s the Default settings shown.

I always use Normally Closed on my endstops as they trigger if some error happens, like broken wire or switch – Ie. they are carrying a small amount of current through always and if this is broken, the switch is seen as triggered.

The endstops are located at X min and YZ max on my Ultimaker clone, as is regular ultimakers.

Homing Preferences

Making changes to the speed to more closely fit an ultimaker style printer.


Since I do not have a z-probe, I just leave as is and click next.


The default settings for heaters are show here:

I only have 1 heater, so leaving that alone.

I’m raising maximum heater temperature to 320 as I do print Polycarbonate now and then.

People using the full metal E3D hotends should raise it to at least 290c in order to be able to tighten the nozzle as recommended by E3D.

I’m changing the control method of the bed to PID from Bang-bang, as I’m using a powerfull 500w AC heater and it needs to be tightly controlled.

Heaters Setup

Now it gets hairy! In all honesty, I really hope this section is tweaked in the future to make it more userfriendly by implementing some options of thermistors, brands and thermocouplers + pt100 settings.

As it is now It’s completely above all but the most expert users and there’s no links to more userfriendly info, so it will leave most users pretty stumped.

In short we just leave it alone.

The Output scale factor is later modified when do a PID-tuning after applying these configurations.

The Series resistance refers to onboard components, so I’m a bit at a loss why we have this option here.

The first value under Thermistor coefficients is how much resistance your thermistor is having at 25c degrees. Not much worth when using PT100 or Thermocoupler though, but just leaving as is.
Note: I later found I had to put in the same number for Bed as for E0 here.

Second value K, is based on type of thermistor used, while the third C, is coefficent of steinhart-hart equation! I can’t explain this, so just leave as is.

The Sensor channel denotes the channel we connect our sensors to. We leave the Bed sensor channel at ADC0 and E0 at ADC1

Note: You might wonder at my top temperature at 320 and now I use thermistor! I’m normally using a thermocoupler, but using thermistor for the case of this configuration.

From the Duet Wifi documentation on Heater and Thermistor settings, the B value (K) of the Semitec 104GT-2 thermistor is 4388 at 220c.

For the sake of ease, I leave it as is for now and click Next.


Here’s the default settings show for our tools.

For each hotend, or maybe for each color on a multi-color hotend, we define a tool.

I only have a single E3Dv6 on my setup, so leaving Number of tools as is.

I’m putting a mark in Select first tool on start-up, which makes it available as default and define which tool I select, which is just Tool number 1.

I only have 1 extruder E0, so can’t pick and choose any different extruders.

Leaving offset as is and click Next.


Next up is the compensation settings.

This is the section for setting up the popular BLTouch probe, the Duet mini IR probe or other similar system you might have.

Compensation and autolevel is used by many people interchangeably, but that is for another time.

I’m leaving as is, as I have nothing of the sort on this machine, and just press Next.


Here you can disable the network.. maybe you would want this for security reasons and only use it over USB if in a school or company.

I’m configuring the Printer Name as DuetUM2 and do not type a password. It’s really annoying having a password during setup, but do what fits your usage scenario.

You can leave DHCP on, if you want the printer to aquire IP automatically (or if you configure it on your router/dhcp server).

Note how the default gateway is set at the last IP in the range, and not as the first IP which is more commonly accepted standard by Cisco, so you might need to change this as well.

Subnet mask should not be changed in most normal home networks.

Cooling Fans

We have several options for our fans and the setup GUI here, is really nice to handle it.

Before continuing, lets take a look at our Duet WiFi controller from the previous Duet WiFi – Intro & Explained blog-post, to see where the fan connectors are located:


If you want to read some more about Duet WiFi fans there is a nice section about Connecting and configuring fans on Duet Wiki.

In order to choose, we have 1 piece of important information: FAN1 is always on at bootup, so this one is ideally used as heatsink fan for the hotend.

That one picked, we choose FAN0 as our object cooling fan and FAN2 as control for the fans I have on my motors to cool them when my bed is heating up my printer case, as a sort of “passive” heating chamber.

Value: I’m leaving FAN0 at default 30% and set Fan1 and Fan2 at 50%

Invert output: This is required for 4pin pwm fans, so leaving them at No.

Frequency: I don’t honestly know how to figure out what to pick, so leaving it at 500 Hz. By using Mouse-over, it says PWM should be put at 25000 Hz instead.

Thermostatic Control: No for my FAN0 as we need to control this more dynamically to cool our objects. FAN1 and FAN0 is on Yes.

Monitored Heaters: This denotes the heater a fan is looking at when thermostatic control is on. FAN1 which is for Hotend Heatsink, it is set to E0, while FAN2 which is for the fans on my motors, which needs cooling when heated bed is hot, is set to Bed.

Thermostatic mode trigger temperature (heat controlled): Default is 45c, but I’m just used to having it at 50c for Hotend Heatsink, so I’ll do that for FAN1. I put FAN2 at 60c for Bed.

I do not have any Custom settings for config.g now, so just pressing Finish.

Configuration Finished

You’ll be presented with this pop up window with some help text. We are allready using Duet Web Control and is choosing Download files as ZIP.


See this page for further information about the purpose of these files.

Navigate to your downloaded file, which is named

Click here to download the files I just generated: config,zip

Upload Configurations

In your Duet Web Panel, click on Settings and either click on Upload File(s) and pick your, or simply drag and drop the file onto the Upload File(s) section.

The files will be uploaded super fast, so fast I didn’t have time to capture it, and you are presented with a dialogue box about rebooting the Duet. Click Yes.

Lets take a look at our files in Settings -> System Editor

Here we now have a full compliment of files to control our printer.


As it is right now, you should have basic usage of the printer, but many things might need to be modified like:

  • Direction of motor/axis movement
  • Temperature measurements
  • Speed of movement
  • Fans
  • etc

We are going to do the final adjustments in the next blog-post, where we are going to set all of these things right, by digging into the config.g file.

Posted on

Duet WiFi – Intro & Explained

We have previsously gone through the Getting Started and Update Firmware.

In this part, we are going to focus some on the layout of the board for basic setup and usage, but primarily we are going to look into the fundamental differences from how other boards and firmwares are put together.

It took me a while to figure it out. The differneces that is. And not talking about the quality and features, as the Duet WiFi is the undisputed winner on this point at the moment.

What I’m talking about is the differnece in how the approach is made to connect hardware and firmware. It is really obvious once you are pointed towards it, but it’s simply just a new way to approach the setup of firmware when working with RepRapFirmware, than any other firmware (that I know).

At first I was mostly just focused on the usage of Gcodes to setup everything, but that is really just the half of it, or rather, a means to an end.

No Pins, but assigned functions

In all other firmwares we have a lot of pins assigned to different functions. Some are obscured like in Marlin, where the pins’ files are mostly off limit to the normal users, over to Smoothieware, where you directly use the pins to create functions for the controller to use.

When working with RepRapFirmware for Duet WiFi, we are working with Gcodes which we use to specify different setup tasks, where the available options are predefined and non-changeable, like FAN0, Fan1 and Fan2.

Example: To setup a fan from the the FAN0 connector, we first need to know and use the Gcode corresponding to FANs, which is M106. After stating M106 we then use the parameter “P” to define the variable (number) at the end of our FAN. In this case 0.

Note: These are what I called the “predefined non-changeable options” -> 0, 1 and 2. By using the M106 Gcode we have allready stated we are working on setting up one or more fans, and we simply use the parameter “P” to define which fan on the system we want to setup.

So, in order to activate our fan to cool our printed object, we need to put this Gcode into our config file, where M106 starts the setup of fan/s and P0 defines we are settin up FAN0:
M106 P0

We can specify (many) more parameters like temperature (thermostatic) controlled and so on.

All clear then? Ok, maybe not yet, but we’ll go through it one step at a time. I’ve marked up the parts, on the photo of the Duet Wifi, we are going to touch on, in future posts in this series, which is going to be plenty for a basic setup for a Cartesian and CoreXY printer.

Summing up

I hope you found the post usefull. I know I learned a lot while figuring out the differneces of this board and firmware compared to the other models I’ve worked with previously.

I originally wanted to also expand on the actual configuration in this blog-post, but it has been moved to a later post due to time constraints (working hard on my BeTrue3D Printer)

Next post

In the next post, we are going to take a step back before we continue with all the setting up of firmware, and start by wiring up our controller instead, which means we start by taking a look at what’s in the pack when buying Duet WiFi.

Posted on

Duet Wifi – Update Firmware

Download and update new firmware

Download new firmware

If you do not allready have the newest firmware, head over to the Github repository containing the RepRapFirmware.

Here we click on Clone or download and then Download Zip.

Take the downloaded file, which is about 10MB, and extract it to a practical location.

Note: Here’s a direct link to the latest stable files.

Update firmware

  1. Open your webinterface and go to Settings and General tab.
    Here we can see our current version of the 3 different firmwares running on our board.
    Click on Upload File(s) to upload our firmware files.
  2. Filenames and matching name on Web InterfacE:
    DuetWiFiFirmware :: Firmware Version
    DuetWiFiServer :: WiFi Server Version
    DuetWebControl :: Web Interface Version
  3. Browse to the place you extracted the files and find the subfolder:
    Release -> Duet-WiFi -> StableNote:When everything is working and you need some option only available in Edge, you might want to use that one, but for now, we want to use the Stable version. Edge basically means Beta.
  4. Browse to our files and dobbelt-click on our DuetWiFiFirmware file
    You need to press YES for each of the update notifications in order to get all of them updated.

    1. Note: I had some faded error messages, about failing to create/rename a folder, but everything turned out fine anyway.
  5. Now upload our DuetWiFiServer file.
  6. Finally upload the largest file for the Web Control DuetWebControl
  7. When pressing Yes, it takes a while to finish.
  8. When done we get a confirmation dialogue along with a prompt to reload.
  9. We now have the newest firmware installed for all 3 areas:

Duet Wifi official information on firmware:


Posted on

Duet Wifi – Getting started

Welcome to the very first post in a long serie about the Duet Wifi controller.

This first Blog post contains:

  1. Download and install drivers
    1. Installing USB drivers
  2. Activate WiFi
    1. Download Printrun/Pronterface
    2. Activate WiFi using Pronterface
  3. Duet WiFi web interface
    1. Log on to the web interface for the first time
    2. Set WiFi to enabled automatic on startup
  4. Setup IP Address and name of controller
    1. Setup IP Address
    2. Specify a Name and password

Looking at the Duet Wifi Controller, we can see how it has a micro USB connector

A nice subtle usb cable is included with out Duet Wifi, which we’ll use to get started.

Download and install drivers

Before we do anything we head over to the Github repository cotaining the RepRapFirmware.

Here we click on Clone or download and then Download Zip.

Take the downloaded file, which is about 10MB, and extract it to a practical location.

Installing USB drivers

In order to use the Duet Wifi via USB we need to install some drivers. My windows 10 laptop actually installed some drivers on it’s own, and listed the device as generic COM port.

I didn’t test wheter communications worked ok or not, as I proceeded to install the drivers from Github.

Locate your drivers, which are located in RepRapFirmware-dev – Driver

Right-click the Duet.inf file and click Install

Now you say yes and accept any windows popping up on your screen untill it is done installing.

When finished you can see your Duet Wifi listed as Duet 3D printer control electronics in your device manager. Note the number listed after COM. In this case 3. We are going to use this in future steps.

Activate WiFi


Download Printrun/Pronterface

In order to activate WiFi, which we need in order to update firmware, we are going to use Printrun/Pronterface.

Note: You can use Repetier host, or any other host software you might like. I just like to use Printrun/Pronterface as it is extremely light and starts up very fast, so very usefull for faultfinding.

Click the Get it icon in the first box, or just click download in the top menu.

Now click the Windows & OSX binaries and find the newest file for Win or Mac, as fits your system. In my case I download the file and unzip it somewhere practical.

You do not need to install it, and just start it by double-clicking pronterface.exe, which we do now.

Activate WiFi Using Printrun/Pronterface

  1. Plug in your USB cable to the Duet Wifi and to your computer. Do not turn on your main power source yet.
  2. Open Pronterface and check COM port. It should automatically choose the COM port available. Select manually if needed. In Baudrate you can just select the fastest option and then click Connect.
  3. In the right-hand window you can now see that your printer i Connected / Online.

    Printer is now online.

  4. Optional: Use the Gcode M503 to get a read out of your config.g file. This file is located on the SD card, so a readout means success.
  5. Enable WiFi by issuing the Gcode command: M552 S1
  6. After up to 30 seconds, you get the following message:

    Now you can see the Duet Wifi access point on your computer.
  7. If you are connected to your network using network cable, you need to disconnect this before connecting to the DuetWiFi network.
  8. Now connect to the DuetWiFi network and go to address in a browser.
    1) Select your Wlan and type in the password for the network.
    2) Specify a hostname, if you want a different name than duetwifi.
    3) Hit Save and reboot button.

  9. Don’t reboot by unplugging USB, but instead issue M552 S0 to turn off Wifi and then M552 S1 to turn it on again.
    You can see how my Duet WiFi were assigned the IP

    1. Note: If you need to check the status of the WiFi you can just issue the M522 Gcode command without parameters.
      Here we can see wifi is disabled and our IP address is right now.
    2. Lets turn on the WiFi by issuing the M552 S1 Gcode command.
      The WiFi is now turned on and IP changed to – IP changed as I haven’t yet defined a static IP address.
      Note: It is not possible (as of january 2017) to define a staic IP on the device. You need to assign a static IP via your router

Duet WiFi web interface

Logging on to the web interface for the first time

Now we log onto the Web GUI using the IP address assigned to our Duet WiFi

Here we can see the aweseome web gui of the Duet WiFi from where you can setup and control all aspects of the controller!

Set WiFi to enabled automatic on startup

In order to configure our WiFi to be enabled every time we power up the Duet WiFi we need to edit some config files. Instead of the “usual” way of doing it by editing files in a compiler, like Arduino IDE, and then spend a lot of time compiling and uploading it, we can edit the files directly from Web Gui and just apply the changes without any compiling taking place. Nice ehh? 🙂

  1. Click on Settings -> System Editor and the Pencil in the config.g file row.
  2. Find the line containin ; M552 S1 and remove the ;
    A semicolon in the start of a line means it is uncommented. This means the line isn’t executed. When we remove the semicolon we changed the uncommented state and enabled the line.
    Note: We can see which file we are editing in the top left corner. In this case config.g
  3. Click Save Changes when done.
  4. Go back to the General tab and click Apply Settings.


Setup IP address and Name


Setup IP Address

Setting up a static IP address using the M552 Gcode command, or any other way, is not possible with the current firmware:  Known firmware issues

Only way to fix the IP is to setup a static DHCP address in your Router, based on the MAC address of your Duet WiFi Controller.

If you setup a static IP address and do a readout, you will see something like this message, where .100 is the IP I specificed, and .19 is the actual one issued by the DHCP server in my Router.

If specifying static IP worked

When the firmware it fixed you can setup the IP by editing the config.g file, as we did above.

Then insert the following data marked up with the square.

Specify a Name and password

By editing the config.g file, as we allready did a few times above, you can change the name of your machine.

  1. Machine name is defined using the Gcode M550 Pxxxx. It is important to remember to use the P.
    1. Changing machine name is actually the Netbios name and also the name displayed at the top center of the web interface.
  2. While at it, you might also want to change the password to something only you know.
    1. Using the Gcode M551 I have changed it to mypassword – again, you need to remember to use the P for parameter.
    2. By changing the password you will now be met with a password dialogue if you want to manage your printer using the webinterface.
      This is not a high level security measure and should not be used as such. Users are going to have access to the interface but just can’t modify anything.
    3. Change password back to reprap to avoid the security popups like this: M551 Preprap
  3. Now just Save Settings and Apply Settings in the General Tab.