Prusa firmware for RAMPS Prusa i3 clones with MK42 beds

3D Modelling, Slicing, Hosts and Management
Post Reply
akku3D
Posts: 18
Joined: Mon Oct 09, 2017 9:54 am

Re: Prusa firmware for RAMPS Prusa i3 clones with MK42 beds

Post by akku3D » Mon Oct 09, 2017 11:27 am

OK, then 4000 is the right value for 16 microsteps.
I thought I had to devide the value with something.

I'll build the "clone" with a P3steel frame.
Do I have to change any distances in the firmware, so that the very first xyz-calibration works?
How does Pinda find the first calibration point?

slippyr4
Posts: 148
Joined: Thu Jun 15, 2017 10:24 am

Re: Prusa firmware for RAMPS Prusa i3 clones with MK42 beds

Post by slippyr4 » Mon Oct 09, 2017 11:34 am

akku3D wrote:
Mon Oct 09, 2017 11:27 am
How does Pinda find the first calibration point?
By dead reckoning; in calibration, first the printer guides you to jog the Z axis up until it hits the stops and the motors skip steps - this puts the X rods level and the Z height is known (about 210mm IIRC). Then the printer will move to about Z=5 and home X+Y to the limit switches.

The it moves to the (hardcoded) x,y of the first limit calibration point and starts oscillating in X and Y directions whilst slowly lowering Z, until the probe is triggered.

You will need to:-
- either get your X/Y endstops in the right place such that the calibration points are the the correct X,Y positions, or, edit the firmware to relocate the X,Y points.

- if you don't have an identical Z max height, you will need to change that in the firmware too. Otherwise it will either ram the nozzle in to the bed during calibration, or give up trying to find the first point.
Self-built Prusa i3 MK2 clone
My things: https://www.thingiverse.com/slippyr4/designs
My Prusa firmware port for ramps & MKS : https://github.com/slippyr4/Prusa-Firmware

akku3D
Posts: 18
Joined: Mon Oct 09, 2017 9:54 am

Re: Prusa firmware for RAMPS Prusa i3 clones with MK42 beds

Post by akku3D » Mon Oct 09, 2017 1:02 pm

slippyr4 wrote:
Mon Oct 09, 2017 11:34 am
You will need to:-
- either get your X/Y endstops in the right place such that the calibration points are the the correct X,Y positions, or, edit the firmware to relocate the X,Y points.
Where in the firmware I can find the entries to relocate the X,Y points?
And are the values absolute from X and Y 0 to the middle of the first calibration point? From the nozzle or from the pinda?

Markwill
Posts: 7
Joined: Thu Oct 05, 2017 1:46 am

Re: Prusa firmware for RAMPS Prusa i3 clones with MK42 beds

Post by Markwill » Mon Oct 09, 2017 1:47 pm

akku3D wrote:
Mon Oct 09, 2017 1:02 pm
slippyr4 wrote:
Mon Oct 09, 2017 11:34 am
You will need to:-
- either get your X/Y endstops in the right place such that the calibration points are the the correct X,Y positions, or, edit the firmware to relocate the X,Y points.
Where in the firmware I can find the entries to relocate the X,Y points?
And are the values absolute from X and Y 0 to the middle of the first calibration point? From the nozzle or from the pinda?

Hello,

Im the same point of you. Im trying change the X, Y first point but without success. Where could I change the first pint when do G28?

I tried change in CONFIGURATION_PRUSA_H

// Home position
#define MANUAL_X_HOME_POS 0
#define MANUAL_Y_HOME_POS -2.2
#define MANUAL_Z_HOME_POS 0.15

but the print goes to the same X Y point

I also tried change

// Mesh definitions
#define MESH_MIN_X 35
#define MESH_MAX_X 238
#define MESH_MIN_Y 6
#define MESH_MAX_Y 202

but I assume this affect when do G29

Please anybody could help?

chumm
Posts: 138
Joined: Thu Jun 15, 2017 11:24 am

Re: Prusa firmware for RAMPS Prusa i3 clones with MK42 beds

Post by chumm » Mon Oct 09, 2017 9:46 pm

Not up to date on this thread re: how the firmware is written but in Marlin it looks like this (and is kinda hard to find):

Code: Select all

#define Z_SAFE_HOMING

#if ENABLED(Z_SAFE_HOMING)
  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
#endif
You can just enter manual values for the X and Y but that expression will calculate it automatically based on the min/max positions as defined here:

Code: Select all

// Travel limits after homing (units are in mm)
#define X_MIN_POS -15
#define Y_MIN_POS -41
#define Z_MIN_POS 0
#define X_MAX_POS 190
#define Y_MAX_POS 158
#define Z_MAX_POS 110.2
Edit: Sorry I meant to say this will probe in the center of the bed. If you're doing MK42 stuff you'll probably want that to be manually defined, so something like

Code: Select all

#define Z_SAFE_HOMING_X_POINT 40
#define Z_SAFE_HOMING_Y_POINT 80

Markwill
Posts: 7
Joined: Thu Oct 05, 2017 1:46 am

Re: Prusa firmware for RAMPS Prusa i3 clones with MK42 beds

Post by Markwill » Mon Oct 09, 2017 11:20 pm

chumm wrote:
Mon Oct 09, 2017 9:46 pm
Not up to date on this thread re: how the firmware is written but in Marlin it looks like this (and is kinda hard to find):

Code: Select all

#define Z_SAFE_HOMING

#if ENABLED(Z_SAFE_HOMING)
  #define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)    // X point for Z homing when homing all axis (G28).
  #define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)    // Y point for Z homing when homing all axis (G28).
#endif
You can just enter manual values for the X and Y but that expression will calculate it automatically based on the min/max positions as defined here:

Code: Select all

// Travel limits after homing (units are in mm)
#define X_MIN_POS -15
#define Y_MIN_POS -41
#define Z_MIN_POS 0
#define X_MAX_POS 190
#define Y_MAX_POS 158
#define Z_MAX_POS 110.2
Edit: Sorry I meant to say this will probe in the center of the bed. If you're doing MK42 stuff you'll probably want that to be manually defined, so something like

Code: Select all

#define Z_SAFE_HOMING_X_POINT 40
#define Z_SAFE_HOMING_Y_POINT 80
Don't work with the Prusa firmware. Because the function is disabled

//#define Z_SAFE_HOMING

slippyr4
Posts: 148
Joined: Thu Jun 15, 2017 10:24 am

Re: Prusa firmware for RAMPS Prusa i3 clones with MK42 beds

Post by slippyr4 » Tue Oct 10, 2017 9:40 am

Z safe homing isn't the same thing as prusa's auto calibration.

The first thing you will need to change, if your printer is a different height in Z (for example, you used shorter leadscrews and modified Z stops, or you've build with a different frame, or you've built a zaribo edition), is Z_MAX_POS which is in configuration_prusa.h on line 65. This should be set the the height of the nozzle top above the bed surface when the X carriage is touching the top stops. Default for a genuine is 210.

When autocalibration starts, you're guided to jog the Z axis to the top. When you click the button to confirm it's at the top, the printer sets the Z height to that value of Z_MAX_POS. Then in the next step, it moves Z to the position set in MESH_HOME_Z_SEARCH which is 5. You don't really want to change that value though. But the effect is that Z will move down 205mm in this example.

The precise location of the 9 calibration points is defined in mesh_bed_calibration.cpp on line 53:-

Code: Select all

const float bed_ref_points[] PROGMEM = {
    13.f  - BED_ZERO_REF_X,   6.4f - BED_ZERO_REF_Y,
    115.f - BED_ZERO_REF_X,   6.4f - BED_ZERO_REF_Y,
    216.f - BED_ZERO_REF_X,   6.4f - BED_ZERO_REF_Y,

    216.f - BED_ZERO_REF_X, 104.4f - BED_ZERO_REF_Y,
    115.f - BED_ZERO_REF_X, 104.4f - BED_ZERO_REF_Y,
    13.f  - BED_ZERO_REF_X, 104.4f - BED_ZERO_REF_Y,

    13.f  - BED_ZERO_REF_X, 202.4f - BED_ZERO_REF_Y,
    115.f - BED_ZERO_REF_X, 202.4f - BED_ZERO_REF_Y,
    216.f - BED_ZERO_REF_X, 202.4f - BED_ZERO_REF_Y
};
At a push, you could change these. But I don't think you really need to. The right way of setting up your printer, if you are using a MK42, irrespective of your frame and endstop setup, is to make sure your axes are configured so that 0,0 is right above the 0,0 location printed on the bed. If you do that, you won't need to change the coordinates of these points.

The way you do that is the same as in marlin. In configuration_prusa.h line 60:-

Code: Select all

// Travel limits after homing
#define X_MAX_POS 250
#define X_MIN_POS 0
#define Y_MAX_POS 210
#define Y_MIN_POS -2.2
#define Z_MAX_POS 210
#define Z_MIN_POS 0.15
The i3 homes to minimums. So, when you are doing a G28, the printer moves until the end stops are triggered and then, when they are, it assigns these values to the current position. So, in a stock i3 mk2, when you hit the X & Y endstops the position is set to 0,-2.2 . Thats exactly the same as saying that the nozzle is 2.2 mm behind the 0 mark in the y axis, and it's over the zero mark in the Z axis.

If the geometry of your printer is different you need to change these values. If, for example, when the X endstop is triggered, the nozzle is 12mm to the left of the 0 line on the bed, then you need to change X_MIN_POS to -12.

Set them up, flash the firmware and test with G28 XY followed by G28 Z followed by G1 X0 Y0 Z1 and verify that the nozzle is directly above the 0,0 point on the bed. When it is, you can run your calibration process and it should work.

When you're mucking around trying to get your calibration right, I suggest that instead of doing it from the LCD you instead use pronterface and do M45 V2 - this is the exact same process but with some additional diagnostic information displayed in the pronterface console which is very useful.
Self-built Prusa i3 MK2 clone
My things: https://www.thingiverse.com/slippyr4/designs
My Prusa firmware port for ramps & MKS : https://github.com/slippyr4/Prusa-Firmware

akku3D
Posts: 18
Joined: Mon Oct 09, 2017 9:54 am

Re: Prusa firmware for RAMPS Prusa i3 clones with MK42 beds

Post by akku3D » Tue Oct 10, 2017 10:24 am

Thank you very much slippyr4 for the detailed explanation.
I think I can work well when I have finished building my printer.

akku3D
Posts: 18
Joined: Mon Oct 09, 2017 9:54 am

Re: Prusa firmware for RAMPS Prusa i3 clones with MK42 beds

Post by akku3D » Fri Oct 13, 2017 9:49 am

slippyr4 wrote:
Tue Oct 10, 2017 9:40 am
The i3 homes to minimums. So, when you are doing a G28, the printer moves until the end stops are triggered and then, when they are, it assigns these values to the current position. So, in a stock i3 mk2, when you hit the X & Y endstops the position is set to 0,-2.2 . Thats exactly the same as saying that the nozzle is 2.2 mm behind the 0 mark in the y axis, and it's over the zero mark in the Z .
.
.
.
Set them up, flash the firmware and test with G28 XY followed by G28 Z followed by G1 X0 Y0 Z1 and verify that the nozzle is directly above the 0,0 point on the bed.
Now I have yet another question.
Must the nozzles after the home over x = 0 and y = 0 or over x = 0 and y = -2.2?
I read two different statements.

slippyr4
Posts: 148
Joined: Thu Jun 15, 2017 10:24 am

Re: Prusa firmware for RAMPS Prusa i3 clones with MK42 beds

Post by slippyr4 » Fri Oct 13, 2017 10:50 am

akku3D wrote:
Fri Oct 13, 2017 9:49 am
Now I have yet another question.
Must the nozzles after the home over x = 0 and y = 0 or over x = 0 and y = -2.2?
I read two different statements.
Homing really means "find the endstops so i can be sure the print head is where i think it is". It doesn't actually mean that the head will be at any particular location when homing is finished. Where the nozzle ends up is down to the firmware implementation. Some printers home to maximum and they will probably finish a long way from 0,0 after homing. Point is, you shouldn't care. After homing you tell the printer where you want it to go.

What you should do, is home your axes (G28 XY then G28 Z), and when its finished, use a G1 move to put the nozzle where you want it - eg G1 X0 Y0 Z0.5

At that point, yes, the nozzle should be above the 0,0 point.
Self-built Prusa i3 MK2 clone
My things: https://www.thingiverse.com/slippyr4/designs
My Prusa firmware port for ramps & MKS : https://github.com/slippyr4/Prusa-Firmware

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests