In my github repository (https://github.com/cimoalpacino/Prusa-Firmware/tree/MK2S_3.9.0_RAMPS) you can find and download the source code of a working Prusa 3.9.0 firmware running on an Arduino RAMPS board for my Prusa i3 Bear style 3D printer.
The latest official builds can be downloaded from Prusa Drivers. Pre-built development releases are also available here.
The firmware for the Original Prusa i3 printers is proudly based on Marlin 1.0.x by Scott Lahteine (@thinkyhead) et al. and is distributed under the terms of the GNU GPL 3 license.
Please read the whole document, especially the Important section at the bottom.
This firmware is configured for a Prusa Bear MK2S fitted with an Arduino RAMPS 1.4 and A4988.
PINDA wiring:
| Endstop | Endstop pin | PINDA wire |
| :---: | :---: | :---: |
| Z-MIN | VCC (+) | Brown |
| Z-MIN | GND (-) | Blue |
| Z-MIN | SIGNAL (S) | Black |
The firmware has been modified in many places and files to get it fully working.
All changes are marked with text /*RAMPS*/
, so it can be easily traced using Find/Search option in text editors (or software like Visual Studio or VS Code).
Init. SD card
to manually initialize SD card if it fails to load when inserted in SD slotLive Z presets
if a steel sheet is not used, otherwise it shows Sheets
optionsAll but statistics
to keep info about hours and filament usedFirst layer calibration
compatible also with 2.85mm filaments#define X_PROBE_OFFSET_FROM_EXTRUDER -25
#define Y_PROBE_OFFSET_FROM_EXTRUDER -5 //-29
#define Z_PROBE_OFFSET_FROM_EXTRUDER -12.35
mesh_bed_calibration.cpp
(check settings for your setup so that the probe hits all bed points - use Pronterface output to help define the right values)
#if MOTHERBOARD == BOARD_RAMPS_14_EFB
//MK42 BED //if XYZ calibration fails, check serial output in Pronterface and adjust the values accordingly!
36.5f - BED_PRINT_ZERO_REF_X - X_PROBE_OFFSET_FROM_EXTRUDER - SHEET_PRINT_ZERO_REF_X, //36,5 - 2 - 23 - 0 = 11,5
16.1f - BED_PRINT_ZERO_REF_Y - Y_PROBE_OFFSET_FROM_EXTRUDER - SHEET_PRINT_ZERO_REF_Y, //16,4 - 9,4 - 5 - 0 = 1,7
239.5f - BED_PRINT_ZERO_REF_X - X_PROBE_OFFSET_FROM_EXTRUDER - SHEET_PRINT_ZERO_REF_X, //239,5 - 2 - 23 - 0 = 214,5
16.1f - BED_PRINT_ZERO_REF_Y - Y_PROBE_OFFSET_FROM_EXTRUDER - SHEET_PRINT_ZERO_REF_Y, //16,4 - 9,4 - 5 - 0 = 1,7
239.5f - BED_PRINT_ZERO_REF_X - X_PROBE_OFFSET_FROM_EXTRUDER - SHEET_PRINT_ZERO_REF_X, //239,5 - 2 - 23 - 0 = 214,5
212.4f - BED_PRINT_ZERO_REF_Y - Y_PROBE_OFFSET_FROM_EXTRUDER - SHEET_PRINT_ZERO_REF_Y, //212,4 - 9,4 - 5 - 0 = 198
36.5f - BED_PRINT_ZERO_REF_X - X_PROBE_OFFSET_FROM_EXTRUDER - SHEET_PRINT_ZERO_REF_X, //36,5 - 2 - 23 - 0 = 11,5
212.4f - BED_PRINT_ZERO_REF_Y - Y_PROBE_OFFSET_FROM_EXTRUDER - SHEET_PRINT_ZERO_REF_Y //212,4 - 9,4 - 5 - 0 = 198
#else
#define BED_ZERO_REF_Y (- 0.6f + Y_PROBE_OFFSET_FROM_EXTRUDER + 2.f) // -0.6 + 5 + 2 = 6.4
#define BED_X0 (13.f - BED_ZERO_REF_X) //13 - 1 = 12
#define BED_Y0 (8.4f - BED_ZERO_REF_Y) //8.4 - 6.4 = 2
#define BED_Xn (216.f - BED_ZERO_REF_X) //216 - 1 = 215
#define BED_Yn (204.4f - BED_ZERO_REF_Y)//204.4 - 6.4 = 198
0.f
to a higher or lower value if having problem with Z calibration (line 3524)// increase (+) to go lower, decrease (-) to go higher
current_position[Z_AXIS] = Z_MAX_POS + 0.f;
#if MOTHERBOARD == BOARD_RAMPS_14_EFB
const int16_t xyzcal_point_xcoords[4] PROGMEM = { 1150, 21450, 21450, 1150 };
const int16_t xyzcal_point_ycoords[4] PROGMEM = { 600, 600, 19750, 19750 };
#endif //!MOTHERBOARD == BOARD_RAMPS_14_EFB
If having problems with calibration when the probe is searching the calibration points, I recommend to use Pronterface output to find the correct values.
If your setup is different than mine you have to modify parameters and values to fit your needs.
Use at your own risk!
Firmware was successfully compiled and tested with Arduino 1.8.5. Before compiling, be sure you have modified the file platform.txt
.
The platform.txt
file can be found in Arduino instalation directory ("C:\Program Files (x86)\Arduino\hardware\arduino\avr"
), or after Arduino has been updated at: "C:\Users\(user)\AppData\Local\Arduino15\packages\arduino\hardware\avr\(version)"
. If you can locate the file in both places, file from user profile is probably used.
Add "-Wl,-u,vfprintf -lprintf_flt -lm"
to "compiler.c.elf.flags="
before existing flag "-Wl,--gc-sections"
For example: "compiler.c.elf.flags={compiler.warning_flags} -Os -g -flto -fuse-linker-plugin -Wl,-u,vfprintf -lprintf_flt -lm -Wl,--gc-sections"
Before making the inital Wizard calibration, it is mandatory to do a full factory reset to erase all eeprom data!
If done correctly, the LCD screen will show a menu with 4 options.
Select All data and wait for it to complete.
After that you can continue with calibration.
If calibration fails in many retries, you may have to edit firmware parameters in calibration sections.
Whenever a new upload of firmware is done, the factory reset procedure must be repeated!
The author hasn't provided the model origin yet.