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 192.168.1.14 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.
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
Now 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.