Introduction
Marlin firmware is a popular choice for controlling 3D printers due to its flexibility and extensive customization options. In this comprehensive guide, we provide detailed instructions for configuring and optimizing your Marlin firmware to ensure your 3D printer runs optimally. Our goal is to equip you with the necessary tools and knowledge to personalize your firmware and maximize your print quality.
Getting Started with Marlin Firmware Configuration
To customize the Marlin firmware, you need specific software and a basic understanding of the configuration files. The preferred way to edit the Marlin firmware is using Visual Studio Code together with the Platform IO extension.
1. Software Installation
- Visual Studio Code (VS Code): Download VS Code for free for your operating system (Windows, Linux, Mac).
- Platform IO: Install the Platform IO extension via the extensions in VS Code. This extension enables easy compiling and uploading of the firmware.
2. Downloading and Setting Up the Marlin Firmware
Visit the Marlin GitHub repository and download the latest version of the firmware. There are two main versions: Bugfix (for the latest features and bug fixes) and the regular version (more stable).
- Download: Click on "Code" and then on "Download ZIP." Extract the ZIP file and open the folder in VS Code.
- Configuration Files: Add specific printer configuration files if you want to make only minor adjustments to your printer.
3. Selection of the mainboard and processor
Make sure you have configured the correct mainboard and processor model for your firmware. This is done in the configuration.h File.
-
Mainboard: Find the appropriate definition for your mainboard (e.g.,
Board_Creality_V4for Creality Ender 3). -
Processor: Check the processor model in the
boards.hfile and adjust thedefault_envsline in Platform IO.
Important Firmware Settings
Serial ports, baud rate, and Bluetooth
In the file configuration.h You can configure the serial ports and set the baud rate. The default baud rate is 115200. If your printer supports Bluetooth, you can enable this option and change your printer's name.
#define BAUDRATE 115200
#define SERIAL_PORT 0
Stepper drivers
The choice of stepper drivers directly affects your printer's noise and performance. Common drivers are TMC2208 and TMC2209. In the firmware, you can specify the driver used and adjust its parameters.
#define STEPPER_DRIVER_TYPE TMC2209
Sensorless homing
Sensorless homing is a feature that allows reference movement without physical endstops. This method can improve printer calibration and reduce costs.
#define SENSORLESS_HOMING
Microstepping and StealthChop
Microstepping increases movement accuracy, while StealthChop reduces noise. Both options can be set in the configuration.h can be configured.
PSU control
The control of the power supply on and off can be managed via the firmware to save energy and extend the power supply's lifespan.
#define PSU_CONTROL
Thermal settings
Correct configuration of thermistors and maximum/minimum temperatures is crucial for the safety and performance of your printer.
PID settings
PID controls provide precise temperature regulation. These values can vary depending on the heated bed and hotend.
Safety settings
To ensure your safety, configure protection mechanisms such as cold extrusion and thermal runaway.
Mechanical settings
For special printer models like CoreXY or Delta, the mechanical parameters must be adjusted.
Endstop settings
Make sure the endstop configurations are set correctly to ensure accurate printer movements.
Movement settings
Configure acceleration and other motion settings to optimize print quality and speed.
Z-Probe and Bed Leveling
A well-configured Z-probe and precise bed leveling are crucial for print quality.
Bed Size
Adjust the bed size to correctly define the print area.
M600 - Filament Change
Configure the filament change via the M600 function to pause the printing process if necessary.
#define FILAMENT_CHANGE_FEATURE
Additional Features
Marlin offers many additional features such as EEPROM storage, preheat settings, nozzle cleaning, and more. These can be enabled and configured as needed.
Conclusion
By carefully adjusting the Marlin firmware, you can significantly improve the performance and reliability of your 3D printer. With the information and configuration examples provided in this guide, you are well equipped to optimally configure and customize your firmware. Use this guide as a reference to achieve the best possible results in your print projects.