Upgrading the Mini Kossel to Duet Electronics Part 2: Software and Commissioning

In Part 1 of this two-part series, I covered the hardware changes needed to use Duet electronics with the Mini Kossel in place of Arduino/RAMPS electronics. In this second part, I will cover installing the software and the first stages of commissioning the printer. Part 3 will cover the remainder of the commissioning process, including calibration.

Software you will need

  • Bossac program (see below)
  • Text editor for editing the configuration file, e.g. Notepad++
  • Chrome or Firefox web browser (Safari may also work, Internet Explorer and Edge don’t). You can use Pronterface instead, but the web interface is much nicer to use and shows the real-time status of the printer.
  • Downloaded firmware and SD card files (see below).

Note: unlike older firmwares such as Marlin, you do not need to rebuild the firmware to configure it. Therefore, you do not need the firmware source code or to set up a build system unless you want to change the functionality.

Preparing the SD card

The SD card needs three folders in the root: /gcodes, /sys, and /www. The /gcodes folder is for files that you want to print. The /sys folder is for the configuration file (config.g), the homing file (homedelta.g) and the bed probing file (bed.g). The /www folder is for the web interface files. If an SD card was supplied with your Duet board, then it is probably set up for use with an Ormerod or Mendel, and you need to replace all the files. I will assume that you use my fork of RepRapFirmware (currently, it is the only fork with support for delta printers). Populate the /www folder with the files and subfolders from https://github.com/chrishamm/DuetWebControl (see the readme file for how to do this). Populate the /sys folder with the files from https://github.com/dc42/RepRapFirmware/tree/dev/SD-image/sys-MiniKossel. Populate the /gcodes folder with file from https://github.com/dc42/RepRapFirmware/tree/dev/SD-image/gcodes-MiniKossel.

Choose a network IP address that is compatible with your network. The default is and this will be suitable for many home networks. If you need to use a different address, then open the /sys/config.g file with a text editor and change the IP address in the M552 command a few lines down from the start of the file.

If your Duet has a “4K7” sticker on it, then you also need to change the R1000 parameters in the M305  commands in config.g to R4700. Keep copies of the files in the /sys folder of the SD card on your PC, complete with any changes that you made, so that you can subsequently make changes to these files on the PC and then upload the changed files to the Duet. Now push the SD card into its slot in the Duet until it clicks into place.

You can find more information about the configuration files you need on the SD card here.

2015-01-05 15.31.10Initial checks and firmware update

Do not connect the printer power supply yet! Connect the USB port to your PC. You should see 4 red LEDs illuminate: the USB power LED near the USB connector, and the 3 endstop LEDs. If you move (by hand) each carriage up to its endstop switch in turn, the corresponding endstop LED should go out. To update the firmware, you need the bossac program and associated device drivers. The version you need is the Arduino version, and it’s easier to find in Arduino 1.6.1 than in the later versions. This version is available via http://arduino.cc/en/Main/OldSoftwareReleases. Download and install the package appropriate to your operating system. Once installed, bossac should be in the Arduino application folder. It’s location will depend on your operating system:

  • On Windows, the Arduino IDE is usually installed in C:\Program Files (x86)\Arduino-1.6.1\ or something similar. The bossac.exe program (this may just show as ‘bossac’ – Windows is set as standard to hide the file extension) will be in C:\Program Files (x86)\Arduino-1.6.1\hardware\tools
  • On Linux, you might install the Arduino IDE in /usr/local/arduino-1.6.1/. The bossac program will then be in /usr/local/arduino-1.6.1/hardware/tools/
  • On Apple OS X, bossac is part of the Arduino application package; install the Arduino application in your Applications folder. You can open the software package; bossac will be in Arduino.app/Contents/Resources/Java/hardware/tools/

[Thanks to RepRapPro for the above instructions.]

If you already have a version of Arduino later than 1.6.1 installed, you can instead go to Board Manager and install support for Arduino Due. Then search your computer to see where it has installed bossac.

Download the firmware. Versions 1.00 and later of my RepRapFirmware fork support delta printers, and are available at https://github.com/dc42/RepRapFirmware/tree/dev/Release. To download a file, follow its link and then press the Raw button. Here is the firmware update procedure:

  • Press and hold the Erase button on the Duet for at least one second, then release it.
  • Press and release the Reset button.
  • Identify the COM port number or port name of the Duet board on your PC. If you use Windows, you can do this via Start->Control Panel->System->Device Manager. Expand Ports (COM and LPT), and look for Bossa port. Make a note of the port number. If you can’t find the port, try repeating the Erase and Reset sequence, or disconnecting and reconnecting the USB cable, or try a different USB port on your computer.
  • Use bossac to program the board. Under Windows, open a command shell and use this command:
    bossac.exe --port=COM9 -e -w -v -b -R Firmware.bin

    Replace COM9 in this command by the COM port number you found, and Firmware.bin by the path to and name of your downloaded firmware file.

  • When bossac has completed and reported “Verify successful”, the Duet should reset and start up. If it doesn’t, then press the Reset button.

See https://reprappro.com/documentation/commissioning-introduction/maintenance-duet/#Installation_8211_Flashing_the_Firmware for additional information on upgrading firmware on a Duet.

Checking the thermistors

PrinterWebControlScreenNow you can connect the Duet to your network using an Ethernet cable. Open a new browser tab in Chrome or Firefox and enter the IP address of the Duet in the address bar. Click on the red Connect button and you should see a screen like this one. Check that the Bed and Head 1 temperatures are reading sensibly. If they read about 60C then this generally means your Duet is fitted with 4.7K thermistor series resistors but you haven’t made the changes to config.g described above.

With the older Duet boards fitted with 1k series resistors, it is quite common for temperatures to read a little low when the thermistors are at room temperature. You can correct for this as follows:

  • Use a thermometer to check what your room temperature is. Or you can substitute a 100K resistor for the hot end thermistor and aim for a value close to 25C in the next step.
  • Using the Send GCode box, send M305 P1 H0 with various numbers after the H until the reading next to Head 1 is correct. A value of H20 increases the reading by about 12C.
  • For the bed thermistor, do the same thing but use P0 in the command instead of P1. In theory, you should need the same H value for both thermistors.
  • When you have identified the correct values, edit the copy of the sys/config.g file on your PC. Locate the M305 P0 and M305 P1 commands in the file and change the H and/or R values to the ones you found. Then save the file
  • Upload the file to the Duet by selecting the Settings tab in the interface and then clicking on Upload File(s).
  • Use the Emergency Stop button to reset the printer, then check that the temperatures now read correctly.

If you are using a Mini Kossel that was not built from a kit supplied by T3P3, or a different delta printer, then your hot and/or bed thermistors may have different parameters. You need to find out the R25 (resistance @ 25C) and B values for your thermistors. Then put them into the M305 commands in config.g using parameter T for the R25 value (in ohms) and parameter B for the B value.

When you are getting sensible room-temperature readings from both thermistors and not before (in case the problem is a wiring issue), proceed to the next step.

Applying power and testing the heaters

You can now disconnect the USB cable. Move the carriages by hand a little way down from the endstops. Put a jumper across the 5V_EN pins on the Duet (not to be confused with the ATX_5V_EN pins), connect the power supply, and switch on. Nothing should move. The 3 endstop LEDs on the Duet should light up again (unless the carriages are at the endstops), but the LED next to the USB connector will not.

Immediately, connect via the web interface again, so that you can check that the bed and head 1 are remaining at room temperature, not heating uncontrollably. Check that the hot end fan is rotating and blowing air over the hot end.

Now test the hot end heater and heated bed, by entering a value in the appropriate box or selecting a value from the drop-down menu, and watching the temperatures rise. I found that the bed temperature tends to overshoot by several degrees, so I’ll probably try enabling PID control of the bed at a future date.

Set the temperatures back to zero.

Testing the motors

Send G91 to select relative mode. Then test the motors individually by using the G1 command with the S2 parameter. Be ready to hit the power switch if anything goes wrong. First, send G1 S2 X10 F500. This should cause the X carriage to go slowly up 10mm and stop. Changing the parameter to X-10 should make it go down 10mm. Similarly, test the Y and Z motors by using Y10, Y-10, Z10 and Z-10 in place of X10.

Now try something more ambitious, such as G1 S2 X-50 Y-50 Z-50 F10000, which should move all motors down rapidly by 50mm.

If that is all working, press any of the Home buttons in the web interface. The carriages should all go up to the endstops and stop there, then move down a little, then back up to the endstops again. I have deliberately set the initial homing speed in the homedelta.g file very slow to give you more time to turn the power off if anything is not right.

Once you are satisfied it is working, you can edit the copy of sys/homedelta.g on your PC to increase the initial feed rate to 5000, then upload the file to the Duet using the web interface Upload File(s) button again.

Also test the extruder motor using the buttons on the web interface. Don’t forget to heat up the hot end first if you have filament in it. [EDIT: later versions of Duet firmware have “Cold extrusion prevention” enabled by default, so to test the extruder drive you need to either heat up the hot end, or send M302 P1 to allow cold extrusion.]

See Part 3 of this mini-series for further commissioning and calibration instructions.


Thanks to Think3DPrint3D for providing the Mini Kossel kit and Duet board for this project.

This entry was posted in 3D printing and tagged , , . Bookmark the permalink.

20 Responses to Upgrading the Mini Kossel to Duet Electronics Part 2: Software and Commissioning

  1. Tony says:

    Great work David!

  2. paveldvor says:

    This is excelent, thank you David!
    I’m going to folow you tomorow with my delta conversion to duet.

  3. Doug says:

    Dave Great work so far will be starting my Build this week Have My Duet ready to go.
    But can you tell me what port the web interface uses?

  4. Doug says:

    Thank’s Dave
    I guessed that may be the case I was trying to see if Repetier Host would connect to it using IP but no go there unfortunately.

    I have managed to flash the 0.80f firmware to it and managed to get a motor moving though it does seem to move very slowly but until I get everything hooked up it isn’t worth worrying about till then


    • davidcrocker says:

      I don’t know what IP protocol Repetier Host uses, but it is unlikely to be compatible with the web interface protocol used by RepRapFirmware. The firmware also supports sending gcodes via Telnet.

      Please bear in mind that the delta movement algorithm is not complete in version 0.80f. So do not try movements close to the bed, as the head is liable to go too low and strike the bed. Regarding speeds, I have the motors moving at up to 15000mm/min, which is the limit I have set in config.g. If you are using the web interface, current versions of the web software use a low feed rate when you press the Z axis movement buttons, because it was designed for a Cartesian printer.

      If you have picked up the versions of config.g and homedelta.g that I checked in with firmware 0.80f, then you should be able to home the printer, verify that it is at X=0 Y=0 Z=234 (by looking at the web interface or sending M114), then do G1 Z100 F15000.

  5. Doug says:


    That fact of the web interface explains the slow movements not to worried by that at the moment I just needed to verify that the motors moved (hopefully in the right direction) and I know that I will have to modify the config.g to suit my printer anyway (it will have 1 mtr tall towers with 450mm base extrusion’s and 360mm arms) not sure yet what size it will print to but I have a 300mm round heater on order for it.

    I was aware that 0.80f was not fully functional yet but needed to verify I could load firmware to the Duet and get the motors and endstops wired up properly which I seem to have done successfully.


  6. wayno says:

    Hi David, I’m stuck at:

    ◾Use bossac to program the board. Under Windows, the command to use is:
    bossac.exe –port=COM9 -U true -e -w -v -b -R Firmware.bin

    Is this done in the BOSSA Programmer interface? I can see the bossa port in device manager but the BOSSA interface says it cant connect when selecting the port. I think I’m missing something obvious here.
    Thanks in advance from a obvious non programmer,

  7. James says:

    Hi David,
    Sorry in advance if this question is extremely basic! My printer is for clay and cement therefore does not have a head-bed, extruder motor or required extrude temperature – can I change these settings in the configuration or will I need to adjust the firmware coding?
    Many thanks, James.

  8. James says:

    In fact doesn’t matter as its working fine – what an upgrade! Thank you so much for all your work David the touch panel is a joy and my delta is now printing the full size of the print bed! Its so nice being able to change configuration settings on the sd card. Just waiting on the mini router to get the wireless going too.
    Kind Regards,

  9. Nigel Cook says:

    I have checked Thermistor paramenters and upgraded my T3DP3D provided Duet 0.8.5 board. For my Mk1 Kossel Mini. I upgraded to your lastest firmware 1.09k My Kossel Mini ED3D V6 hotend provivided by T3DP3D and newer heater bed read approx 10 deg C higher than room temp. Despite what I do with the H parameter.

  10. yOOrek says:

    Hi David,
    I am slowly getting ready for a build of a delta printer using lots of your ideas from this blog. Just got Duet board (v0.8.5) from think3dprint3d. One thing that I am not quite clear about in my mind is if I can connect the bare board by USB to my laptop without connecting any steppers, heaters, etc in order to install your version of firmware etc. I would also like to test the web interface. Is connecting and powering the bare board by USB likely to damage things? How about USB and 24V power supply only? I guess I am just impatient and would like to play some before the other parts arrive.

  11. Mortar Art says:

    I’m currently commissioning a Kossel XL using this firmware, and my thermis were reading approximately 32c when I looked at the web interface. Room temperature is approximately 14c currently, as indicated by the 2 active thermis on my MendelMax. I set H0 for both thermis on the delta, and they’re reading 24 & 21c respectively now. Thermi 1 is from an e3d v6, and is plugged into a volcano. Thermi 0 is from robotdigg’s 300mm silicon bed heater.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s