hits counter

Upgrading the Makerfarm Prusa i3 to a new version of Marlin:

So you’ve got your new Makerfarm Prusa i3 3D printer all set up, printing, and maybe even tuned so it’s singing just beautifully.

Now you hear there’s some new feature of the Marlin firmware that isn’t implemented on the version you’ve got installed.  Can you just download the new version, flash it to your printer via the Arduino IDE and just roll right along?

Probably not.

The thing is, Marlin, by default, is set up for the Ultimaker, which is a great printer, but is actually quite a bit different from the Prusa RepRap family, which includes the i3.

Fear not, there is hope!

The front Page of ErikZalm's Marlin repository on Github.

The front Page of ErikZalm’s Marlin repository on Github.

In reality, Marlin is highly configurable, and with only a few quick and easy modifications, you can be running the latest and greatest version.

There are two things you’ll need to get your hands on:

  1. The current version of Marlin.  You can get that at ErikZalm’s GitHub respository.Click the “Download ZIP” button, and save and extract the file to a convenient location.  You’ll be modifying and flashing these files, so put them somewhere where you’ll be able to work with them.
  2. The most recent firmware from the Makerfarm website (look under “Build Instructions”, and then look for “RAMPS Download”.  Download the file, and extract the folder that matches your printer Mine is “Marlin_RAMPS-EPCOS_i3-8inch”.

Now that you’ve got both versions, the “Standard” current Marlin, and the pre-configured Makerfarm version, you’re going to be looking for a file called “Configuration.h”.

IMPORTANT NOTE:  The Arduino IDE is going to insist that, within both of these projects, the file names need to be the same.  Resist the temptation to rename one file something like “Configuration-old.h”, it won’t work.  Keep both of these sets of files in different directories, and be EXTREMELY careful to keep them straight and separate.

Once you’ve got both “Configuration.h” files opened, you’re basically going to be going through each one, and whenever a value is different between them, you’re going to replace the value in the “Vanilla” file with the one in the Makerfarm file.

Two versions of the Marlin Configuration.h file - On the right, the Pre-configured Makerfarm version, and on the left, the unchanged default Marlin version.  To get a new version of Marlin running properly on the Makerfarm Prusa i3, we'll be replacing the default values with those in the Makerfarm-specific file.

Two versions of the Marlin Configuration.h file – On the right, the Pre-configured Makerfarm version, and on the left, the unchanged default Marlin version. To get a new version of Marlin running properly on the Makerfarm Prusa i3, we’ll be replacing the default values with those in the Makerfarm-specific file.

At this point, I highly recommend creating another text file to record all the changes you make.  If something stops working, you’ve got a trail of breadcrumbs you can follow to fix whatever went wrong. In days past, the general practice was to record the line number, so you could easily see exactly where you made the changes.  In the last couple of updates to Marlin, however, significant blocks of code have been added or removed, so the line numbers don’t match up well.  I now recommend just recording the names of the variables you’ve altered, as well as the new and old values, so it no longer matters where they may have been moved within the file.

Also, I have found it to be a good use of time to just explore the innards of the Configuration.h, just to get a feel for what is there.

You’re not going to do that?  Okay, okay, I understand.  Here is a list of the crucial changes you’ll need to make to get things running.  Find these settings in the new Marlin file, and make these changes:

#define MOTHERBOARD 33  (Default is 7, which is the Ultimaker)

#define TEMP_SENSOR_0 1 (Default is -1, which is again for the Ultimaker)
(IMPORTANT: You can use sensor #6, which is what is actually specified in the Makerfarm file, but you’ll need to use the thermistortables.h file from the Makerfarm distribution.  Makerfarm’s tables are significantly different from those in the standard Marlin distribution!)

#define TEMP_SENSOR_1 0
(Default is -1, which is, again, for the Ultimaker)

#define TEMP_SENSOR_BED 1 (Default is 0) (see the important note above)

#define HEATER_0_MAXTEMP 235 (235 for the J-head, higher for the Magma or other all-metal hotend)

#define BED_MAXTEMP 125 (default is 150, which is probably too high)

Under the heading Mechanical Settings There are few values to change.

Look for:

#ifdef ENDSTOPPULLUPS.

There will be six #defines immediately under this statement (Make sure you’re looking at the #ifdef, and not the #ifndef right above it).

Comment out the top three, which are the ones involving XMAX,YMAX and ZMAX endstops. When you’re done, the whole section should look like this:

#ifdef ENDSTOPPULLUPS
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN
#endif

 

Next are a series of Endstop inverting statements:

These are all set to “true”, which won’t work with the stock Makerfarm i3, so set them all to “false”:

const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.

#define min_software_endstops false // If true, axis won't move to coordinates less than HOME_POS.

(this is set to “true” by default.  It won’t catastrophically fail if it’s on, but it will be an annoyance later on.)

// Travel limits after homing
(the defaults are set just a bit higher, you don’t want to try to set a position beyond the physical edge of the printer’s travel!)
#define X_MAX_POS 200
#define X_MIN_POS 0
#define Y_MAX_POS 200
#define Y_MIN_POS 0
#define Z_MAX_POS 185
#define Z_MIN_POS 0

#define HOMING_FEEDRATE {50*60, 50*60, 150, 0}  // set the homing speeds (mm/min)

#define DEFAULT_AXIS_STEPS_PER_UNIT   {80,80,4000,945} (this one is REALLY IMPORTANT!)

#define DEFAULT_MAX_ACCELERATION      {9000,9000,20,10000}

The EEPROM settings are disabled by default.  I think these features are incredibly useful, so I recommend uncommenting the following lines:

#define EEPROM_SETTINGS

#define EEPROM_CHITCHAT

The Makerfarm comes with the RepRap Discount LCD controller, so you’ll want to uncomment the following define:

#define REPRAP_DISCOUNT_SMART_CONTROLLER

This should get you running nicely with all the new features of Marlin!

I do not guarantee that there are no mistakes here, or that this is a complete guide.

I will keep this post updated as new features become available, and please feel free to contact me if you see that I’ve missed something important.

80 comments to Upgrading the Makerfarm Prusa i3 to a new version of Marlin:

  • Hello, in regards to probe hitting the bed during retraction after auto-home/auto-level

    https://github.com/ErikZalm/Marlin/issues/816 …at the bottom of the post the guy points out the line that needs to be edited. will give it a try.

    there is also this
    https://github.com/misterjom/Marlin “Z-lift before servo retraction”

    cheers.

  • ratdog

    I got the ErikZalm \/Marlin version and he changed it 6 days it does not match your video, and I do not now if I should attempt to try it, wil you be making a new video?

  • Very important!!!
    You forgot this (if someone using this instruction for Prusa i3 change to this in code, because an axis goes the wrong way. it was design for Mendel printer ) => correct code:

    #define INVERT_X_DIR true
    #define INVERT_Y_DIR false
    #define INVERT_Z_DIR true

  • decosign

    I turned my 3d printer cnc
    please do I want to know the parameter to change on my cnc marlin to drive , I have a 2560 mega 3 AXIS XYZ Arduino board guided by ( ballscrew 1605) 16mm in diameter, about DEFAULT_AXIS_STEPS_PER_UNIT okay I already is calculated is good . I wonder what other change ? .

    cordially

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>