Ender 3 Pro custom Marlin firmware

If you are planning on compiling custom firmware for your Ender 3 Pro, I applaud you. This is an excellent step in any 3D printing enthusiast’s journey. I recommend starting with this setup guide from the official Marlin website:

https://marlinfw.org/docs/basics/install_platformio_vscode.html

I also recommend you set up a git repo to store your customized code. You can do that a couple ways, by forking one of the official Marlin Github repos, or by using the zip file and setting it up from a new, blank repo. I often do the latter, because I want to have more control over which exact Marlin version I use.

If you want to use the zip file head over to this page: https://marlinfw.org/meta/download/

If you want to fork the current repo head over to this page: https://github.com/MarlinFirmware/Marlin

Either way you choose, you will need to obtain the recommended starting configuration files for the printer. All the example configs are found here: https://github.com/MarlinFirmware/Configurations/ and the Ender 3 Pro configuration files are specifically located here: https://github.com/MarlinFirmware/Configurations/tree/import-2.1.x/config/examples/Creality/Ender-3%20Pro

You will need to know what board you have, and what MCU is on it, so this means you’ll have to open up your printer and have a close inspection. Remember to unplug from mains power, and discharge any static you’ve built up.

If you are one of the unlucky ones who have a GigaDevice MCU, then the only luck I’ve had is with the TH3D Unified Firmware, but they recently put all their printer configuration packages behind a paywall, which I don’t personally approve of for an Open Source project, so I’m not going to link them here. The rest of this guide will assume you have a Marlin supported STM chipset.

The reason you need to know which MCU you have, is so that platformIO can be configured to build from the correct foundation. For the STM 4.2.2 board, as of this writing, the platform.ini should contain default_envs = STM32F103RE_creality. If that doesn’t work and generates compile errors, then more research will be needed to get the correct board designation.

Once you have your platform.ini set the next step is to load the example configurations. Copy the *.h files from the Github repo and overwrite the default files in the Marlin folder:

Configuration.h
Configuration_adv.h
_Bootscreen.h
_Statusscreen.h

After loading the example configuration files, you should run a compile action to make sure everything you have is set up correctly. Once that succeeds, you can move on and read about the changes I’ve made to my Configuration files.

Changes from example configurations

The example configs enable all of the greatest features of Marlin that are compatible with your board, so until you start making hardware changes, then you may be able to stick with the recommended starting files for a while.

That being said, I found a few things that didn’t work for me, or I wanted to ‘hardcode’ into my configs. The first was the size of the bed. According to the claims made by the maintainers, the Ender 3 Pro can reach the entirety of the 235mm x 235mm bed, but in practice I found this to not be true for my hardware. I can’t say if it was a QC issue with the build, but I know my bug report was closed. I needed to reduce the bed size by 5mm in each direction.

#define X_BED_SIZ 230
#define Y_BED_SIZE 230

After flashing the firmware for the first time, I locate the home offset and set those values in my config in the X_MIN_POS and Y_MIN_POS variables.

Next I run a PID tune on the hot end and save those values in DEFAULT_Kp, DEFAULT_Ki, and DEFAULT_Kd in the PIDTEMP section.

Next I run a PID tune on the heat bed and save those values in in DEFAULT_bedKp, DEFAULT_bedKi, and DEFAULT_bedKd in the PIDTEMBEDP section.

Finally I calibrate my e-steps and update the 4th value in DEFAULT_AXIS_STEPS_PER_UNIT

If I enabled LIN_ADVANCE, I run a linear advance test and save the value in ADVANCE_K the section.

After ensconcing those values in the firmware configuration, I run a new build and flash the new firmware for operation. The process takes a few hours, but is totally worth it I think.

Leave a Reply

Your email address will not be published. Required fields are marked *