Skip to content

Firmware

Duet - RepRap Firmware

This guide was prepared against the RepRap Firmware version 3.2.2. For an official guide from Duet you can go here which is a very good introduction.

Download

Bellow you will find pieces of Duet configuration files with comment. All files with a boilerplate setup for the V-Core 3 can be downloaded as a ZIP package here.

config.g

Please read

Neither the files in the package or this guide is a complete - copy and paste configuration, please read and make sure to execute operations like PID tuning mentioned bellow.

Start with setting up absolute coordinates but relative extruder moves. Here you also specify the printer name and it's CoreXY kinematic system:

G90                                     ; send absolute coordinates...
M83                                     ; ...but relative extruder moves
M550 P"V-Core 3"                        ; set printer name
M669 K1                                 ; CoreXY
G29 S1                                  ; Set Units to Millimeters

Specify the IP address of your printer (if connected to a network) and define which network protocols should it handle. If you don't know what those are leave only HTTP enabled:

M552 P0.0.0.0 S1                        ; enable network and acquire dynamic address via DHCP
M586 P0 S1                              ; enable HTTP
M586 P1 S0                              ; disable FTP
M586 P2 S0                              ; disable Telnet

Here you define the direction of the motors (S) and their mode of operation (D2 for more powerfull SpreadCycle, D3 for quiet stealthChop):

Motor direction

The motor direction and the S parameter depends on many things, you may find the motors going in the wrong directions - you may need to switch the S parameter and/or swap a pair of wires leading to a motor.

M569 P0.0 S1 D3                         ; physical drive 0.0 goes forwards
M569 P0.1 S1 D3                         ; physical drive 0.1 goes forwards
M569 P0.2 S1 D3                         ; physical drive 0.2 goes forwards
M569 P0.3 S1 D3                         ; physical drive 0.3 goes forwards
M569 P0.4 S1 D3                         ; physical drive 0.4 goes forwards
M569 P0.5 S1 D3                         ; physical drive 0.5 goes forwards
M584 X0.4 Y0.3 Z0.0:0.1:0.2 E0.5        ; set drive mapping
M350 X16 Y16 Z16 E16 I1                 ; configure microstepping with interpolation

Define steps per mm of travel for X, Y and Z axis (the following are for 1.8 deg motors and a Tr8x4 leadscrew):

M92 X80.00 Y80.00 Z800.00               ; set steps per mm
M906 X1000 Y1000 Z800 I30               ; set motor currents (mA) and motor idle factor in per cent
M84 S30                                 ; Set idle timeout

Bellow is where you define what influences the maximum speed of the printer:

M566 X400.00 Y400.00 Z6.00 E120.00 P1          ; set maximum instantaneous speed changes (mm/min)
M203 X10800.00 Y10800.00 Z1000.00 E3600.00     ; set maximum speeds (mm/min)
M201 X3000.00 Y3000.00 Z100.00 E3600.00        ; set accelerations (mm/s^2)

Define where the nozzle is when hitting an endstop:

Bigger printer?

Here is where you would change the maxima for bigger V-Core 3 sizes

M208 X0 Y0 Z0 S1                               ; set axis minima
M208 X310 Y300 Z300 S0                         ; set axis maxima

Configure endstops, here the X endstop defines Xmin and the Y endstop Ymax

M574 X1 S1 P"io1.in"                           ; configure active high endstops
M574 Y2 S1 P"io0.in"                           ; configure active high endstops
M574 Z1 S2                                     ; configure Z-probe endstop for low end on Z

Define lead screw position for true bed leveling

Bigger printer?

Those values will be different for bigger printers, take a close look how those are defined X-4.5:150:304.5 Y-4.52:305:-4.52 meaning that the first lead is at X-4.5 and -4.52, the second at X150, Y305 and so on. Naturally the first (left) lead screw position is the same for all size variants but, taking the second as an example it will land at X250, Y505 for the 500x500x500 version of V-Core 3.

M671 X-4.5:150:304.5 Y-4.52:305:-4.52 S5       ; define positions of Z leadscrews or bed levelling screws
M557 X20:280 Y20:280 P5                        ; define 5x5 mesh grid

Caution!

The following step defines settings for the heating elements, refer to Duet's documentation for guidance.

The actuall PID settings are commented out here only to show where those can be set.

M308 S0 P"temp0" Y"thermistor" T100000 B3950 A"Bed"    ; configure sensor 0 as thermistor on pin temp0
M950 H0 C"out0" T0                                     ; create bed heater output on out5 and map it to sensor 0
M307 H0 B0 S1.00                                       ; disable bang-bang mode for the bed heater and set PWM limit
M140 H0                                                ; map heated bed to heater 0
M143 H0 S110                                           ; set temperature limit for heater 0 to 110C

;; Run Bed PID Tune!! Bellow is an example for a 300x300 bed
;; M307 H0 A303.1 C356.7 D1.4 S1.00 V24.0 B0

Configure the hotend fan and layer fan.

Duet3 6HC users

For the older Duet3 6HC you can use the M950 F0 C"out7" Q500 and M950 F1 C"out4" Q500 ports for fans

M950 F0 C"out3" Q500                   ; create fan 0 on pin out3 and set its frequency
M106 P0 C"Hotend Fan" S0 H1 T45 L255   ; set fan 0 name and value. Thermostatic control turned on for Hotend
M950 F1 C"out4" Q500                   ; create fan 1 on pin out4 and set its frequency
M106 P1 C"Layer Fan" S0 H-1 L255       ; set fan 1 name and value. Thermostatic control is turned off

Define the Tool (which is the print head):

M563 P0 D0 H1 F1           ; define tool 0
G10 P0 X0 Y0 Z0            ; set tool 0 axis offsets
G10 P0 R0 S0               ; set initial tool 0 active and standby temperatures to 0C

M950 H1 C"out1" T1         ; create nozzle heater output on out2 and map it to sensor 1
M307 H1 B0 S1.00           ; disable bang-bang mode for heater and set PWM limit
M143 H1 S250               ; set the maximum temperature in C for heater

Configure the chosen carriage, the example bellow is to EVA 2 / BMG with an E3D V6 hotend.

Caution!

The following step defines settings for the heating elements, refer to Duet's documentation for guidance.

The actuall PID settings are commented out here only to show where those can be set.

M92 E830          ; set extruder steps per mm, 0.9 angle/step (LDO Pancake)
M906 E800         ; set extruder motor current (mA) and idle factor in per cent

M308 S1 P"temp1" Y"thermistor" T100000 B4725 C7.060000e-8 A"Hotend"  
;; Run Heater PID Tune!! 
;; M307 H1 A751.5 C196.6 D4.7 S1.00 V23.9 B0

Z-probe setting, uncomment the lines with your probe of choice:

BLTouch

If you plan to use BLTouch you will also need to uncomment a few lines in homeall.g and homez.g

;; Inductive Probe
; M558 P5 C"!io3.in" H5 F400 T5000       ; set Z probe type to unmodulated and the dive height + speeds
; G31 P500 X-30 Y-15 Z0.20               ; set Z probe trigger value, offset and trigger height, more Z means closer to the bed
;; BLTouch
; M950 S0 C"io2.out"                     ; Create a servo pin on io2
; M558 P9 C"io2.in" H5 F240 T10800 A5    ; set Z probe type to unmodulated and the dive height + speeds
; G31 P25 X-28.00 Y-13.00 Z0.90          ; set Z probe trigger value, offset and trigger height, more Z means closer to the bed

Finally you can calibrate pressure advance, read more about it here.

M404 N1.75 D0.4                                 ; Filament width and nozzle diameter
T0

; Pressure Advance
; M572 D0 S0.10

homeall.g

This file defines the sequence of actions for the printer to take on the G28 - "Home All" request. This example moves the carriage diagnonally to reach the XY endstops and homes Z in the middle of the build surface:

Bigger printer?

The following home files are prepared for the 300x300x300 variant, you will need to modify those for bigger printers to reach the endstops.

; BLTouch
;M280 P0 S160           ; Precautionary alarm release
;M280 P0 S90            ; Ensure the pin is raised

G91                     ; relative positioning
G1 H2 Z5 F6000          ; lift Z relative to current position
G1 H1 X-625 Y605 F3600 ; move quickly to X and U axis endstops and stop there (first pass)
G1 H1 X-625 F1800 ; move quickly to X and U axis endstops and stop there (first pass)
G1 H1 Y605 F1800 ; move quickly to X and U axis endstops and stop there (first pass)
G1 H2 X5 Y-5 F6000       ; go back a few mm
G1 H1 X-625 Y605 F360  ; move slowly to X and U axis endstops once more (second pass)
G1 H1 X-625 F360  ; move slowly to X and U axis endstops once more (second pass)
G1 H1 Y605 F360  ; move slowly to X and U axis endstops once more (second pass)

G90                     ; absolute positioning
G1 X150 Y150 F10000 ; go to first probe point
G30                     ; home Z by probing the bed

G91                    ; relative positioning
G1 Z5 F100             ; lift Z relative to current position
G90                    ; absolute positioning

homex.g

G91               ; relative positioning
;G1 H2 Z5 F6000    ; lift Z relative to current position
G1 H1 X-625 F1800 ; move quickly to X axis endstop and stop there (first pass)
G1 H2 X5 F6000    ; go back a few mm
G1 H1 X-625 F360  ; move slowly to X axis endstop once more (second pass)
;G1 H2 Z-5 F6000   ; lower Z again
G90               ; absolute positioning

homey.g

G91               ; relative positioning
;G1 H2 Z5 F6000    ; lift Z relative to current position
G1 H1 Y605 F1800 ; move quickly to Y axis endstop and stop there (first pass)
G1 Y-5 F6000     ; go back a few mm
G1 H1 Y605 F360  ; move slowly to Y axis endstop once more (second pass)
;G1 H2 Z-5 F6000   ; lower Z again
G90               ; absolute positioning

homez.g

; BLTouch
;M280 P0 S160           ; Precautionary alarm release
;M280 P0 S90            ; Ensure the pin is raised

G91               ; relative positioning
G1 H2 Z5 F6000    ; lift Z relative to current position
G90               ; absolute positioning
G1 X150 Y150 F10000 ; go to first probe point
G30               ; home Z by probing the bed

; Uncomment the following lines to lift Z after probing
;G91              ; relative positioning
;G1 Z5 F100       ; lift Z relative to current position
;G90              ; absolute positioning

bed.g

; this script compensates for what the Z offset is
; so if G31 P500 X-30 Y-15 Z1.7 then first probe will be at
; X30 Y20 (when G30 P0 X0 Y5)

M561 ; clear any bed transform

G30 P0 X5 Y5 Z-99999 ; probe near a leadscrew
G30 P1 X150 Y285 Z-99999 ; probe near a leadscrew
G30 P2 X270 Y5 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors

deployprobe.g

BLTouch

Required only for BLTouch

; deployprobe.g
; Called to deploy a physical Z probe
;
M280 P0 S10                                                         ; Deploy the BLTouch pin

retractprobe.g

BLTouch

Required only for BLTouch

; retractprobe.g
; Called to retract a physical Z probe
;
M280 P0 S90                                                 ; Retract the BLTouch pin

V-CoreOS - Klipper Firmware

Info

This guide assumes you've followed the wiring diagram for the SKR Pro 1.2 and have it connected to a Raspberry Pi 2 or newer.

Introduction

V-CoreOS is a preconfigured software package for the V-Core 3, that aims to make it as painless as possible to get Klipper, Fluidd and Moonraker up and running on your printer. It is developed and maintained by Mikkel Schmidt (miklschmidt#2036 on Discord).

To run V-CoreOS on your V-Core 3 you need an SKR Pro 1.2 (check the offical V-CoreOS docs for other boards) and a Raspberry Pi. The initial configuration is made to work with the official SKR Pro 1.2 Wiring Diagram.

Download V-CoreOS

Preparing the Raspberry Pi

Download the newest release (includes a firmware.bin and a vcoreos-*.zip file under the assets dropdown) of VCoreOS on github. Then follow The offical raspberry pi guide to write that image to the SD card that goes into your raspberry pi (8GB or larger)

Note: this will destroy all data on the card!

WIFI (Optional)

Warning

Do NOT use a textprocessor such as Wordpad, it will mangle the file and your pi won't boot. Notepad, Notepad++, VSCode are all fine.

When the process is complete, find the /boot volume / folder on the sd card. If you're having trouble finding the boot volume, try reinserting the SD card into your PC. Edit the vcoreos-wpa-supplicant.txt file found on the boot volume in a text editor and fill out your wifi information. Note the country code at the bottom of the file.

When that is done reinsert the SD card into the Raspberry Pi, but don't turn on your printer / Raspberry Pi just yet.

Preparing the SKR Pro

Move the firmware-skr-pro-12.bin file that you downloaded in the previous step to the SD card that goes into your SKR Pro and rename it to firmware.bin, then reinsert the SD card in to the SKR Pro.

Setup

With SKR Pro 1.2 connected via USB to your Raspberry Pi, turn on your printer. After a minute or two, open your browser and navigate to http://v-coreos.local/

Configuration

In the settings page in Fluidd, there's a list of files, among them should be a printer.cfg. Right click that and choose "Edit". This is where your klipper configuration lives. As you can see, it's prepopulated with some included files which are meant to get you up and running quick and easy. Follow the instructions in the file to make sure the configuration matches your setup.

Updating

In the settings page in Fluidd, you'll see a sheet with the title "Update Manager", if you're familiar with Fluidd or Mainsail, you'll notice a new entry called vcore3. This vcore3 package will update all the config files in the v-core-3 folder, improvements, support for hotends, extruders etc, will be coming to your printer this way in the future.

Finalizing

You'll need to adjust your endstop and probe z-offset before printing and be sure to run PID tuning for your extruder and your bed. After that it's advisable to run Pressure Advance tuning, Input Shaper calibration and Skew Correction.

An easy way to do probe z-offset calibration is to home the printer, then put a piece of paper underneath. Now babystep Z through the Fluidd interface (or by issuing G0 commands through the console) until the nozzle touches the paper and there's a tiny bit of resistance when you pull on it. Then write "GET_POSITION" in the console and find the line that says // kinematic: ... And use the Z coordinate from that line, multiplied by -1. So if it says // kinematic: X:0.000000 Y:0.000000 Z:-0.400000 Your probe's z_offset will be 0.4.

Troubleshooting

If klipper won't connect, try restarting your raspberry pi. Make sure the SKR Pro is connected to the Pi via USB, that both are powered, and that the firmware.bin has been properly flashed. You can verify the last part by checking if the firmware.bin file has been changed to firmware.CUR on the SD card. If you have trouble flashing the motherboard (a green light should flash while booting, indicating the firmware has been flashed succefully), try disconnecting your endstops, if these are wired incorrectly the board will not boot properly.

If any of your axes are inverted, tripple check your wiring. It's important to note that this config is made specifically for the SKR Pro 1.2 and the 48mm LDO's that ship optionally with the V-Core 3. For other steppers, you'll have to check the stepper pinout and potentially move pins on your cable, or you can override the stepper dir_pins as needed in your printer.cfg after the steppers.cfg file has been included, like so:

[stepper_x]
dir_pin: PF1

For further support check out the v-coreos and klipper channels on the Unnofficial RatRig Discord Community.

(Optional) Input Shaping using an ADXL345

If you want to use an ADXL345 for automatic input shaper calibration, all the software you need is already installed on the pi, you just need to wire and map the pins for your ADXL345, and you're good to go. Check the ADXL345 dropdown in the bottom of the electronics page for a visual guide of how to wire the ADXL345 to your SKR Pro 1.2. For wiring the ADXL345 to other boards supported by V-CoreOS, checkout the official V-CoreOS documentation. To enable resonance testing, uncomment the adxl include section at the top of printer.cfg. To verify that your ADXL is properly connected, write MEASURE_AXES_NOISE in the Fluidd console, if the values are below 100, you're good to go. To calibrate input shaper, write SHAPER_CALIBRATE in the console. For more information on automatic input shaper calibration, check out the official klipper documentation.

Software Credits

V-CoreOS is based on Klipper, Fluidd, MainsailOS and FluiddPi, without these and the amazing people behind them, V-CoreOS would not have been possible.

Official V-CoreOS Documentation

For the most up to date information and documentation about V-CoreOS check the Official V-CoreOS Documentation Site