Recalibrating Home-position

I got myself the Ender 3. The Home position is about 1 mm left and 2 mm in front of the front left corner. Now, the hotend center axis is 11 mm from the carrier plate with the "Mk 10" cooler mounted right onto a pair of 5 mm pegs that are part of the plate. As I want to change to an e3D v6, which has a diameter of 22 mm, I will have to move out some distance (ca. 13 mm) to the current Z axis. This means, that any Y command will be off by this distance.

How do I reconfigure the Home position to have an offset to the 0-positions gained from the limit switches?

According to Repetier Host it runs on Marlin 1.0. Creality offers the firmware on their website as a .hex file - which is hard to edit.

• Basically, you want to center the nozzle in the middle of the bed from what I understand from your question. When the nozzle is in the center all other dimensions are correct also. I have described how you do that in How to center my prints on the build platform?. Solution 2 and 3 are firmware, not slicer solutions, and do exactly what you want. Once you have centered the nozzle in the middle of the plate, the nozzle will be at the origin (0,0), so the corner of the plate. – 0scar Jul 14 '18 at 21:31

When homing the printer, the hot end carriage will be instructed to hit the (mechanical or optical) end stops. From this point a well configured firmware knows where to find the origin of the heat bed.

For the printer to know the origin of the bed, offsets are defined in the firmware from the end stop locations to the actual origin of the heat bed.

E.g. in Marlin Firmware this is defined by

 #define X_MIN_POS -35 ; move the head 35 mm to the right to place the
; nozzle at X = 0
#define Y_MIN_POS -8  ; move the head 8 mm to the back (or the plate
; forward) to place the nozzle at Y = 0


When you change the hardware (e.g. carriage), you need to re-calibrate the movement from the end stop location to the origin of the bed. Note that any arbitrary point on the heat bed can be used to re-calibrate this. E.g. the center of the bed can also be used, and is frequently much more easy to re-calibrate as the heated beds usually have rounded corners or are slightly larger than the actual print area (e.g. I have a 300 x 300 mm heat bed that actually measures 315 x 315 mm). Printing a large square on the heat bed will therefore give you a good impression of the offset of the nozzle due to your new carriage design.

Note that, if you cannot or will not flash new firmware, an alternative solution exists to set new incremental offset values using the M206 command IF your current firmware supports this.

A detailed description to re-calibrate is found in answer How to center my prints on the build platform? or in external link Bed center calibration.

• Your answer skips over essential stepts, now that I actually am testing it: 1) how to get the firmware settings currently installed? 2) How to implement the changes via Repetier Host? 3) How to upload the modified Firmware? – Trish Aug 12 '18 at 11:25
• You could improve the answer massively by including 1) M503 to get the current Firmware settings. 2) indicating which files of a Firmware Configuration usually contain these commands and 3) mention that one usually uses an arduino as Bootloader to flash new firmware and link to a tutorial for this. – Trish Aug 13 '18 at 19:59
• @Trish Getting, changing and uploading is already described in another question, but very nice you have figured out to compile it on your board! Good to hear it works out! – 0scar Aug 13 '18 at 21:39
• just... had to pretty much reverse engineer parts of the ender3 XD – Trish Aug 13 '18 at 21:42
• oh god, I just realized how much I learned in the last 1.5 years about firmware... back then I was a noob, now I instruct on how to do this by pointing back to this question! – Trish Mar 10 at 8:15

To change or obtain your EEPROM settings you need to open Repetier Host (for Linux or Windows, v2.1.3 - the OSX version I tried, v1.1.0, didn't seem to have this functionality).

To change existing settings

From How to make changes to the EEPROM data. Apparently there is an EEPROM editor available (in Repetier Host). From this post:

If you see it in eeprom editor just change them. If it is repetier-firmware based it will store changes in eeprom on pressing "ok".

To retrieve existing settings

This post from retrieval of existing settings..., shows how:

To copy eeprom data:

• Connect with host
• Open eeprom settings
• Select export eeprom settings. That saves all data in a epr file and you can later use import eepsom settings to rewrite it.

An example of the resulting file is shown in the question, Help with Repetier firmware variables (Dimension Dual Delta - J Group Robotics), a sample of which I have included below:

<Repetier-Firmware-EEPROM>
<epr pos="1028" type="0" value="0">Language</epr>
<epr pos="75" type="2" value="115200">Baudrate</epr>
<epr pos="129" type="3" value="32.752">Filament printed [m]</epr>
<epr pos="125" type="2" value="21644">Printer active [s]</epr>
<epr pos="79" type="2" value="0">Max. inactive time [ms,0=off]</epr>


However, you would appear to have to be running Repetier firmware for these two solutions to work, and not Marlin (but I may be wrong).

Greenonline and I spent this evening hacking/reverse engineering the Ender3 to solve this. Greenonline also wrote about this in his blog.

Step 1 - Get the Firmware

To do this, there are basically two ways:

1. Find the a ready-to-use firmware

Variant 1 would be to use the pre-supplied .hex files from Creality or some other manufacturer. Variant 2 means writing the settings yourself or using Repetier firmware to write the files for you. In the case of the Ender 3, the chip used sadly disqualified Repetier firmware, so writing it yourself is the only option.

To write the firmware yourself or using Repetier firmware, you need the old settings. To get these, connect the printer via USB, connect it with a software like Repetier host and send M503 to get all the settings.

Now, either hack those into Repetier firmware or use a blank Marlin.ino and the Arduino IDE to customise it. In the later case, you need to put the folder Marlin-?.?.X.ZIP/Marlin-?.?.X/Marlin into the Arduino folder in Documents (Windows) or Home (Mac). Now open the Marlin.ino in Arduino IDE. Set up the new firmware with these base settings or adjust as needed.

Now that we have our Configuration files (in the end we pretty much skipped step 1 and grabbed a fitting (German!) one from Christian, a German maker also known as "Chaos-Drucker"), we need to first adjust them as needed to fit our needs and then compile them properly (next step!). As an alternative (English!) base to work with, the TH3D firmware is also available, provided by the Hooglands and team at TH3D.

So, let's open your Marlin.ino with arduino and find the X_MIN_POS (CTRL+F > X_MIN_POS > Search all sketches).

In the configurations we grabbed the sketch file Configuration.h contains lines 786-789 (might differ):

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -10
#define Y_MIN_POS -15
#define Z_MIN_POS 0


Adjust these till the wanted position is achieved - Repetier Host can help here to determine the right position.

Step 3 - Compile

The hardest step with the Ender3 was to get the code to actually compile, as it uses an ATmega1284P 16Bit which isn't supported by Arduino natively. While the MightyCore supports this chip, it doesn't compile with this hardware library. However, Christian did figure out that the Sanguino set to an ATmega 1284P 16bit does work. These belong as extracted folders into the Arduino/hardware folder, usually in your Documents (if you use Windows) or Home (on mac). Now, we did set Tools>Board:> Sanguino and Tools>Processor:>ATmega1284 or ATmega1284P (16 MHz)

It was also mandatory to have the U8glib.h for Arduino installed. To do this, download the zip from github, then in the Arduino software Sketch>Include Library>Add .ZIP Library... and choose the whole zip repository to auto install.

With these settings we were able to compile the settings.

Step 4 - Getting it on the machine

Most people would expect to read about bootloaders and flashing now, and indeed that is an option. But as I had just figured out how to install firmware from .hex and so I wondered: Can't we make .hex files from our settings? And yes, Arduino supports this.

So, in Arduino IDE press Ctrl+Alt+S (or Sketch > Export Compiled Binary). This will result in two files:

• Marlin.ino.sanguino.hex
• Marlin.ino.with_bootloader.sanguino.hex

Of these two, the Marlin.ino.sanguino.hex is the interesting one for "direct flashing" via CURA. Use this file with the process starting at Step 2 here or use one of Greenonline's solutions to get the firmware flashed - no bootloader needed!