Posted on Leave a comment

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 1 Comment

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 4 Comments

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.

Note: Interpolation is in fact only supported when setting Microstepping to x16. Interpolation means it interpolates (chops up) each physical step and in effect turn out 1/256 microstepping, leading to incredible smooth and silent workings.


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 Leave a comment

BeTrue3D Printer build part 6 – X sliders metalworking

Was looking forward to write this post as yet a milestone in my project, but it didn’t turn out quite as I wanted.

Instead of yet a post going through how everything is just working as it should and all my planning comes perfectly together, this blogpost is about the planning and work -process – and why it failed.

To sum up, this is one of those blog-posts most people do not publish, but which is important to show we learn through or failures.

Getting started – What needs done?

As a starting point I admit I didn’t draw up any fancy drawings before drilling the holes. I made one for this post, of what I had in mind, more or less.

I didn’t do this earlier, as (I just wanted to get started) the only important point was that all holes MUST be placed at the same distance from the upper/lower edges, or the rods wouldn’t go horisontally across and connect with the opposite positioned slider.

It wasn’t crucial wheter the holes was more or less accurate from the sides.
The holes must offcourse also be drilled in at a right angle on both planes, or the rods would angle either to one of the sides or up or down when mounted.. and thus wouldn’t connect with the slider’s partner on the other side.


I’m not much of an accurate handyman. Get me right, I grew up on a farm and can use pretty much every tool around, but I can’t make anything fancy or overly accurate, which is also why I sourced my Z-stage plate for someone who knew what he and his CNC was doing.

I’m pretty aware of what I can and can’t do though. Normally 🙂

Positioning of the sliders

You can see I have drawn some lines on the sliders, which means I did try to get the holes placed the same on the sliders, but what really matters is the sides.

In order to get the sides completely flat I used 2 pieces of metal used to measure stuff, so they are very flat, and should ensure a pair pretty good planes to position my sliders up against.

I also did my best making the sliders rest firmly on the bottom of the wise.

I started drillin a pilot hole of 3mm. It went in very smoothly while using cutting lubrications – I’ve previously used oil or whatever other lubricant I had on hand, but I can warmly recommend buying some proper cutting oil, if it is somethiing you do now and then.. it really makes a big difference!


Drilled a medium hole on the first slider.. I didn’t repeat this on the other parts as the drills really went through very smoothly.

8mm hole

My 8mm drill was too long to fit into the drill-press, so I actually had to find a grinder and cut off the end of one of my drill bit.. meaning my good one wasn’t in action today.


After shortening up one of my 8mm drill bits I could continue:


Timelaps Video

I didn’t clean the drillbit as much as I normally did as I didn’t want to stop drilling while filming… don’t know why, but that’s the reason…

Result seen from the end. You can see how the slider doesn’t rest a lot on the lower part.

Set-screw holes

I needed to make some holes for set-screws in order to fixate the rods in place once the printer is assembled,

so next up are a quartet of 2,5mm holes.

First some drawing

The actual drilling and end result


Making threads

In order to make some thread for set-screws I use some tapping pieces and my small power-drill set at a low torque.

It’s important to set it at a low torque so it stops if you can’t feel it needs to stop, or you risk stripping your nice threads before they are completely made.

2-step tapping

First up I used the tapping piece with the least grooves in it. You can see it in the machine.. almost looks as if it’s ruined, but it is supposed to look that way.

This bit is put through first, as it requires the least force.

Next up I use the actual m3 tapping bit. You can see how it has threadding grooves all the way along its length.

Ohh, and I made a video here as well

I know the hole is not square with the slider, but these set-screw holes doesn’t need to be square as the screws just needs to hold the 8mm rods in place.

Cleaning the parts

With all the nasty stuff finished I need to clean off the oils metal parts, so washing the rods and sliders using dishwater soap and hot water.

Fitting parts

Made sure the 8mm rods could go through. If there was a small edge or otherwise, I used my dremel to clear the way. Don’t overdo it!

Making sure the rods wenth through as they were supposed to, I tested using the set screws…


…and later found some actual set/grub-screws instead of normal screws.


Time to put everything together.

What went wrong?

Now you might wonder what went wrong, as it all seemed to go just fine.

First thing is how I didn’t bother to make a drawing of what I wanted to do. Having an idea in my head is not the same as actually having formulated it. Lots of things comes to light once you draw it such as:

  1. Putting the 8mm hole all the way through, would mean you can make the same hole on all 4 and not 2 different sets.
  2. It becuase more obvious that you want the set-screw on the other side, meaning up top instead of just the side with least distance.

Revised version

This is how the revised version looks like – with 8mm holes all the way through:

If it was just the 2 above reasons I could live with it, but the main problem was the propability for accuracty issues.

Not Square

I had it completely sorted on the two sides where I put up steel plates, which ensured a completely flat and accuracte grib, but I failed to recognize how the sliders must have been lifted slightly when I tightened up the grib.

I did make sure the nearest corner, which was visible to me, was touching the bottom, but judging by the result, the far corner was not always in the right spot.

It’s the same reason my m3 tapped holes weren’t square…


2 of the sliders seems perfect, while 1 was a bit off and 1 was way off. The rod was pointing off to one side by several centimeter on the far end…

I was supposed to receive the sliders today that I sent to the CNC guy.. but I haven’t received them, so going to post this now, and do a new post on the assembling of the XY axes.

Posted on Leave a comment

Use a SSR or Power-Expander to externally power Heated bed – Part 1

I’ve had a few inquiries about how exactly to use a Solid State Relay and an extra powersupply or main power, so decided to write about how to make it work, and explain some while at it


  • Solid State Relay :: SSR from now on
  • powersupply :: PSU from now on
  • Mains power :: AC

Silicone Heater

Here’s my 500w silicone heater from Keenovo (opes eBay shop) powered using AC power. It comes with an attached pad of 3M MP386 heat resistant and transferring extremely sticky tape. You can have them made with other types of sensors, like a thermocoupler if you like.

I decided to include the Power-Expander (opens link to as it is a great alternative to a DC-DC SSR, and because you are sure not to get a counterfit SSR.

I have personally only used SSR from RobotDigg (opens their shop), but the brand Fotek is also a good quality. Problem is lots of counterfits (open UL site) & here (instructables) around, so be carefull where you buy your stuff.

Types of relays – usage scenarioes

We allready touched on the subject above, so lets take a look at the different options we have.


The denomination before the – is the input or control type. We are only talking about DC- here.

The listing after the – is the LOAD type. So if it is listed as DC-AC, it means we control it using DC from the output on controller and the LOAD we are using is AC if we have a silicone heater as listed at the top of this page.

  • DC-DC SSR or Power-Expander are interchangeable in most cases, so I’ll list them as such.
    • Notice the input type and range listed at the lower end. In this case 3-32 Volt and the type is DC
      Load type os listed at the upper end, and is 6-220 volt and also DC, so we really have some power here.
      Amperage is listed in the center, and this SSR is rated at 25A. It means the LOAD can be current up to 25amperage
    • Option 1: if your main powersupply is not powerfull enough to power a heated bed in addition to the electronics. It might also be used
    • Option 2: if you just want to use 2 seperate powersupplies for the electronics and heated bed: you might be running electronics at 12v but want 24v on heated bed.
    • You want a DC-AC SSR if you have a heated bed powered using AC. Most common if you have bought an AC silicone heater.
  • Shield
    The SSRs I’ve bought comes equipped with a clear shield/cover.
    It is important to use this to avoid accidents, as the terminals are open and easy to get to.
  • Heatsink
    Read on the specifications and compare to your needs wheter you need a heatsink or cooling. I have not needed this on my build as a 500w AC heater only use 2-2.5amperage at most.

Wiring up

The next big question is how to wire it.

If you use an AC heater, you might want to add a grounding wire. You might also want to do it if you use DC, but in any case, I have added one here, as you can see.

I must admit I can’t see a scenario where it would be needed, but better safe than sorry, and it’s easy to just add an extra wire.

Here’s the wiring braided and sleeved up with the Silicone heater taped to the plate. It takes 24 hours for the glue to fully harden, so put it under pressure a day or so, before putting it upside down – don’t put pressure on the center part where the thermistor lives.

Ground Wire

People have aruged that I should have attached the ground wire to the black print-plate, but I admit I simply only had in mind to ground the entire Z-stage, so bolted it to the z-stage liftplate…

If an AC wire comes loose I guess it would it the plate.. in any case.. I leave it to you, how you want to attach it.


Next parts…

In the next part of this, we will go through the complete wiring of controller, psu, ssr and heated bed.