Ramps 1.4 Prusa MK2S Clone plus Linear Advance Firmware

by geoffsim Oct 28, 2017
Download All Files

Thing Apps Enabled

Please Login to Comment

Comments deleted.

I want to use quiter tmc drivers on my mk2s but board has integrated ones. Did I understand right, that I can use another board(ramps) and new drivers and with yours firmware my original prusa mk2s will work the same but with new drivers?

it's easier for me to replace the board. I'll post a make once i'm done

You will also have to go 24V to get the benefit of the drivers.

Hello @geoffsim,
I have 12V TMC2130 version of MK2S clone reliably working with Marlin FW on RAMPS. MK42 bed is on its way, so I will upgrade soon. Is it possible to tweak MK2S Prusa's version of firmware with TMC2130 feature in place on RAMPS?

I am happy at the moment with what I have, so I have no plans to do so at this time.

Hi, Thanks for the information on the RAMPs Mk2 which is now working great. Built from Mk1 and Mk2 bits left over from the Mk2.5 upgrade so it probably counts as an Original Mk2 RAMPs. Using a Mk42 heatbed and PINDA makes the changes easier. Prints as good as (maybe better than) the Mk2.5 but the steel plate is the best thing ever when I can get small PLA bits to stay stuck on long enough.

Thank you for the tip! My 24V system works well, but a MK3 heated bed would be good some time in the future, along with an upgrade to the hotend (Mk3 style).

I want to control the extruder fan as with the RAMBo setup (on when the hotend is above 50C) but can't quite see how to do this. You specified FAN1_PIN but that only seems to be available with non-EFB setups. I have a solid state relay board designed into my RAMPs case just for this purpose but don't know how to specify the pin or locate it on the RAMPs board. Can you help, please?

I will have to remind myself as it was some time ago I did this.
However, pins.h is the key file. It is pretty much a copy of the ramps pins.h in default distribution.
FAN_PIN is the extruder fan and is usually the RAMPS_D9_PIN. Are you not using a RAMPS board?
FAN1_PIN is the case fan, I believe (without looking), and comes on when the steppers are operating.

hi, for the ramps case it's missing something to attach the cover door?
I've just printed ramps cover door and ramps cover base but something is missing in the middle !!

The hinges are available on the Prusa web site, as are all the Prusa i3 Mk2 Parts.

Sorry but I can't find in prusa MK2 stl's
Nothing also in MK3.......
Can you update it here?


The parts are called RAMBO_hinges.stl.
The rear box screws to the frame directly.
The hinges screw to the frame, and the front box fits to the hinges. A 40mm M3 bolt holds the door closed.

There are very good instruction manuals on the Prusa website that you can use to help you locate the parts you need, and how they fit together. See https://manual.prusa3d.com/Guide

Just curious, did you use OpenSCAD to make the modifications? Or did you modify the STLs in Meshmixer or some other such way?

See my other listings for SCAD files. This is really just a collection of them.

hi, for the ramps case it's missing something to attach the cover door?

The two hinges are available on the Prusa web site.
I purposefully did not re-post parts that I had not changed.

How is the prusa inductive probe wire to the ramps board? Is it just 2 wires connected to the Zmin stop?

It's been well documented how. So long as the sensor is NPN, you need to add a diode to the sensor output. So, 12V and GND to sensor, and a diode from the sensor output to the Zmin input. Use pullups on the the Zmin endstop.

BWN -------- 12V/24V
BLK ---|<|--- Zmin
BLU -------- GND

Great, thanks for the effort

I build a Prusa clone (Zaribo 320) and I like the LCD cover and Ramps box. Does anyone know how to attach the LCD cover to the frame? Missing the back of the LCD cover or carrier that Prusa has

Thanks a lot for this, im having trouble following your instructions as I am the type of person who needs exactly areas of where to find this stuff lol, anyways, are you able to upload a .zip of the firmware that is configured? Im trying to edit it for an MKS gen 1.4 with drv 8825 and an generic therm for the e3d. Thank you. Can give a nice tip if you can help or after I figure this out lol

Wow, thank you for sharing this great tutorial on how to port prusa fw to ramps!
I've just upgraded my MK2S to MK2.5 and I'll use all mk2s parts to also upgrade my diy printer that uses ramps. Hopefully I'll be able to flash fw 3.0.12. This worked flawlessly for me.

A small donation to my PayPal account might encourage me to keep up with the Prusa firmware releases ;-)

Hello, are you planning on converting mk3 software for ramps? The power panic and filament sensing are quite useful features

The power panic may be implemented using the current sensing of the TMC2130 stepper drivers, so probably not.

I have bought some trinamic TM2130's for the X and Y of one of my printers, and so it is possible I will be looking at this sometime soon, along with the new extruder housing parts.

This would be incredible! I'm running an mks 1.4 board with tmc2130 drivers in full spi mode, and I have been looking to see if someone has figured out how to get the awesome prusa firmware and unique features on the ramps or mks boards. Its would be so cool if you could figure out how to port the mk3 firmware to it.

Hi Geoff,

If there is anything I can do to help with this project please let me know. I'd love to be able to try out the prusa firmware on my mks build. Happy friday!

Awesome job! You still using ramps or did a board update for MKS or rambo?

I have both. TBH 24v Ramps with trinamic drivers works best.

Do you think I can use mechanical Z endstop? because i do not have Z probe.

The code only works with a probe, so no.

Hello ,i did follow the instructions, but when compiling error write missing binary operator before token "(" i think it will be bad pins_ramps.h. "from where do you have pins_ramps.h? can you send me your pins_ramps.h? printer Prusa mk2 we bought as a utility to school. I have already built my printer with ramps 1.4 two years ago and I would like to upload the new firmware. Thank you for advice. Sorry for my english.

The instructions are correct. Make sure you have the latest Arduino installed.

Yes i have installed the latest version and addons too. from whwre you have pins_ramps.h? because i have it from my old marlin.

It’s in the files to download.

Thank you very much. I did not notice it in download. And i use other dispaly and it will also be a problem do you think it's going with full graphic smart controller? When I give #defineREPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER compile write error. would you be able to advise me?

No. It will only work with the recommended lcd.

Thank you very much once again, I order a new display.

Hello, so i ran through your manual and edited everything same, but i keep getting error messages in Arduino IDE whe compiling. What am I doing wrong?

expected "or" before const

You may have introduced that error whilst editing the source.
Try to build the code before making any source changes to see if the Arduino instance is correctly configured.

When i compile the one from prusa github only with configuration_prusa inserted it says:
pgm_read_ptr was not declared in this scope
I am using Arduiono 1.0.6

"Download and install latest Arduino IDE"

.So I downloaded Arduino IDE 1.8.5 from official site and original compiled ok. edited errored this:
expected ',' or ';' before 'const'

So i managed it's this line:
const bool Z_MIN_ENDSTOP_INVERTING = true;
if i add it.... it won't compile, without it, it will

Then you've edited the source wrong...Try changing one file at a time, and test compiling after each change.
More information on where the error is would be useful.

edited everithing except this line, was working. Added this line in configuration_prusa, like this:




// Printer revision

define FILAMENT_SIZE "1_75mm_MK2"

define NOZZLE_TYPE "E3Dv6full"

// Developer flag


// Printer name

define CUSTOM_MENDEL_NAME "Prusa i3 MK2"

// Electronics



define HAS_DIGIPOTSS false



define DEFAULT_PWM_MOTOR_CURRENT {0, 0, 0} // {XY,Z,E}


define HOTENDS 1

define MOSFET_D_PIN 4 // for MKS 1.4 board use 7 (heater 1)

define Z_SILENT 0

define Z_HIGH_POWER 0


define HEATER_0_MINTEMP 5 //15

define BED_MINTEMP 5 //15


//Set thermistor values,

define TEMP_SENSOR_0 5


const bool Z_MIN_ENDSTOP_INVERTING = true;

// Prusa Single extruder multiple material suport
//#define SNMM

// Uncomment the below for the E3D PT100 temperature sensor (with or without PT100 Amplifier)
//#define E3D_PT100_EXTRUDER_NO_AMP
//#define E3D_PT100_BED_WITH_AMP
//#define E3D_PT100_BED_NO_AMP

Then it says error with it not having , or ; before const on line of Z_MIN_ENDSTOP_INVERTING

Really sorry and thanks for your time... I have re-read the instructions and turns out i didn't change it, just added... so it was there two times, that was the problem

You could always show your appreciation with a small donation ;-)

Are you planning on changing firmware for mmu to work without special prusa driver output changing board? I mean that ramps have 5 drivers, which is enough for 2 extruder motors, so why build another extension then.

Hi man! Awesome job! I have a question about the Ramps box, what size fan are you using there? I'm planning to use 40x40x10 Noctua fan, will that fit?

Yup, 40x40 is what I use.

Hi! (again).. i followed the steps in the description but i have just one problem. I'm using the MK3 Aluminum Heated Bed and i need to change the the dimension in the mesh bed leveling dimension... can you tell me what i have to change?

Edit "mesh_bed_calibration.cpp" is where you make changes.

i tried but it doesn't work. I reduced the mesh or the points in that file and nothing. Can you help with that?

The instructions are quite clear.

Edit "mesh_bed_calibration.cpp". Change positions of the bed reference points. These are the position of the nozzle not the sensor.
The 0,80,160 are X positions. The 6.4, 104.4, 204.4 are Y positions.
As my example bed is 220(x) x 275(y), and that the nozzle can only reach from -2 to 212 (X) and -5 to 230 (Y), I left the Y alone, and set the X values to 0, 80, 160 to give sensor X positions of approximately 20, 100, 180.

Be warned that you need to protect the heated bed when you mess with these values in case your changes make the sensor move outside the bed limits! I accept no responsibilities for any damage caused.

Just wanted to mention that the Prusa printers use a fork of Marlin that is pre Marlin 1.0 (based on github start date of Dec 2015 for Prusa firmware) and is significantly customized. The main trunk Marlin 1.0 and 1.1 have seen lots of general improvements (stability and features) since the prusa branch. So doing any sort of refinement requires understanding the idiosyncrasies in the prusa code. I have a MK2s now and Z height for good first layer adhesion needs tweaking for every print, especially for ABS. What are your thoughts on moving the Prusa enhancements to the main Marlin code?

Hi, and Happy Christmas... Prusa changes are very Prusa hardware oriented. I would not want to try...
As far as Z changes each time, the temperature probe addition to Prusa MK3 pinda probe will go a long way to fixing that. You may also find if you run the Pinda temperature configuration, you may get better results.

hi geoffsim! thanks for the great work.. i just have a question... the stl files looks they are incomplete. because y need the ramps box but there are some missing parts.. am i wrong?

Any missing parts can be downloaded from the Prusa website.

another thing.. where did you get those frames???

does this firmware still have the 9 probe points?

i got one of the clone beds, i tried to get prusa to sell me one but they will not. this clone also came with the 8mm inductive probe needed

i came accros this: https://github.com/slippyr4/Prusa-Firmware

it has what i need except an option for a normal touch probe and full graphic display

i'm ready to buy the right lcd but not everyone might want to "trash" their display

I have not changed any functionality, so a quick answer is yes, it does still have 9 probe points.

If you are not using a MK2 bed, you just need to specify the positions of where you want the points to be (for bed levelling).

The branch of Marlin that Prusa use does not support the full graphic display.

As far a probes are concerned, you just need to make sure you set the correct z limit sense (active low or high).

i do use the mk42 bed :-) but its a clone

why i menationed the full graphic displays was that some might not want to give it up but still want a taste of what the prusa firmware offers

thou you are good with programming etc, how much work would it be to add back support for these displays?

what i meant with an option for other probes was using a probe like this one: https://miscsolutions.wordpress.com/mini-height-sensor-board/

but not search for the probe point which i assume is what the firmware does with the inductive probe, but instead just go to where the points should be and get the height... of course a lot of the smart XY compensation is lost

about the 9 points....

i never quite understood how the firmware works...

but i guess it comespares where the 9 points are and where they should be to figure out if things are skewed, is that correct?

this of course implies that it will do a kind of search for the center of them.... or am i wrong on this part of it?

It's just not worth the effort to back-port the full graphic display. I really don't see what you would be expecting to gain... the correct device is only a few pounds.

Regarding the probing, the XY calibration will just fail if you try it with a different sensor or bed (need both).
However, it works fine for bed levelling.

:-D then i learned something today about the bed leveling...

you are right about the display.... but as you know some people are kind of cheap :-D

do you have the firmware on github also?

No, because that would mean keeping it up to date ;-)
The method I describe in this listing allows you to build a custom firmware that suits your specific build.
You just pull the latest build, and modify it to suit. Easy.

makes sense :-D

how many of the functions can only be executed from the lcd? i was thinking of loading it before i got the lcd

You’d have a hard time using the Prusa firmware without an LCD. When first used it expects a calibration print to be run to set the live Z. It does not respond on the USB until you ok a message in this state.

oh well that kind of settes it...

is the calibration print a premade gcode or how does it work?

last stupid q.... the lcd should be this type right: http://3deksperten.dk/lcd2004-m-sd-for-ramps-1-4.html

did a google search on what prusa uses but that gave more results on anything else than what type it is

It is hard coded in the firmware now. You can download it off the website, too.

thanks for explanation

watching the build manual and calbration video with Josef to extract all the info i need to apply it to my mendel90

I noticed that you included a modified z-axis-bottom.stl but I don't see it mentioned in your description. Was this modified so you could use the steppers with the integrated 300mm shafts?

Thanks for all of the work putting this together. I'm looking forward to the how-to guide.

Yes, that’s exactly what they are for.

... although I will say that my other clone just uses 5mm to 8mm adapters and I have not seen a real difference.