Welcome! Log In Create A New Profile

Advanced

Bed Auto Leveling.. check this out

Posted by AlexBorro 
Re: Bed Auto Leveling.. check this out
April 01, 2014 07:56PM
Thanks EDN, I will give it a try on my next machine that I am building now.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
April 06, 2014 05:41PM
Hi,

I´ve completed the auto bed leveling functionallity in my Prusa i3 today and most of the features are working - unfortunately not all...

Btw. I´m using RAMPS with Marlin.

First of all I´m a bit concerned about the values snending a G29 command in Pronterface:

SENDING:G29
Bed x: 15 y: 120 z: 10.12
Bed x: 15 y: 20 z: 14.75
Bed x: 120 y: 20 z: 18.76
echo:endstops hit: Z:18.76

If the Z values should represent mm than they are for sure wrong, my glas bed is nearly perfectly adjusted!

The second issue is, that the z axis is probably moving in the wrong direction. When I tried to print after G29, the z axis is constantly adjusting but not moving up... it is always "printing on the same layer...

Here are my settings in configuration.h:

#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)

#ifdef ENABLE_AUTO_BED_LEVELING

// these are the positions on the bed to do the probing
#define LEFT_PROBE_BED_POSITION 15
#define RIGHT_PROBE_BED_POSITION 120
#define BACK_PROBE_BED_POSITION 120
#define FRONT_PROBE_BED_POSITION 20

// these are the offsets to the prob relative to the extruder tip (Hotend - Probe)
#define X_PROBE_OFFSET_FROM_EXTRUDER -26
#define Y_PROBE_OFFSET_FROM_EXTRUDER 4
#define Z_PROBE_OFFSET_FROM_EXTRUDER -1.90

#define Z_RAISE_BEFORE_HOMING 10 // (in mm) Raise Z before homing (G28) for Probe Clearance.
// Be sure you have this distance over your Z_MAX_POS in case

#define XY_TRAVEL_SPEED 4000 // X and Y axis travel speed between probes, in mm/min

#define Z_RAISE_BEFORE_PROBING 10 //How much the extruder will be raised before traveling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points


I´m reading in this post since about 2 hours now and got a lot of hints... maybe I´m just to blind to see the solution?

Help appreciated...
Re: Bed Auto Leveling.. check this out
April 06, 2014 08:02PM
If you can see your Z motors turning, but the Z axis isn't changing, perhaps your Z nuts have come untrapped? Or the threaded rods come uncoupled from the motors? Both have happened to me recently.


MakerFarm 8" Prusa i3v
RAMPS 1.4
0.4mm E3D v6 for 1.75mm
Re: Bed Auto Leveling.. check this out
April 07, 2014 02:58AM
I forgot to mention that the printer is fully working since more than 2 month, I´ve just tried to upgrade to auto bed leveling. I´ve aluminium coupler for the z-axis inside and my Z nuts are fine.

Probably some configuration is wrong or I use the wrong software, not much else left.

Help still appreciated...
edn
Re: Bed Auto Leveling.. check this out
April 07, 2014 10:36AM
ciutateivissa:

Try the G29 code posted in this message:

[forums.reprap.org]

It is verbose and from the results it prints out we will know exactly what is going wrong with your setup and how to fix it. My guess is at the end it will print out a correction matrix that has a negitive number along the diagonal. If that is the case, we will know how to proceed to fix it.
Re: Bed Auto Leveling.. check this out
April 07, 2014 03:39PM
edn,

following your instruction in the above mentioned post i have:

1. replaced vector_3.cpp
2. put everything from G29.cpp in the "case29" section (replacing the old code) in Marlin_main.cpp

Here are my results:

>>>G28
SENDING:G28
>>>G29
SENDING:G29
xGridSpacing: 105.000000
yGridSpacing: 220.000000
Going to: (x,y) = (41.000000,16.000000)
Probed at x: 15.000000 y: 20.000000 z: 10.032459
Going to: (x,y) = (146.000000,16.000000)
Probed at x: 120.000000 y: 20.000000 z: 14.075418
~~
Going to: (x,y) = (146.000000,236.000000)
Probed at x: 120.000000 y: 240.000000 z: 18.583293
Going to: (x,y) = (41.000000,236.000000)
Probed at x: 15.000000 y: 240.000000 z: 23.789499
~~
Bed Height:
> 14.075418 10.032459
< 18.583293 23.789499
Total for Bed Height: 66.480667
Average Bed Height: 16.620166
Correct +.14 with one clockwise turn.
Delta Bed Height:
>-2.544749 -6.587708
<+1.963127 +7.169332



Eqn coefficients: a: -0.005539 b: 0.041511 d: 11.597619
planeNormal x: 0.0055393 y: -0.0415112 z: 1.0000000
Bed level matrix:
0.9999848 0.0000000 -0.0055392
0.0000000 0.9991395 0.0414754
0.0055344 -0.0414748 0.9991243
echo:endstops hit: Z:23.79

Hopefully you´ll know the next steps now, can´t wait to see it working ;-)

Thanks for your support!
Re: Bed Auto Leveling.. check this out
April 08, 2014 03:19PM
I have been thinking about doing this using a non-mechanical method on my printer.

I was looking at using either this:
[www.vishay.com]

preferably one of these:
[www.vishay.com]

It would be nice to have a function where I could click print and not have to hound the printer to make sure it doesn't level the bed incorrectly.

I am using a PrintR Board if anyone is curious.
edn
Re: Bed Auto Leveling.. check this out
April 08, 2014 05:11PM
Quote
ciutateivissa
edn,

following your instruction in the above mentioned post i have:

1. replaced vector_3.cpp
2. put everything from G29.cpp in the "case29" section (replacing the old code) in Marlin_main.cpp
...
Bed level matrix:
0.9999848 0.0000000 -0.0055392
0.0000000 0.9991395 0.0414754
0.0055344 -0.0414748 0.9991243
echo:endstops hit: Z:23.79

Hopefully you´ll know the next steps now, can´t wait to see it working ;-)

Thanks for your support!

ciutateivissa,

That Bed Level Matrix looks plausable. I was concerned you had a negative number along the diagonal, and you don't. Personally, I think you should bump the number of probe points up to at least n==3. (I'm running with n==5 and it doesn't slow me down because the nozzle is just getting up to the correct temperture when the last probe is being down.) However, with that said, it looks like the bed probing is producing correct and usable results.

What looks totally bogus is the Delta Bed Height. It is claiming there is a 13 mm difference from the origin to the (x,y)=(0,230) position on the bed. Surely, your bed is not tilted that dramatically????

I would like to see the same thing but with more probe points. Something is clearly wrong with the probing! (Unless of course, your bed really is tilted at a horrible angle!) More probe points will give some more clues!

And one more suggestion... After you bump the number of probe points up... How about you post the results of two G29 commands back to back? Lets see if the probe points are at all repeatable.

Edited 1 time(s). Last edit at 04/08/2014 05:18PM by edn.
Re: Bed Auto Leveling.. check this out
April 08, 2014 05:31PM
edn,

here we go... 9 callibration points / setting:3

>>>G28
SENDING:G28
>>>G29
SENDING:G29
xGridSpacing: 52.500000
yGridSpacing: 110.000000
Going to: (x,y) = (41.000000,16.000000)
Probed at x: 15.000000 y: 20.000000 z: 10.266110
Going to: (x,y) = (93.500000,16.000000)
Probed at x: 67.500000 y: 20.000000 z: 14.548449
Going to: (x,y) = (146.000000,16.000000)
Probed at x: 120.000000 y: 20.000000 z: 18.629594
~~
Going to: (x,y) = (146.000000,126.000000)
Probed at x: 120.000000 y: 130.000000 z: 23.142959
Going to: (x,y) = (93.500000,126.000000)
Probed at x: 67.500000 y: 130.000000 z: 28.177566
Going to: (x,y) = (41.000000,126.000000)
Probed at x: 15.000000 y: 130.000000 z: 33.069450
~~
Going to: (x,y) = (41.000000,236.000000)
Probed at x: 15.000000 y: 240.000000 z: 37.640571
Going to: (x,y) = (93.500000,236.000000)
Probed at x: 67.500000 y: 240.000000 z: 41.840572
Going to: (x,y) = (146.000000,236.000000)
Probed at x: 120.000000 y: 240.000000 z: 46.038902
~~
Bed Height:
> 18.629594 14.548449 10.266110
< 23.142959 28.177566 33.069450
> 46.038902 41.840572 37.640571
Total for Bed Height: 253.354187
Average Bed Height: 28.150465
Correct +.14 with one clockwise turn.
Delta Bed Height:
>-9.520871 -13.602017 -17.884355
<-5.007505 +0.027102 +4.918985
>+17.888437 +13.690108 +9.490107



Eqn coefficients: a: 0.021699 b: 0.124357 d: 10.519285
planeNormal x: -0.0216995 y: -0.1243574 z: 1.0000000
Bed level matrix:
0.9997646 0.0000000 0.0216944
0.0000000 0.9923562 0.1234068
-0.0215286 -0.1233782 0.9921261
echo:endstops hit: Z:46.04

The bed high differs less than 1 millimeter.
Re: Bed Auto Leveling.. check this out
April 08, 2014 05:42PM
edn,

here is the second shot:

>>>G28
SENDING:G28
>>>G29
SENDING:G29
xGridSpacing: 52.500000
yGridSpacing: 110.000000
Going to: (x,y) = (41.000000,16.000000)
Probed at x: 15.000000 y: 20.000000 z: 10.113842
Going to: (x,y) = (93.500000,16.000000)
Probed at x: 67.500000 y: 20.000000 z: 14.365872
Going to: (x,y) = (146.000000,16.000000)
Probed at x: 120.000000 y: 20.000000 z: 18.519092
~~
Going to: (x,y) = (146.000000,126.000000)
Probed at x: 120.000000 y: 130.000000 z: 23.129116
Going to: (x,y) = (93.500000,126.000000)
Probed at x: 67.500000 y: 130.000000 z: 28.154653
Going to: (x,y) = (41.000000,126.000000)
Probed at x: 15.000000 y: 130.000000 z: 32.854652
~~
Going to: (x,y) = (41.000000,236.000000)
Probed at x: 15.000000 y: 240.000000 z: 37.453701
Going to: (x,y) = (93.500000,236.000000)
Probed at x: 67.500000 y: 240.000000 z: 41.669929
Going to: (x,y) = (146.000000,236.000000)
Probed at x: 120.000000 y: 240.000000 z: 45.783771
~~
Bed Height:
> 18.519092 14.365872 10.113842
< 23.129116 28.154653 32.854652
> 45.783771 41.669929 37.453701
Total for Bed Height: 252.044631
Average Bed Height: 28.004959
Correct +.14 with one clockwise turn.
Delta Bed Height:
>-9.485867 -13.639088 -17.891117
<-4.875843 +0.149694 +4.849693
>+17.778812 +13.664971 +9.448742



Eqn coefficients: a: 0.022253 b: 0.124104 d: 10.369349
planeNormal x: -0.0222533 y: -0.1241039 z: 1.0000000
Bed level matrix:
0.9997525 0.0000000 0.0222478
0.0000000 0.9923870 0.1231591
-0.0220785 -0.1231291 0.9921450
echo:endstops hit: Z:45.78

I´ve attached the configuration.h as well. One thing which makes me thinking is that I´ve set the value for the x axis to move up between probing points to 5mm - but actually the do not react appropriate: Z-axis is NOT going up between the probing points.
Attachments:
open | download - Configuration.h (27.7 KB)
edn
Re: Bed Auto Leveling.. check this out
April 08, 2014 06:25PM
Did you notice each and every probe point increases by about 4mm? That is clearly wrong, especially if your bed is pretty level. Can you post your Marlin_Main.CPP file? I'll bet a line in it got corrupted. I'm going to run your Config.h and Marlin_main.cpp file through a diff program to compare it to mine. I bet it will be obvious what is going sour when we do the compare.
Re: Bed Auto Leveling.. check this out
April 09, 2014 02:13AM
edn,

thanks again for your support. Here is the Marlin:Main.cpp.
Attachments:
open | download - Marlin_main.cpp (123.9 KB)
Re: Bed Auto Leveling.. check this out
April 09, 2014 07:02AM
Hey - before I delve into auto bed levelling - is there an easy way to add it to the menu on the LCD? (I use a Sainsmart full graphics LCD).
Re: Bed Auto Leveling.. check this out
April 09, 2014 07:28AM
Quote
Dodgey99
Hey - before I delve into auto bed levelling - is there an easy way to add it to the menu on the LCD? (I use a Sainsmart full graphics LCD).

There is no need to do that, the function is built into the firmware so all you have to do is slice as normal with a G29 inserted into your start g-code and the firmware will take care of the rest for you automatically.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
edn
Re: Bed Auto Leveling.. check this out
April 09, 2014 10:50AM
Quote
ciutateivissa
edn,

thanks again for your support. Here is the Marlin:Main.cpp.

I found a couple of things I'm not sure about. For starters, lets make a couple of changes. You have:

#define LEFT_PROBE_BED_POSITION 15
#define X_PROBE_OFFSET_FROM_EXTRUDER -26

I think I remember some people having problems when they probed in 'negitive' space. Lets change it to:

#define LEFT_PROBE_BED_POSITION 27

-----------------------------------------------------------------------------------------
And... I don't know that this is a problem, but you have:

#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when traveling from between next probing points

but you raised it more in other conditions. And... every probe is off by about 4 mm. So I'm wondering if the switch is staying pressed????
Can we change it to

#define Z_RAISE_BETWEEN_PROBINGS 10 //How much the extruder will be raised when traveling from between next probing points

Just to be safe until things are working? (I don't think this is the issue because right now you are only kicking down the Z-Probe once until all the points are probed.)

----------------------------------------------------------------------

In Marlin_Main.CPP I see a couple of things, but lets not make too many changes at once. Can you re-run the G29 code with the above changes and post the results?

Edited 1 time(s). Last edit at 04/09/2014 10:51AM by edn.
Re: Bed Auto Leveling.. check this out
April 09, 2014 03:14PM
edn,

I did the changes you´ve suggested and tested with G28 and G29 again. Unfortunately I can´t see any changes and the strange thing is that changing #define Z_RAISE_BETWEEN_PROBINGS 10 doesn´t have any impact on the behavior of the printer.
When the microswitch goes down for measuring the printer does not get up on z axis at the choosen height!
1.) it gets DOWN quickly until the microswitch is pressed
2.) then it move a bit up until the switch is released
3.) then goes down slowly until the switch is triggered again
4.) move up just as far until the switch is released
This procedure is repeated then for all 9 calibration points - there is NO 10mm move on z-axis at all.

Here are the values:

>>>G28
SENDING:G28
>>>G29
SENDING:G29
xGridSpacing: 46.500000
yGridSpacing: 110.000000
Going to: (x,y) = (53.000000,16.000000)
Probed at x: 27.000000 y: 20.000000 z: 10.138425
Going to: (x,y) = (99.500000,16.000000)
Probed at x: 73.500000 y: 20.000000 z: 19.263723
Going to: (x,y) = (146.000000,16.000000)
Probed at x: 120.000000 y: 20.000000 z: 28.435321
~~
Going to: (x,y) = (146.000000,126.000000)
Probed at x: 120.000000 y: 130.000000 z: 37.972316
Going to: (x,y) = (99.500000,126.000000)
Probed at x: 73.500000 y: 130.000000 z: 47.909309
Going to: (x,y) = (53.000000,126.000000)
Probed at x: 27.000000 y: 130.000000 z: 57.826969
~~
Going to: (x,y) = (53.000000,236.000000)
Probed at x: 27.000000 y: 240.000000 z: 67.312889
Going to: (x,y) = (99.500000,236.000000)
Probed at x: 73.500000 y: 240.000000 z: 76.661811
Going to: (x,y) = (146.000000,236.000000)
Probed at x: 120.000000 y: 240.000000 z: 85.957038
~~
Bed Height:
> 28.435321 19.263723 10.138425
< 37.972316 47.909309 57.826969
> 85.957038 76.661811 67.312889
Total for Bed Height: 431.477783
Average Bed Height: 47.941974
Correct +.14 with one clockwise turn.
Delta Bed Height:
>-19.506652 -28.678251 -37.803550
<-9.969658 -0.032665 +9.884995
>+38.015064 +28.719837 +19.370914



Eqn coefficients: a: 0.061242 b: 0.260749 d: 9.543360
planeNormal x: -0.0612416 y: -0.2607489 z: 1.0000000
Bed level matrix:
0.9981300 0.0000000 0.0611270
0.0000000 0.9676458 0.2523126
-0.0591564 -0.2518707 0.9659512
echo:endstops hit: Z:85.96
edn
Re: Bed Auto Leveling.. check this out
April 09, 2014 03:49PM
Quote
ciutateivissa
edn,

I did the changes you´ve suggested and tested with G28 and G29 again. Unfortunately I can´t see any changes and the strange thing is that changing #define Z_RAISE_BETWEEN_PROBINGS 10 doesn´t have any impact on the behavior of the printer.
...

The biggest differences left to explore between our Configuration.h file are:

//#define EEPROM_SETTINGS
//#define EEPROM_CHITCHAT

It would be good to enable both of these. But I doubt that is going to be the issue. It would be good to change those to this for the next step:

#define EEPROM_SETTINGS
#define EEPROM_CHITCHAT

The reason being I have that turned on and have values stored there.

OK... Let's try a different approach. How about you rename your Marlin_Main.CPP file to something else so you don't lose it and can get it back after this test if things are not better??? I've included my Marlin_Main.CPP which I know for a fact works. I looked through it and there are number of differences from your file, but if we can get it to compile it would be very interesting to see what happens using it. I don't know for sure it is going to compile, but if it does, there are changes compared to your file in a number of areas. It is very possible that logic is going help clean things up.

If things don't compile cleanly, edit your Configuration_adv.h file and search for the start of this code block and change it to have the following information. I have some 'experimental' code to allow me to do filament changes without an LCD panel. To get the filament code changes in Marlin_main.cpp to compile it is possible you will have to have the following #define's. (I think it is going to compile without this... But just in case...) Either way with the filament change code, it should not affect anything because we are not going to be sending an M600 command to the printer...

// #define FWRETRACT //ONLY PARTIALLY TESTED
#define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt

// adds support for experimental filament exchange support M600; If ULTIPANEL is not defined
// the firmware will assume a switch is connected between PC2 (pin-12) to GROUND to provide
// Confirmation that the filament has been changed and the printer can continue.
#define FILAMENTCHANGEENABLE
#ifdef FILAMENTCHANGEENABLE
#define FILAMENTCHANGE_XPOS 130
#define FILAMENTCHANGE_YPOS 130
#define FILAMENTCHANGE_ZADD 25
#define FILAMENTCHANGE_FIRSTRETRACT -2
#define FILAMENTCHANGE_FINALRETRACT -100
#endif
//#endif

#ifdef FILAMENTCHANGEENABLE
#ifdef EXTRUDER_RUNOUT_PREVENT
#error EXTRUDER_RUNOUT_PREVENT currently incompatible with FILAMENTCHANGE
#endif
#endif


If that doesn't fix things, maybe the next step is for you to archive your entire file set and post it. I'll apply my Configuration.h file to it and see what my printer does with your code built with my Configuration.h file.
Attachments:
open | download - Marlin_main.cpp (137 KB)
Re: Bed Auto Leveling.. check this out
April 09, 2014 04:31PM
edn,

we´re making progress here!

With your Marlin_main.cpp file the printer performs the auto bed leveling as it should be. He moves the Z-axis before every probing point to 10mm and also the values below looking very promising. Btw. there was no need to use the filament change code in the configuration_adv.h file.


>>>G28
SENDING:G28
>>>G29
SENDING:G29
xGridSpacing: 46.500000
yGridSpacing: 110.000000
Going to: (x,y) = (53.000000,16.000000)
Probed at x: 27.000000 y: 20.000000 z: 2.143675
Going to: (x,y) = (99.500000,16.000000)
Probed at x: 73.500000 y: 20.000000 z: 1.878282
Going to: (x,y) = (146.000000,16.000000)
Probed at x: 120.000000 y: 20.000000 z: 1.627208
~
Going to: (x,y) = (146.000000,126.000000)
Probed at x: 120.000000 y: 130.000000 z: 1.532697
Going to: (x,y) = (99.500000,126.000000)
Probed at x: 73.500000 y: 130.000000 z: 1.835322
Going to: (x,y) = (53.000000,126.000000)
Probed at x: 27.000000 y: 130.000000 z: 2.103819
~
Going to: (x,y) = (53.000000,236.000000)
Probed at x: 27.000000 y: 240.000000 z: 2.102148
Going to: (x,y) = (99.500000,236.000000)
Probed at x: 73.500000 y: 240.000000 z: 1.831026
Going to: (x,y) = (146.000000,236.000000)
Probed at x: 120.000000 y: 240.000000 z: 1.533890
~
Bed Height:
> 1.627208 1.878282 2.143675
< 1.532697 1.835322 2.103819
> 1.533890 1.831026 2.102148
Total for Bed Height: 16.588066
Average Bed Height: 1.843118
Correct +.14 with one clockwise turn.
Delta Bed Height:
>-0.2159 +0.0352 +0.3006
<-0.3104 -0.0078 +0.2607
>-0.3092 -0.0121 +0.2590


Eqn coefficients: a: -0.005935 b: -0.000276 d: 2.315204
planeNormal x: 0.0059349 y: 0.0002759 z: 1.0000000
Bed level matrix:
0.9999825 0.0000000 -0.0059348
0.0000000 1.0000000 -0.0002759
0.0059348 0.0002759 0.9999824
echo:endstops hit: Z:1.53

I´ll going to print something now to test the feature, but this will take some time. I´ll keep you posted.

Many thanks so far, you´re a genius!
edn
Re: Bed Auto Leveling.. check this out
April 09, 2014 04:45PM
Quote
ciutateivissa
edn,

we´re making progress here!

With your Marlin_main.cpp file the printer performs the auto bed leveling as it should be. He moves the Z-axis before every probing point to 10mm and also the values below looking very promising. Btw. there was no need to use the filament change code in the configuration_adv.h file.

...

Delta Bed Height:
>-0.2159 +0.0352 +0.3006
<-0.3104 -0.0078 +0.2607
>-0.3092 -0.0121 +0.2590

Bed level matrix:
0.9999825 0.0000000 -0.0059348
0.0000000 1.0000000 -0.0002759
0.0059348 0.0002759 0.9999824
echo:endstops hit: Z:1.53

I´ll going to print something now to test the feature, but this will take some time. I´ll keep you posted.

Many thanks so far, you´re a genius!


Good deal! But a couple of comments... First, you have 1/2 mm of difference from one corner to the next. (or .6 mm going kitty-korner) It would be best to try to level that out just because with only n==3 probe points you are going to have adheasion problems when you get close to the edge of your print envelope. In the center of the bed, things should work pretty good. But I've noticed 'problem corners' with that much difference. With that said, if you can get the first layer down, the correction algorythyms will fix things during the print!

The other thing worth mentioning is you really don't want to use the Marlin_main.cpp code I posted. There is a lot of 'stuff' in there that will clutter things up for you when you try to upgrade to the next release of Marlin. Probably the way to proceed is to run a visual diff program comparing mine to a standard copy of Marlin_main.cpp and cut out any changes that are fluff. Or... Alternatively, just see if the standard Marlin_main.cpp works now. (I'm mostly concerned with all the clutter in mine that you will ever be able to upgrade again! I'm not concerned that the code works.)
Re: Bed Auto Leveling.. check this out
April 09, 2014 05:06PM
edn,

this could get tricky now...

With my version of Marlin_main.cpp the auto bed leveling feature is NOT working properly. On the otherhand I´m not able to figure out what can be removed from your file to get a clean code. Only compare the files does not help because some of your changes make the difference here...
edn
Re: Bed Auto Leveling.. check this out
April 09, 2014 06:00PM
Quote
ciutateivissa
edn,

this could get tricky now...

With my version of Marlin_main.cpp the auto bed leveling feature is NOT working properly. On the otherhand I´m not able to figure out what can be removed from your file to get a clean code. Only compare the files does not help because some of your changes make the difference here...

Yes... I understand what you are saying. Remember, I did a 'diff' of your code against mine. There were a number of changes to the Z-Probe code scattered throughout the code. Not all of those changes have been folded back into the main code base. And the whole reason I suggested you take my Marlin_Main.CPP code is because it was going to be some effort to figure out what differences you had that were making things sick. And there is always the possibility of introducing errors when making those kind of changes. It was safer to just take my working file and see if your system got better with it.

In the short term, you should be just fine using my copy of the Marlin_main.cpp file. It works. But I suspect if you put the latest distribution copy of the Marlin code base in place with your Configuration.h parameters inserted into it.... It should work. That would be my suggestion of how you should proceed so you have a code base that can be supported. Right now, you have a mish-mash of a number of code bases. And to make matters worse, my code (that you are using) has three or four different people's stuff in it that has not made it back to the main code base. It works... But it isn't maintainable. Now that you have all the configuration.h settings 'correct', it should be easy to start with a fresh copy of the distribuition code and just apply your unique settings. That should get you back to a code base that can be easily supported.

But of course... Do what makes sense for you! And have fun with the auto-bed_leveling! It really is cool!
Re: Bed Auto Leveling.. check this out
April 21, 2014 07:13PM
Has anyone else experienced the Y axis moving slightly during a Z "raise before homing" move? I have Marlin set to lift the Z axis 15mm before homing, and likewise, the Y axis is moved 15mm away from its endstop. I haven't been able to figure out why it's doing this. "Safe Z Homing" is disabled. Does anyone have a solution?


MakerFarm 8" Prusa i3v
RAMPS 1.4
0.4mm E3D v6 for 1.75mm
Re: Bed Auto Leveling.. check this out
April 25, 2014 09:07AM
Anyone know in which direction and what increments to adjust my Z offset for fine tuning? Auto level is working great. Just need to lower the head by a fraction. At 1st it printed the 1st layer as a smear, as I like it, but as the phyiscal bits settled in it now lays a round line so I want to bring the head down a touch without messing around too much.

My Z offset is 3.40 (well, -3.40 in the code as you have to reverse it). Would -3.45 be in the right direction? I know I can try and error but would prefer not to scrape the kapton.

EDIT: Scratch that - done it/ Took it from 3.4 to 3.6 and went from a round 1st layer to a squished one. 3.55 might be perfect but will see how 3.6 goes . Seems good so far. Might use 3.6 for ABS and 3.55 for PLA....

Edited 3 time(s). Last edit at 04/25/2014 12:11PM by Dodgey99.
Re: Bed Auto Leveling.. check this out
April 27, 2014 06:47PM
Loving the Auto Levelling. It makes printing so much less hassle.

[www.youtube.com]
Re: Bed Auto Leveling.. check this out
April 27, 2014 10:24PM
I have enabled auto bed leveling using Marlin firmware (downloaded 4/24/14) and a servo mounted on the right front of my extruder. After doing a G29 it probes 4 spots on the bed ending up at the rear left of the bed. I do a G1 Z0 there and the extruder is at .1mm from the bed but it I move to the right edge of the bed it raises the extruder by .5mm.
This is the output of the last G29:

Bed x: 45.00 y: 50.00 z: 6.42
Bed x: 195.00 y: 50.00 z: 6.68
Bed x: 195.00 y: 141.00 z: 7.04
Bed x: 45.00 y: 141.00 z: 6.99
Eqn coefficients: a: 0.00 b: 0.01 d: 6.16
planeNormal x: -0.0010533 y: -0.0051319 z: 1.0000000
echo:endstops hit: Z:6.99

I have tried the 3 point leveling and the auto bed leveling grid having the same issues

//============================= Bed Auto Leveling ===========================

#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)

#ifdef ENABLE_AUTO_BED_LEVELING

// There are 2 different ways to pick the X and Y locations to probe:

// - "grid" mode
// Probe every point in a rectangular grid
// You must specify the rectangle, and the density of sample points
// This mode is preferred because there are more measurements.
// It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive

// - "3-point" mode
// Probe 3 arbitrary points on the bed (that aren't colinear)
// You must specify the X & Y coordinates of all 3 points

#define AUTO_BED_LEVELING_GRID
// with AUTO_BED_LEVELING_GRID, the bed is sampled in a
// AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
// and least squares solution is calculated
// Note: this feature occupies 10'206 byte
#ifdef AUTO_BED_LEVELING_GRID

// set the rectangle in which to probe
#define LEFT_PROBE_BED_POSITION 45
#define RIGHT_PROBE_BED_POSITION 195
#define BACK_PROBE_BED_POSITION 141
#define FRONT_PROBE_BED_POSITION 50

// set the number of grid points per dimension
// I wouldn't see a reason to go above 3 (=9 probing points on the bed)
#define AUTO_BED_LEVELING_GRID_POINTS 2


#else // not AUTO_BED_LEVELING_GRID
// with no grid, just probe 3 arbitrary points. A simple cross-product
// is used to esimate the plane of the print bed

#define ABL_PROBE_PT_1_X 45
#define ABL_PROBE_PT_1_Y 175
#define ABL_PROBE_PT_2_X 45
#define ABL_PROBE_PT_2_Y 10
#define ABL_PROBE_PT_3_X 145
#define ABL_PROBE_PT_3_Y 120

#endif // AUTO_BED_LEVELING_GRID


// these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
#define X_PROBE_OFFSET_FROM_EXTRUDER 44
#define Y_PROBE_OFFSET_FROM_EXTRUDER -18
#define Z_PROBE_OFFSET_FROM_EXTRUDER -6.9
edn
Re: Bed Auto Leveling.. check this out
April 27, 2014 11:26PM
Quote
randyf1965
I have enabled auto bed leveling using Marlin firmware (downloaded 4/24/14) and a servo mounted on the right front of my extruder. After doing a G29 it probes 4 spots on the bed ending up at the rear left of the bed. I do a G1 Z0 there and the extruder is at .1mm from the bed but it I move to the right edge of the bed it raises the extruder by .5mm.

...

I have tried the 3 point leveling and the auto bed leveling grid having the same issues

Do you have the line:

#define AUTO_BED_LEVELING_GRID

in your configuration.h file? If so, you need to enable it. And set the

#define AUTO_BED_LEVELING_GRID_POINTS 4

I suspect you are going to see much better results than with 4 points being probed. A 2x2 grid is not sufficient.
Re: Bed Auto Leveling.. check this out
April 27, 2014 11:42PM
#define AUTO_BED_LEVELING_GRID is defined and I set 4 points but have the same issue of being .5mm too high

SENDING:G29
Bed x: 45.00 y: 20.00 z: 6.09
Bed x: 95.00 y: 20.00 z: 6.37
Bed x: 145.00 y: 20.00 z: 6.47
Bed x: 195.00 y: 20.00 z: 6.54
Bed x: 195.00 y: 63.00 z: 6.77
Bed x: 145.00 y: 63.00 z: 6.77
Bed x: 95.00 y: 63.00 z: 6.67
Bed x: 45.00 y: 63.00 z: 6.51
Bed x: 45.00 y: 106.00 z: 6.85
Bed x: 95.00 y: 106.00 z: 6.95
Bed x: 145.00 y: 106.00 z: 6.98
Bed x: 195.00 y: 106.00 z: 6.95
Bed x: 195.00 y: 149.00 z: 7.10
Bed x: 145.00 y: 149.00 z: 7.13
Bed x: 95.00 y: 149.00 z: 7.10
Bed x: 45.00 y: 149.00 z: 7.07
Eqn coefficients: a: 0.00 b: 0.01 d: 6.12
planeNormal x: -0.0013850 y: -0.0056974 z: 1.0000000
echo:endstops hit: Z:7.07
Re: Bed Auto Leveling.. check this out
April 28, 2014 09:36PM
Installed a full graphics smart controller (128x64 lcd) and am printing a case for it, it appears the issue with my bed leveling is resolved but I will waiting until the back is printed.

Should I have power cycled the ramps/arduino controller after updating the firmware? or does it do that on its own? I visually saw the smart controller restart after flashing.
edn
Re: Bed Auto Leveling.. check this out
April 30, 2014 11:57AM
Quote
randyf1965
Installed a full graphics smart controller (128x64 lcd) and am printing a case for it, it appears the issue with my bed leveling is resolved but I will waiting until the back is printed.

Should I have power cycled the ramps/arduino controller after updating the firmware? or does it do that on its own? I visually saw the smart controller restart after flashing.

You should reset the controller. But if you are able to print, that had to happen because the boot loader that burns the firmware doesn't have all the stuff needed to print. So if you can print, you are good.
Re: Bed Auto Leveling.. check this out
May 03, 2014 04:35AM
I've never had to power cycle and arduino after uploading a sketch to it ( flashing the firmware). My full graphic lcd refreshes as the arduino resets itself after an upload. No need to power cycle.
Sorry, only registered users may post in this forum.

Click here to login