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.

  • Trish

    Trish Correct answer

    4 years ago

    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

    2. Make your own

    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.

    Step 2 - Adjust

    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!

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM