Contents
There are six pieces of software used by the RepRapPro Mendel:
- Arduino IDE (Integrated Development Environment) – used for device drivers, basic communication, problem solving,
- The RepRap firmware – this controls the hardware functions of the Duet board,
- Pronterface – used for communication and control over the USB connection,
- Google Chrome or Firefox – used for controlling the Duet via the web interface,
- Slic3r – used for translating 3D files into the g-code, which controls the movements of the printer, and
- The Mendel 3 files – profiles for Slic3r, and all the files you need to print another Mendel 3.
A lot of this software is stored on Github. To download from Github select the branch that you require (unless you are experimenting, this will be “master”), then click the Download ZIP button:
IMPORTANT: note about USB 5V power
When using the Duet with 5V power supplied by the USB cable only (i.e. no power supply unit – PSU – power), you may find that the board doesn’t respond correctly. The web interface, SD card reading, IR sensor may all be unreliable. Three different voltages are used on the Duet: 12V for motors, fans and heaters, 5V is used to drive the MOSFET gates, and is converted to 3.3V for most other parts of the board (the ARM processor chip, thermistors, stepper drivers, proximity sensor, SD card, USB, and Ethernet).
It’s possible that your 5V USB power source (usually your computer) doesn’t supply enough voltage, or current, to power the Duet, particularly if you’re working through a low quality USB power supply, an unpowered USB hub, or a laptop with low power USB ports. The Raspberry Pi, which uses a similar ARM chip, also has this problem. Plugging all the other connections in may also drain enough power to cause problems. A way to test this is to check the actual voltage of the 5V and 3.3V power lines. You can measure the 5V on Pin 1 of the expansion header, 3.3V on Pin 3 – these are the pins closest to the heated bed connection, just under the ‘SION’ of ‘EXPANSION’. Anything below 4.5V on the 5V line will make for a marginal 3.3V supply, and could cause a multitude of strange effects on the board.
The Duet will work correctly when 5V is supplied by the PSU, but don’t plug this in yet! If your USB power is not good enough, then routing the USB from your computer through a powered USB hub will usually work.
Establishing communication with the Duet
This first section should be done with the PSU disconnected from the mains.
The Duet electronics board is based on the Open Source Arduino Due board, with the addition of ethernet, stepper drivers (to control the stepper motors), SD Card slot, temperature sensing and other inputs and outputs needed by a 3D printer.
First connection
Download the latest version of Arduino IDE (with Arduino Due support) for your operating system from: http://arduino.cc/.
Install Arduino IDE. Make sure you do this BEFORE connecting the Duet, so the correct device drivers are installed.
Connect the USB cable to the Duet, making sure it is pushed all the way in, then connect the other end to your computer.
Looking at the Duet board, an LED should light up, near the USB connector. See the important note above about 5V USB power if it does not. If your Y-axis endstop is fitted, a second LED will light up near this connection on the board. It will be lit if the Y carriage is away from the endstop, and will go out if you move the Y carriage until it touches the microswitch. Try this as a test.
The device drivers should be found by your computer and installed automatically. If you have any problems, see the troubleshooting guide here.
Open the Arduino IDE and go to Tools->Board menu and select ‘Arduino Due (Native USB)’. If this is greyed out, check the device drivers have been installed.
Then go to Tools->Port menu and select the USB port for your printer.
Then go to Tools->Serial Monitor. Make sure the speed is set to 115200 (bottom right) and that Newline is selected (next to the speed).
Wait for 1 minute (this is normal when no ethernet is connected and the firmware is searching for the network), and following should show:
RepRapFirmware is up and running.
If no message is received (it may have already been sent, before you connected), in the top part of the Serial Monitor window, type, then ‘Send’:
M105
This asks the printer for its temperatures, and you should get a response from the machine, similar to this:
T:5.3 B:18.4
If you get no response, close the Serial Monitor window, unplug the USB, check the Arduino settings and try connecting again. Wait for 1 minute after plugging in the USB. If you continue to have problems, see the troubleshooting guide here.
If you get negative temperatures, or no temperatures, on either the hot end or heated bed thermistor, it usually means the thermistor is disconnected, or shorting out. Check your thermistor wiring.
What to do if it isn’t working?
See the note at the top of the page ‘IMPORTANT: note about USB 5V power’. If the power is low, it can cause strange problems, such as odd temperature readings, failure to read the SD card, and failure to interface to the Ethernet. If you don’t have any other USB power source available, turn off the Duet, remove the motor and heater wires from the board, put a jumper on JP10 ATX_5V_EN and connect the power supply. See the later section ‘Now connect the power supply unit’ for full details, but return to this point, and try connecting again.
It’s also possible that the USB socket on the Duet is loose, and the USB lines have broken. Check the USB socket; it has four legs that go through the board. All four of these should be soldered, to hold the socket firmly on the board. If they are not, you can solder them yourself; this is easier from the back of the board. If you still get no response, contact support.
Check the ‘Duet software connection problems’ section of the troubleshooting guide HERE.
Update your firmware!
Your Duet will have been supplied with firmware flashed in its microcontroller. Now you have established communication with the Duet, it’s a good idea check you have the latest version, and to update the firmware on the Duet if not. See here for how to do that. We will be adding features and squashing bugs regularly, to improve the usability of your printer, so check often.
No, really, update your firmware!
Recent updates have improved network connectivity, improved USB communication, improved accuracy of thermistors, improved the SD card reading, fixed homing problems, fixed printer stopping problems, and many others. So please, to save yourself potential frustration, update your firmware.
To check your firmware version, connect to your Duet board via the Arduino IDE Serial Monitor and send the ‘M115’ gcode. The response should be something like:
FIRMWARE_NAME:RepRapFirmware FIRMWARE_VERSION:0.78c ELECTRONICS:Duet + Extension DATE:2014-09-18
Compare the firmware version information from your response to M115, with the file name of the file in this link, which is on our github page. But DO NOT DOWNLOAD THIS FILE DIRECTLY! See here for the full firmware update instructions.
Following updating the firmware, don’t forget to update the SD Card with the latest files from the ‘SD-image-Mendel-3’ folder (see next section if you have yet to do this). You should always keep these files concurrent with the firmware version.
Check SD card Settings
Your printer was supplied with an SD card, and an adapter. Put the SD card in the adapter (if necessary), and into your computer – it should appear on your desktop. The SD Card is used for storing settings, serving the web pages of the web interface, and has some test gcode files for printing.
Download the RepRap firmware from our Github repository. Do this by going to the page, and clicking the ‘Download ZIP’ button on the right hand side. Extract the ZIP file once downloaded.
In the extracted directory is a directory called ‘SD-image-Mendel-3’. Open this, and copy the contents (three directories – gcodes, sys and www) to the root of the SD card, so that they are the first thing you see when you open the SD card.
Eject the SD card, remove it from the adapter, and put it into the SD card holder on the Duet. It should click in.
Is the SD card being read?
Connect the USB cable to the Duet, and connect to it using the Arduino Serial Monitor, as above. Wait for 1 minute, and you should then see (again):
RepRapFirmware is up and running.
In the top part of the Serial Monitor window, type (without quotes) ‘M503’ and press ‘Send’.
The response should be similar to:
; Configuration file for RepRap Mendel 3 ; RepRapPro Ltd ; ; Copy this file to config.g if you have an Mendel 3 ; If you are updating a config.g that you already have you ; may wish to go through it and this file checking what you ; want to keep from your old file. ; M111 S0 ; Debug off M550 PRepRapPro Mendel 3 ; Machine name (can be anything you like) M551 Preprap ; Machine password (currently not used) M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0x14 ; MAC Address M552 P192.168.1.14 ; IP address M553 P255.255.255.0 ; Netmask M554 P192.168.1.1 ; Gateway M555 P2 ; Set output to look like Marlin G21 ; Work in millimetres G90 ; Send absolute corrdinates... M83 ; ...but relative extruder moves M906 X800 Y800 Z800 E800 ; Set motor currents (mA) ;M305 P0 R4700 ; Set the heated bed thermistor series resistor to 4K7 ;M305 P1 R4700 ; Set the hot end thermistor series resistor to 4K7 M569 P0 S1 ; Reverse the X motor M569 P3 S0 M92 E660 ; Set extruder steps per mm M558 P2 ; Use a modulated Z probe G31 Z0.6 P550 ; Set the probe height and threshold (deliberately too high to avoid bed crashes on initial setup) M557 P0 X40 Y0 ; Four... M557 P1 X40 Y200 ; ...probe points... M557 P2 X200 Y200 ; ...for bed... M557 P3 X40 Y0 ; ...levelling M556 S78 X0 Y0 Z0 ; Put your axis compensation here M201 X3000 Y3000 Z150 E500 ; Accelerations (mm/s^2) M203 X15000 Y15000 Z100 E3600 ; Maximum speeds (mm/min) M566 X1200 Y1200 Z30 E1200 ; Minimum speeds mm/minute M305 P0 T10000 ; set bed thermistor resistance at 25C M563 P1 D0 H1 ; Define tool 1 G10 P1 S-273 R-273 ; Set tool 1 operating and standby temperatures
If the SD card is not inserted, or not being correctly read (the error code may be different), you get:
Can't open 0:/sys/config.g to read from. Error code: 12
Configuration file not found
Check that you have inserted the SD card properly. If you have further problems, there is an SD card troubleshooting guide here.
Is the SD card being read AT STARTUP?
The easiest way to test if the card is being read at startup is to open the Arduino Serial Monitor, connect, and then send a command, like M105. The correct response should be:
serial: M105 ok T:-273.1 B:-273.1
The important thing is the ‘ok’, which means the M555 P2 (Emulate Marlin USB output) command has run. If you send M105 and get:
T:-273.1 B:-273.1
(without the command echoed, and no ‘ok’) the config.g has NOT been read at start up.
What to do if it isn’t working?
There is an SD card troubleshooting guide here.
Setting the temperatures correctly
Duet boards shipped after mid-October 2014 (in kits and as spares) have had a change made to the thermistor circuit, to make the temperature reporting more robust. To identify if you have a newer board, check if there is a sticker on the Ethernet socket on the Duet board. If there is, and it says ‘4.7k’, as in the following picture, you need to make a change to the printer configuration file, config.g.
If you don’t make this change, your temperatures will report very high at room temperature (25C) on both the hot end and heated bed, and will not be accurate at the target temperature (this is, at least, safer than under-reading!); something like:
T:59.5 B:63.6
To edit the config.g file, open the version in RepRapFirmware/SD-Image-Mendel-3/sys/ that you downloaded earlier, in any text editor. NotePad on Windows, or Text Edit on Mac, can open it. All gcode files, that the printer uses to print, are text files, and can be opened in the same way. Make the following change:
;M305 P0 R4700 ; Set the heated bed thermistor series resistor to 4K7 ;M305 P1 R4700 ; Set the hot end thermistor series resistor to 4K7
to:
M305 P0 R4700 ; Set the heated bed thermistor series resistor to 4K7 M305 P1 R4700 ; Set the hot end thermistor series resistor to 4K7
by deleting the semi-colon on the front of the these lines in the config.g (line 20 and 21). Save the edited config.g. Turn off power to the printer (remove the USB cable), and remove the SD card from the printer. Copy the new config.g onto the SD card in its sys folder, replace the SD card in the printer, and turn it back on (reconnect USB). You can also remove the SD card with the power on, but press the reset button on the Duet when you reinsert it, or cycle the power. Any changes that you make to the config.g in future (setting up ethernet, or editing other settings) can be done in the same way.
Connect via Pronterface
Pronterface is used to control the printer’s basic functions, via USB. Any version of Pronterface should work with the Duet, though we supply a customised version for our customers.
Installation
Windows
- Download the current version from https://github.com/reprappro/Software (click ‘Download ZIP’ on the right hand side).
- Once downloaded, extract the ZIP file. Rename the ‘Slice3r-win’ folder to ‘Slic3r’. Note: 64-bit version of Slic3r! If you are using a 32-bit version of Windows, download the correct version from Slic3r.
- To run Pronterface, double-click ‘ormerod.cmd’, NOT Pronterface.exe directly. This will set Pronterface up correctly for Ormerod, with the correct buttons.
Mac
Download the pre-compiled version of Pronterface for Mac, and extract the zip file. The Mac version of Pronterface is somewhat limited at present; USB communication is slow, so do not print directly from Pronterface, always print from the SD card. See the Printing section, HERE.
Linux
- Download the current version from https://github.com/reprappro/Software (click ‘Download ZIP’ on the right hand side).
- Once downloaded, extract the ZIP file. Rename the ‘Slice3r-unix’ folder to ‘Slic3r’.
- Install the dependencies; see the instructions HERE.
- To run Pronterface, double-click ‘ormerod.sh’, NOT Pronterface directly. This will set Pronterface up correctly for Ormerod, with the correct buttons.
Running Pronterface
Once installed, close the Arduino Serial Monitor if it is still open. Only one program can connect via USB at time, either Arduino Serial Monitor OR Pronterface. Connect the USB cable to the Duet, then run Pronterface.
Select the USB port that your computer has allocated the Duet in Pronterface’s ‘Port’ box, select a communication speed of 115200, and click the Connect button.
As before, wait for about a minute, and the software will confirm when the printer is online.
Press the GET POS button, and if the machine returns a position of X0.00 Y0.00 Z0.00 your serial communication is functioning correctly.
Check temperatures
Pronterface reports the temperatures in the bottom left of the window in the form ‘T:15.7 B:21.8’. ‘T’ is for the ‘Tool’ (the hot end) and ‘B’ is for the heated bed. You can also turn on the graph by ticking ‘Watch’, which will auto-update the temperatures. If you get a stream of temperatures in the ‘log’ window (on the right), the SD card hasn’t been read at start up (see ‘Is the SD card being read AT STARTUP’ above), and the Duet has not started in ‘Marlin emulation’ mode, which Pronterface needs. Reset the printer, check the SD card is working (try another if it is not), and reconnect Pronterface to the Duet board.
The above picture shows the temperature reported at room temperature. However, the temperature may report significantly higher or lower than this. If the temperature is reported as:
T:B:-59.9
This means that, at startup, the firmware has seen a problem with the first hot end, and disabled it (so there is no temperature reported), and that there is also a problem with the heated bed thermistor circuit. If a temperature is too low, then there may be an open circuit. If it is too high then there is probably a short circuit in the corresponding thermistor circuit. In either case, find the fault and fix it before you go on. If the temperatures are both reported at around 60C, see the ‘Setting the temperatures correctly’ section above.
Check the settings by sending ‘M503’ by typing it into the command line in the bottom right hand side of the Pronterface window. The settings will scroll above the command line, in what we call the log window. This establishes that Pronterface is talking correctly to the Duet, and it is responding correctly.
Now close Pronterface, and disconnect the USB lead, to turn off the Duet.
Now connect the power supply unit
The PSU will supply the motors and heaters with 12V, while the logic is supplied with 5V. Make sure that there is a jumper on the JP10 (ATX_5V_EN) pins (see picture below for location of jumper). With no USB lead connected, the only lights to turn on will be the Y axis endstop light (if fitted, it will be lit if the Y carriage is away from the endstop, and will go out if you move the Y carriage until it touches the microswitch) and the lights under the ethernet socket, if an ethernet cable is connected.
Plug in the USB and run the Pronterface program. Click “Connect” and wait for your RepRap to appear online. The heated bed and the hot end are the two parts of the printer that may cause damage as they are high-current devices; we check them first, in case there are any problems that have caused a fault. Tick the ‘Watch’ check box (or ‘monitor’, depending on Pronterface version) to report the temperatures of your heatbed and nozzle. Ensure that the readings are similar to the ambient temperature of the room. If they are not, check connections. Usually, if they are very low (-273), this indicates the thermistors are not connected. If they are very high, this means a short circuit. Command the nozzle to 100C, by typing ‘100’ in the box next to ‘Heater’, and watch the temperature rise, overshoot slightly, and eventually settle around 100C. When the hot end heater is on, an LED on the Duet PCB, near the heater loom connection, will turn on. Keep an eye on the nozzle during this test. If you see lots of smoke come out of the hot end, turn off the heater and check your wiring. You may have a short circuit or poor connection on the heater wires, or to the heater block, or there may be some contamination around the heater block. Repeat the test with a target temperature of 200C. The nozzle should reach the target temperature in about 1 minute or less and settle within a couple of degrees of 200C. Some smell of oil burning off is not unusual – it’s the oil from machining the parts – but should dissipate after a minute. Press ‘Off’ next to ‘Heater’ to turn off the hot end. Command the heated bed to 45C (warm), by typing ’45’ in the box next to ‘Bed’, and click ‘Set’. When the heated bed is on, an LED on the Duet PCB, near the heated bed connection, will turn on. Verify that the heatbed temperature reading rises and stabilises around 45C, and that the heated bed is actually warm. Again, check connections are not getting hot or smoking. This generally indicates a poor or loose connection; tighten and retest. The heated bed will heat up much more slowly than the hot end. Press ‘Off’ next to ‘Bed’ to turn off the heated bed. Now type in the following command in the command line: in the field below the log window and click Send. The X-carriage should move to 5mm in the positive direction (X5) at 500mm/min (F500). This should be in the direction AWAY from the X motor; if it isn’t, check your wiring, as you may have the X axis motor reversed. You MUST turn off the printer to change any motor wires, or you risk destroying the stepper drivers. Assuming it moved in the correct direction, now type: and send. The X-motor should move back to wherever it started (X0). Repeat the above test for the Y axis, replacing the ‘X’ in the above command with ‘Y’. This will move the heated bed, on the Y-carriage. A positive move is away from the Y motor, a negative move is towards the motor. For Z, make the feedrate 200 mm/minute: This will move the Z axis up 5mm. You can also use the ‘jog dial’ on the left hand side of the Pronterface window to move the axes. To turn the motors off, press the ‘Motors off’ button above the jog dial. ‘Homing’ sends an axis to the end of its travel, and hits an endstop, which gives the printer a reference point. Then it will know where the bed is, relative to the nozzle. The proximity sensor is used to ‘home’ the X and Z axis. For the proximity probe to work correctly, the SD card MUST be working at startup; the ‘M558 P2’ command turns the proximity sensor (also known as the Z Probe) on. You can enter this command separately if the SD card is not in the printer, or did not work at startup. Move the X and Y axis (by hand – ‘Motors Off’ first – or using the Pronterface command or jog dial) so it’s over the bed, and lift the Z axis so the nozzle is at least 20mm from the bed. To check that the proximity sensor is working correctly, send the following command: With axis a long way from the bed (say, over 20mm), the response should be a low number, like 20. Put a piece of white paper under the sensor, very close, and send ‘G31’ again. The response this time should be a very high number, like 950. This is the normal range for the sensor, and needs to be correctly working before testing the ‘homing’. If you do not get numbers in this range, refer to the proximity sensor troubleshooting guide HERE. Send a homing command for the Y axis first. Either press ‘Y’ homing button in Pronterface (above the ‘dial’ on the left of the Pronterface window), or use the homing command: for example The Z and X drives will move the machine to allow Y to home, then the Y carriage should move towards the Y microswitch and hit it. It then does a little bounce (a move away from the switch and back at much lower speed) to get a more accurate position. If the wiring for the microswitch is not connected properly the Y carriage will hit the end and try to move against it. This will stop after a few moments. Don’t worry, no damage will be done (though you should avoid doing this regularly as that may loosen some components eventually). Check the wiring for the microswitch; it is possibly disconnected, or connected to the wrong pins on the Duet. There is an LED on the Duet above the Y motor connection. It will normally be on, and will go out when the Y endstop switch is hit. Move the bed to the Y motor end by hand, and check that the LED goes on and off when the Y carriage activates the microswitch. The X axis endstop is not a microswitch; the Mendel uses the proximity sensor for X homing. This is triggered by the bar that sticks out from the x-motor-bracket. It is important that the X carriage can pass by the electronics housing; this should have been checked earlier in the build. Check that the polarity of the wires connected to the sensor are correct – see the ‘Wiring’ instructions. Press ‘X’ homing button in Pronterface, or use the homing command: The X carriage should move up a few millimetres, and then move towards the Z axis. It should stop before it hits the end. If this does not work correctly, and it does not stop at the end, and keeps going until it clatters against the X motor, refer to the proximity sensor troubleshooting guide HERE. Finally, home the Z axis. Again, this uses the proximity sensor. Press the ‘Z’ homing button in Pronterface, or use the homing command: The X carriage should move out, to be over a corner with the paper target underneath, then move down and stop. Initially, the nozzle will be some way from the bed; you will correct this by following the ‘Calibration’ instructions. Use of the RepRapPro version of Pronterface, with extended features for the Duet, is documented here. To use the web interface, you need to connect an ethernet cable from the Duet to your ethernet hub, switch or router. The Duet will need to be powered, either by USB or the PSU – it cannot be powered by the Ethernet cable. It is possible to connect the Duet directly to your PC, with an ethernet cable, if your PC has a spare ethernet port, and can connect to your network and the internet by another ethernet port, or wifi. There are two ways of doing this; plug in an ethernet cable to your PC and the Duet, and either ‘bridge’ your PC ethernet connections (one connected to the printer, the other to your network – see Microsoft link here for details), or set up the spare ethernet port of your PC as a separate network subnet, and change the config.g of the Duet to match the ethernet port of your PC. You PC will still need to have access to the internet (via another ethernet port or wi-fi) for the RepRapPro web interface to work. You need three or four pieces of information to set up the Duet for your network: IP address, netmask, and gateway IP address. Also, for several printers on one network, you will need MAC addresses in addition. Often, small networks are set up using DHCP, which assigns IP addresses automatically to the devices that connect to the network. The Duet, at the moment, doesn’t use this; you need to set the IP address manually. If you are on a network used by several people, consult your network administrator about this. If you are running your own network, read on… By default, the settings in sys/config.g on the SD card are: If you’re on a Windows computer, check that the settings you use on your network by opening a Command Prompt and sending ‘ipconfig’. This should respond with something that includes: On a Mac OS X, look at the ‘Network’ preferences panel to get the information. On Linux, look in the Network Manager, or in a terminal window type ‘ifconfig’. This will show the settings you need to put in config.g for these two settings: For the last setting, the IP address, choose a number that is 10 higher or lower than the address listed by ipconfig. In the example above, it lists 192.168.1.66, so set: If you need to edit these settings, edit the config.g file in RepRapFirmware/SD-Image-Mendel-3/sys/ that you downloaded earlier. Then copy the new config.g onto the SD card in its sys folder. If you have several Duets on one network, each will need a unique IP address and a unique MAC address. You can simply increment the last number in the IP address for each new machine. The MAC address is set by the line in config.g that says: M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED The code is M540 followed by parameter P immediately followed by six hexadecimal numbers in the format 0xUV where U and V are in the range [0..F] separated by colons. See here for more details on MAC addresses; you are setting a locally administered address. For single-machine installations, leave the numbers alone. For multiple Duets on one network, decrement the last of the six numbers for each additional Duet. Connect the ethernet cable to the Duet, and the hub/router/switch at the other end. The GREEN LED on the ethernet connector should light up, and flicker. The Orange LED is a indicator light for 10base-T connections – most ethernet hubs/routers/switches are 100base-T or gigabit, so that will stay switched off. At the moment, only Google Chrome and Firefox are supported. Other browsers may also work, but need to be tested for full compatibility. Run the browser, and enter the IP address you set in config.g into the address bar; for example, 192.168.1.76 (from the example above) If the web interface is correctly set up, you should be presented with a connect screen: If you have multiple Duets on your network you can open an interface to each one in turn from a new tab in your browser. Keep track of which is which by referring to the IP address at the top of each page. More in-depth use of the web interface is documented here. If you have problems with any of the steps on this page, particularly connecting to the Duet, see the Troubleshooting section of the instructions. If you spot any mistakes in these instructions, please email your feedback to the support email address.Testing machine control
Test the heaters
Hot end
Heated bed
Test axis movement
G1 X5 F500
G1 X0 F500
G1 Z5 F200
Test the proximity sensor
G31
Test axis homing
G28 Y0
G28 X0
G28 Z0
Pronterface – RepRapPro Duet features
Connect via the web interface
IP address: 192.168.1.14
netmask: 255.255.255.0
gateway: 192.168.1.1
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . : lan
Link-local IPv6 Address . . . . . : fe80::45dc:fdd3:67dd:db47%11
IPv4 Address. . . . . . . . . . . : 192.168.1.66
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.254
M553 P255.255.255.0; Set netmask (Subnet Mask)
M554 P192.168.1.254; Set the gateway (Default Gateway)
M552 P192.168.1.76; Set the IP address
Problems?