Posted on

Duet WiFi – Configuration walkthrough and adjust – Part 1

We allready did a basic setup using the online RepRapFirmware Configuration Tool and it’s time to take a look at the config.g file and see what it all means and make sure it all works as it should.

Don’t be depressed if, say, your object cooling fan is blowing as soon as you turn on your printer or one or more axes are moving the wrong way.

Before continuing you should go get some coffee or similar, as this blog-post ended up as a huge post with lots of information.

I also hope you appreciate how I managed to get rid of the right hand column, so the reading quality on this site improved a lot!

For more technical info, you should take a look at the official Configuring RepRapFirmware for a Cartesian printer wiki page.

Duet WiFi overview.

Lets start by putting up the Duet WiFi overview I made for my previous blog-post: Duet WiFi controller from the previous Duet WiFi – Intro & Explained.

General preferences


These are all set from the online configurator and we really only need to adjust the M208 axis min and max.

You can change the M555 Pn if you want to change the compatiblity mode, ie. if you want it to respond in a certain way when you input commands in the Terminal.

We will however let this be for the moment, as we need to verify our movement settings before doing this.

Note: I’ve later discovered that we should remove or comment out the M83 line as it is causing all kinds of problems. From what I gather I believe it’s a bug, that this command is in there in the first place.


Lets take a look at what is going on here.

First we have M574  which is used to define the XYZ endstop parameters. A setting of 1 after axis letter denotes an endstop placed at the minium of that axis, a 2 if it is placed at the max. If you do not have an endstop, you insert a 0.

Meaning we have X at minium and Y and Z and maximum.

Sn – Active low or high

S1 defines the switches as Normally Closed (NC), which means current is running through when the switch is not engaged, and the circuit is broken when the switch arm is engaged. This is also called “Active high” in the Duet documentation.
S0 defines the switch as Normally Open (NO), which means there is no current running through the endstop when not engaged. When the endstop is activated a current will go through. This is also called “active low” in the Duet documentation

Sum up Endstop M574

It all means we have X at minium and Y and Z at maxium and the endstop switches are normally closed.

; Endstops
M574 X1 Y2 Z2 S1 ; Define active high microswitches

Z-Probe Type

The M558 Gcode defines Z-probe type and settings. Insert ; in front of it, as we do not have a Z-probe.

Z-Probe Status

The G31 Gcode can be used several times to define different probe types (i.e. 0+4 for switches, 1+2 for IR probes and 3 for alternative sensors).

We are not using any Z.probe, so uncomment it, by placing a ; in front of the line.

Set Z-probe point or define probing grid

The M557 is also used for use with a Z-probe to define a mesh grid.

As before, we do not use a Z-probe, so we’ll put a ; in front of the line to uncomment it.

Endstops final settings

Since we do not use a Z-probe, we really only need 1 line in the Endstops section

; Endstops
M574 X1 Y2 Z2 S1 ; Define active high microswitches

Here’s the entire Endstops’ section

I  have left the z-probe part in place, as I might use a z-probe later, and it’s nice to have as a reference.

; Endstops
M574 X1 Y2 Z2 S1                  ; Define active high microswitches

; M558 P1 X0 Y0 Z0 H5 F120 T6000  ; Set Z probe type to unmodulated, the axes for which
; it is used and the probe + travel speeds
; G31 P600 X0 Y0 Z2.5             ; Set Z probe trigger value, offset and trigger height
; M557 X15:215 Y15:195 S20        ; Define mesh grid


Next up we look at the movement of our printer.

When using the RepRapFirmware our motors are listed as Drives. The first 4 lines each denotes a motor, where the first three from 0 to 2 are our XY and Z drive, while number 3 is our extruder.

Movement direction

Lets go to machine control and test each axis by pressing the associated +1 buttons for each axis.

Yours is probably different, but my X axis is going the wrong way, so I’ll have to change the direction of X:

Changing this: M569 P0 S1 to M569 P0 S0

Note how we “use” the Gcode M569 to change the settings for drive P0 from direction S1 to direction S0

Extruder direction

I also hit the extruder bottom, but since my hotend are cool I recieed this error:

We’ll let this be for now, and return to it once we have configured our hotend heater.

Save the changes, click yes to reboot and check your new configuration.

Microstepping mode

Next up is the configuration of microstepping mode using M350.

We start by issuing the M350 command and list each drive followed by microstepping mode.

The trailing In denotes wheter or not we have interpolation mode enabled. I1 to enable and I0 to disable it.

After running through the Web Configurator I learned that only by running at 16 microstepping the I1 parameter causes the microstepping to be interpolated to 256x.

Allthough you can turn on interpolation and set microstepping at 32, I have come to believe interpolation is in fact not enabled, so 32 would generate more noise than 16 with interpolation enabled.

I means I change

M350 X32 Y32 Z32 E32 I1        ; Configure microstepping with interpolation
M350 X16 Y16 Z16 E16 I1        ; Configure microstepping with interpolation

Steps pr mm

Since I just changed microstepping from 32 to 16, I need to change the line, where I used the M92 Gcode to define steps pr mm.

My current setting is 160 steps pr mm for XY, 800 for Z and 2050 for E:

M92 X160 Y160 Z800 E2050       ; Set steps per mm

I’ll change that to 80 steps pr mm for XY, 400 for Z and 1025 for E

M92 X80 Y80 Z400 E1025       ; Set steps per mm

Speed configurations

Last part of the Drivers section consists of settings for instantaneous speed changes, which roughly translates to marlins jerk setting. the maximum speeds, accelerations, motor current and motor idle current and lastly idle timeout for how long the motors stays engaged before turning off.

Allowable instantaneous speed changes

The M566 sets the allowable instantaneous speed changes. I’lll leave this as is, as I need to test some.

M566 X900 Y900 Z12 E120        ; Set maximum instantaneous speed changes (mm/min)

Maximum feedrate

The M203 set maximum feedrate pr mm/min as opposed the more commonly used mm/sec, so keep that in mind.

M203 X12000 Y12000 Z6000 E1200 ; Set maximum speeds (mm/min)


The M201 is used to set max printing acceleration. Instead of mm/sec, or even mm/min, this now uses mm/ s^2. I personally find this an odd size, as it is very hard to relate to. I’ll leave it as is.

M201 X500 Y500 Z250 E250       ; Set accelerations (mm/s^2)

Motor current

The M906 command is required. Without it, motor currents will remain at zero.

We have listed 800 for each of our motors, which stands for 800 miliamp for each.

A risk of going too low is that if you get a blob or curl up on your print and the head hits it, at lower currents the motor is more likely to skip steps. Also at very low currents, the microsteps are less uniform because the detent torque becomes significant in comparison to the torque due to current. That’s why the suggested minimum is 50% of rated current.

The last I parameter is % of power for the motors on idle.

In our case we have set idle power at 30% by using the I parameter followed by 30.

M906 X800 Y800 Z800 E800 I30   ; Set motor currents (mA) and motor idle factor in per cent

Note/quote: The I parameter is the percentage of normal that the motor currents should be reduced to when the printer becomes idle but the motors have not been switched off. The default value is 30%.

You can use an optional H parameter to issue seperate power a z-probe should use if you have one such.

Drives settings.

This leaves us with this setting:

; Drives
M569 P0 S0               ; Drive 0 goes forwards
M569 P1 S1               ; Drive 1 goes forwards
M569 P2 S1               ; Drive 2 goes forwards
M569 P3 S1               ; Drive 3 goes forwards
M350 X16 Y16 Z16 E16 I1  ; Configure microstepping with interpolation
M92 X80 Y80 Z400 E1025   ; Set steps per mm
M566 X900 Y900 Z12 E120  ; Set maximum instantaneous speed changes (mm/min)
M203 X12000 Y12000 Z6000 E1200 ; Set maximum speeds (mm/min)
M201 X500 Y500 Z250 E250       ; Set accelerations (mm/s^2)
M906 X800 Y800 Z800 E800 I30   ; Set motor currents (mA) and motor idle factor in per cent
M84 S30                        ; Set idle timeout

Click Save Changes and choose Yes to reboot your Duet WiFi in order for the changes to take effect.


In this section we are going to configure both of our heaters: Hotend P1 and Heated Bed P0

We use thje M143 gcode to configure maximum temperature for all our heaters.

During our tour through the Web Configurator, we set our hotends’ maximum temperature at 320c by using the parameter S. Note: how we do not need to specify heater number for this. It’s due to our hotend as heater 1 being default when none is specified.

We want to add maximum temperature for our heated bed as well. This is also done using the M143 command. This time we need to use the Parameter H to specify the heater in question, and 0 as the number of heater in question.

I need my bed very hot, as I print Polycarbonate, so I’ll set it at 140. You probably want it somewhat lower.

Note: From RepRapFirmware 1.17 onwards, the default maximum temperatures are 262C for extruders and 125C for the bed.

; Heaters
M143 S320 ; Set maximum heater temperature to 320C
M143 H0 S140   ; set the maximum bed temperature to 140C

PID Tuning

PID tuning in RepRapFirmware is very different from marlin and smoothieware where you basically just set target temperature and number of cycles to test, and the system runs its test-cycles and output the variables for our use.

There is a usefull page at the Duet Wiki Tuning the Heater Temperature Control and a Duet forum post you might find usefull as well.

First we have our M301 gcode which is used to define the parameters for our heaters.

The H parameter is used to specify the heater in question, and heater 1 (hotend) is once again default if none is entered. Here we see the output for our heated bed, so H0 is used to specify the bed heater.

M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30 ; Use PID on bed heater

Configuring Heated Bed

The output from the Web Configurator only has values from our bed, but we really need to run a new PID tuning cycle using M304 to get the proper parameters for our Heated bed.

Lets start by taking a look at the running configuration of the Heated bed using the M307 command that sets or report the heating process parameters.

I got the following output:

M307 H0
Heater 0 model: gain 90.0, time constant 700.0, dead time 10.0, max PWM 1.00, mode: bang-bang

Lets be honest, I really do not know what it all means, but we don’t need to either.

The important things here for our purpose are Heater 0, which matche the above H0 and the max PWM 1.00 which corrolates to S1.00.

A setting of S1 means we run at 100% power. If you want it at 50% power, you set it at S0.5

PID Tuning Heated Bed

I want my Heated Bed to use PID since I use a powerfull 500w AC heater, so lets run a PID tuning cycle using the M304 gcode.

If we just run M304 on it’s own, we get the message that it currently is in Bang-Bang mode, so we need to change that.
Heater 0 is in bang-bang mode

The Heated Bed is by default started up as Bang-Bang. In order to change it, we insert a line in our heaters section, after the M301 line.

The M307 command I use here, defines H as 0 (heated bed) to start up in PID mode, by using B0.

Note: Do not confuse the B parameters in M301 and M307, as they are not the same.
; Heaters
M143 S320 ; Set maximum heater temperature to 320C
M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30; Use PID on bed heater (may require further tuning)
M307 H0 B0
M305 P0 T100000 B3988 C0 R4700 ; Set thermistor + ADC parameters for heater 0 ; BED
M305 P1 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 1 ; Heater 1

After saving and rebooting the Duet, we run the M307 H0 again, to check the status of our Heated Bed.

Our Heated Bed is now in PID mode, so lets continue to use M303 to run PID tuning.

We use the parameters:

  • H = Heater. H0 for heated bed.
  • P = Power in %. Default is 50%, written as 0.5.
  • S = Maximum temperature. Default is 225, so it’s important for bed, which I set at 100c here.

M303 H0 P0.5 S100

Here we witness a hugely annoying part of RepRapFirmware… it fails tuning if temperature exceeds the maximum temperature. As opposed to Marlin, which automatically compensate and turn the heater on/off, this one just fails, so we have to wait for temperature to drop before trying again with a lower power setting than our current P0.5

I did 0.4, 0.3, 0.2 before succeeding at 0.1 after an hour and 5 minutes!

You have to wait some time after each failed attempt, or the tuning is cancelled as you see here.

An hour and 5 minutes later, I manged to finish the PID tuning at 10% power, along with a warning about it being overpowered.

I really hope this function is tweaked asap as it’s a huge bother and doesn’t take into consideration the large part of people starting to use faster heaters as we don’t want to wait 15 or more minutes for the bed to heat up.

Now that the PID tuning completed, we use the M307 H0 command to see the result.

Our parameters and variables are:

  • Heater = 0
  • Gain = A
  • Time Constant = C
  • Dead time = D
  • Mode ( 0 for PID) = B

Which results in this line for our config.g file.
M307 H0 A252.2 C635.5 D7 B0

Saving PID settings

First we remove or uncomment the old M301 line.
; M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30; Use PID on bed heater

.. and we are going to replace the snippet we inserted in order to change Heated Bed to PID mode

M307 H0 B0
M307 H0 A252.2 C635.5 D7 B0

Instead of writing it in our config.g file, we could also use M500 command, which would save it to save the heater parameters in config-override.g, which is supported in firmware 1.17 and later.

Save Changes and reboot before continuing

Configuring Hotend PID

The output from the Web Configurator only has values from our bed, so we really need to run a new PID tuning cycle using M303 to get the proper parameters for our hotend.

PID Tuning Hotend

In order to setup our tuning of the hotend PID we use M303 and these parameters:

  • H = Heater. H1 for Hotend
  • P = Power in %. Default is 50%, written as 0.5.
  • S = Maximum temperature. Default is 225, so it’s important for bed, which I set at 100c here.

M303 H1 P0.5 S240

Aww, thought I was safe as I use standard E3Dv6 and used standard power settings at 50%, but it still overshot, so have to wait for it to cool down and try again.

After completing the tuning, which luckily is much faster than tuning the bed, we get a nice output like this:

As with the bed, we now need to use the M307 to have the result displayed. This time using H1 instead of H0
M307 H1

Lets sort out the parameters and variables here:

Our parameters and variables are:

  • Heater = 1
  • Gain = A
  • Time Constant = C
  • Dead time = D
  • max PWM = 1 (1= 100% power. 0.8 equals 80%)
  • Mode ( 0 for PID) = B

This results in the following line, which we need to put into our config.g file in our heaters section.
M307 H1 A352.6 C122.2 D8.0 S1 B0

Note: after updating thermistor settings farther down this blog-post to accurate settings, the code looks like:
M307 H1 A313.8 C118.7 D8.1 S1 B0

Thermistor and ADC parameters

Before wrapping up our Heaters section, we might want to look at the M305 command.

If you have some experience in configuring these kinds of things, you might miss some parameters. More precicely the ones related to ADC. It’s because the Duet WiFi have automatic ADC calibration so you should not need to use the H or L parameter.

Heated bed sensor configuration

I’m using a 500w 220AC Keenovo silicone heater, which comes equipped with a NTC 100K thermistor ( Beta 25/50 3950K-1%) as temperature control sensor ( Click Here (pdf file) also for thermistor R-T Datasheet.)

It means it has a restiance of 100.000 and beta coefficent of 3950.

These matches up to:

  • P = Sensor number
  • T = Thermistor resistance at 25oC
  • B= Beta value, or the reciprocal of the Steinhart-Hart thermistor model B coefficient
  • C = Steinhart-Hart C coefficient, default 0
  • R = Series resistor value, which is R4700 for Duet WiFi

So, lets make a command based on our parameters and variables for our heated bed sensor:
M305 P0 T100000 B3950 C0 R4700

Hotend sensor configuration

I am using a genuine full metal 24v bowden E3Dv6 hotend, which comes equipped with a Semitec 104GT-2 thermistor. It has a quoted B value of 4267, but the actual value over 25C to 220C is 4388 (quoted source).

Looking at Configuring Firmware documentation on E3D site it says:
For firmware versions 1.16 and earlier, set the B parameter (beta value) to 4388. This value gives better accuracy at typical printing temperatures in the range 190 to 250C than the B value of 4267 quoted in the datasheet.

For firmware versions 1.17 and later, set the B parameter to 4725 and the C parameter to 7.06e-8.

I’m not sure about that C parameter to 7.06e-8, but it doesn’t give an error when used.. I’ve posted on the Duet forum to get an answer

It means I’ll change the B value for temperature sensor 1 from 4138 to 4725 and C from 0 to 7.06e-8
M305 P1 T100000 B4725 C7.06e-8 R4700

This results in two new lines of codes for our config.g file:
M305 P0 T100000 B3950 C0 R4700 ; Set thermistor + ADC parameters for heater 0 ; BED
M305 P1 T100000 B4725 C7.06e-8 R4700 ; Set thermistor + ADC parameters for heater 1 ; Heater 1

So, what does it mean?

Yes, we need to run PID Tuning again… I’ll not post about that, as we just spend 2 hours doing it 🙂

I’ll post the complete Heaters section though:
; Heaters
M143 S320 ; Set maximum heater temperature to 320C
; M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30; Use PID on bed heater
M307 H0 A252.2 C635.5 D7 B0
M307 H1 A352.6 C122.2 D8.0 S1 B0
M305 P0 T100000 B3950 C0 R4700 ; Set thermistor for heater 0 ; BED
M305 P1 T100000 B4725 C7.06e-8 R4700 ; Set thermistor for heater 1 ; Heater 1

Using Thermocoupler or PT100 sensor.

Using a Thermocoupler or PT100 sensor is a great way to avoid annoying temperature measuring issues. I normally use either one and is going to make a blog-post about it at a later date.

In both cases we would need an expansions board, which can be bought from the addons page.

Coming up

I had hoped to finish up everything, but this is is for now.

In the next part, i’ll write about the rest of the items in the config.g file

  • Tools
  • Network
  • Fans
  • Custom settings
  • Miscellaneous
Posted on

Duet WiFi – binary “iap4e.bin” not found

Making a short post, as this seems to happen fairly often.

In short, I wanted to update my Duet WiFi Firmware from 1.17c to 1.17e and recieved a pop-up error message while doing so.

iap4e.bin missing

Contrary to previous error messages when updating the three-part firmware, this error prevents the firmware update from completion.

Finding iap4e.bin

At first I thought the missing file ought to be in the RepRapFirmware Repository, but I had no such luck, so went to the next best place: Google.

It turned up a Duet3D wiki page about Updating Firmware where the missing iap4.bin file under the section Fallback procedure #1 with the description:

  • Copy the new DuetWiFiFirmware.bin file to the /sys folder. It must be called exactly DuetWiFiFirmware.bin on the SD card. Also make sure that file iap4e.bin is present in /sys.

Ok, so I now know I need to find the iap4e.bin file, and copy it to the /sys folder on the SD

Back to my Google search, which also returned a post on Duet3D forum named missing iap4e.bin. This in turn pointed to a Duet wiki page labeled Where to get Duet and Duet WiFi firmware and tools.

Download and “install” iap4e.bin

Go to the DietiAPI page the above page linked to, and download the iap4e.bin file.

We can’t yet copy files via the Web Panel, so you have to take out the SD card and insert it into your computer, and copy over the file to the Sys directory.

Restart your controller and reconnect to your Web Panel to see the file lsited under Settings and System Editor


I don’t know why this happens, but at least we can fix it now 🙂

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.