Welcome! Log In Create A New Profile

Advanced

Bed Auto Leveling.. check this out

Posted by AlexBorro 
Re: Bed Auto Leveling.. check this out
June 19, 2014 09:32PM
Edn trying to modify my marlin_main.cpp file G29 command but if I replace the G29 section I get :

Marlin_main.cpp: In function ‘void process_commands()’:
Marlin_main.cpp:1697: error: ‘set_bed_level_equation’ was not declared in this scope


I have downloaded your copy of the marlin_main.cpp file but get errors:
ultralcd.cpp.o: In function `lcd_prepare_menu()':
ultralcd.cpp:566: undefined reference to `zprobe_zoffset'
ultralcd.cpp:566: undefined reference to `zprobe_zoffset'
ultralcd.cpp:566: undefined reference to `zprobe_zoffset'
ultralcd.cpp:566: undefined reference to `zprobe_zoffset'
ultralcd.cpp:570: undefined reference to `zprobe_zoffset'
ultralcd.cpp.o:ultralcd.cpp:570: more undefined references to `zprobe_zoffset' follow
ultralcd.cpp.o: In function `lcd_prepare_menu()':
ultralcd.cpp:588: undefined reference to `extruder_multiply'
ultralcd.cpp:588: undefined reference to `extruder_multiply'
ultralcd.cpp:588: undefined reference to `extruder_multiply'
ultralcd.cpp:588: undefined reference to `extruder_multiply'
ultralcd.cpp:588: undefined reference to `extruder_multiply'
ultralcd.cpp.o:ultralcd.cpp:588: more undefined references to `extruder_multiply' follow
ultralcd.cpp.o: In function `lcd_prepare_menu()':
ultralcd.cpp:558: undefined reference to `refresh_cmd_timeout()'
ultralcd.cpp:558: undefined reference to `refresh_cmd_timeout()'
ultralcd.cpp:558: undefined reference to `refresh_cmd_timeout()'
ConfigurationStore.cpp.o: In function `Config_RetrieveSettings()':
ConfigurationStore.cpp:19: undefined reference to `zprobe_zoffset'
ConfigurationStore.cpp:19: undefined reference to `zprobe_zoffset'
ConfigurationStore.cpp.o: In function `Config_RetrieveSettings()':
/home/randykb/arduino-1.0.5/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../avr/include/avr/eeprom.h:218: undefined reference to `zprobe_zoffset'
ConfigurationStore.cpp.o: In function `Config_RetrieveSettings()':
ConfigurationStore.cpp:21: undefined reference to `zprobe_zoffset'
ConfigurationStore.cpp:22: undefined reference to `zprobe_zoffset'
ConfigurationStore.cpp.o:ConfigurationStore.cpp:19: more undefined references to `zprobe_zoffset' follow
planner.cpp.o: In function `plan_buffer_line(float, float, float, float const&, float, unsigned char const&winking smiley':
planner.cpp:596: undefined reference to `volumetric_multiplier'
planner.cpp:596: undefined reference to `volumetric_multiplier'


I am still having issues with the autoleveling not being consistent across the build platform
Re: Bed Auto Leveling.. check this out
June 22, 2014 09:11PM
Hello
I have prusa i3v I followed the instructions downloaded firmware from github entered as it said how to change firmware but when i verify it in arduino1.0.5-r5 i get the following errors

SERIAL_PROTOCOLLN(((READ(X_MIN_PIN)^X_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));


Marlin_main.cpp: In function 'void process_commands()':
Marlin_main.cpp:1270: error: 'X_ENDSTOPS_INVERTING' was not declared in this scope
Marlin_main.cpp:1274: error: 'X_ENDSTOPS_INVERTING' was not declared in this scope
Marlin_main.cpp:1278: error: 'Y_ENDSTOPS_INVERTING' was not declared in this scope
Marlin_main.cpp:1282: error: 'Y_ENDSTOPS_INVERTING' was not declared in this scope
Marlin_main.cpp:1286: error: 'Z_ENDSTOPS_INVERTING' was not declared in this scope
Marlin_main.cpp:1290: error: 'Z_ENDSTOPS_INVERTING' was not declared in this scope



in the marlin_main.cpp i only changed the configuration.h files as instructed by the guides


Please help been tying t figure this out for 2 weeks
Thank You
Re: Bed Auto Leveling.. check this out
June 22, 2014 09:28PM
Here is the file i am havind endstop errors after i followed to instructions for prusa i3v autobed leveling
Attachments:
open | download - configuration.h (30.5 KB)
Re: Bed Auto Leveling.. check this out
June 23, 2014 04:19AM
Quote
ddutch
Hello
I have prusa i3v I followed the instructions downloaded firmware from github entered as it said how to change firmware but when i verify it in arduino1.0.5-r5 i get the following errors

SERIAL_PROTOCOLLN(((READ(X_MIN_PIN)^X_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));


Marlin_main.cpp: In function 'void process_commands()':
Marlin_main.cpp:1270: error: 'X_ENDSTOPS_INVERTING' was not declared in this scope
Marlin_main.cpp:1274: error: 'X_ENDSTOPS_INVERTING' was not declared in this scope
Marlin_main.cpp:1278: error: 'Y_ENDSTOPS_INVERTING' was not declared in this scope
Marlin_main.cpp:1282: error: 'Y_ENDSTOPS_INVERTING' was not declared in this scope
Marlin_main.cpp:1286: error: 'Z_ENDSTOPS_INVERTING' was not declared in this scope
Marlin_main.cpp:1290: error: 'Z_ENDSTOPS_INVERTING' was not declared in this scope



in the marlin_main.cpp i only changed the configuration.h files as instructed by the guides


Please help been tying t figure this out for 2 weeks

Thank You

Hi I'm not sure if this is the problem but have you tried compiling it with an older version of arduino? I used to have to use 0023 until recently then I had to switch to 1.0.1 as the new version I downloaded had been saved in a newer version and wouldn't compile without errors. I don't understand code well enough to help if it's something else but hopefully someone will spot the problem.
Re: Bed Auto Leveling.. check this out
July 09, 2014 09:39PM
Quote
yotiro
For those trying to use a RUMBA board like me.
I've managed to operate a hobby servo connected on ext3. Pins 2 / 4 / 6 has +5v / gnd / pwm2 signals.

I've added on pins.h file the following text in red:

------------------------------------------------------------------------------------------------------------------------------------------
#define LCD_PINS_D6 41
#define LCD_PINS_D7 40
#define BTN_EN1 11
#define BTN_EN2 12
#define BTN_ENC 43

#ifdef NUM_SERVOS
#define SERVO0_PIN 5

#if NUM_SERVOS > 1
#define SERVO1_PIN 4
#endif

#endif


#endif //MOTHERBOARD==80
------------------------------------------------------------------------------------------------------------------------------------------

Be careful about polarity for the servo. Servo's plug normally has +Vcc in the middle, I switched possitive and negative servo wires position and connected as in the attached photo and works ok. Pay lots of attention to polarity of possitive and negative wires or you'll burn the servo and/or damage the board.

The servo I'm using for tests it's a hextronik mg14, no problems, min/max position for me are 0 / 90.

Greets
Fernando

Hey Guys, I'd just thought I'd sign up and post my thanks for Fernando's information as I wasnt the best at interpreting the Block Diagram. for the RUMBA board

Anyway, my servo was on the cheaper side (6 bux from a hobby website) with metal gears and the like, as such it pulls enough current to brown out the +5V rail and reset the ATMega.
I've solved this with an 1000uF Electrolytic Bypass cap across the +5V and GND pins and now all is working great.

I should probably go a little bigger but the real solution would be another +5V rail.
Re: Bed Auto Leveling.. check this out
July 14, 2014 03:12AM
Thanks to everyone for this great thread. Alex, Zennmaster, and all the others have made it pretty easy to get this setup and working on my i3 variant. I have a question about the some of the values in the firmware once this is working.

First of all, here are my offsets from my probe to the extruder.
  #define X_PROBE_OFFSET_FROM_EXTRUDER 31.0
  #define Y_PROBE_OFFSET_FROM_EXTRUDER 2.0
  #define Z_PROBE_OFFSET_FROM_EXTRUDER -10.26

Now, my question is about the min/max setting for the AUTO_BED_LEVELING_GRID. Based on Zennmaster's video, these are currently set to very conservative values to make sure that nothing goes off the bed.
    #define LEFT_PROBE_BED_POSITION 50
    #define RIGHT_PROBE_BED_POSITION 150
    #define BACK_PROBE_BED_POSITION 150
    #define FRONT_PROBE_BED_POSITION 50

Let's say my bed usable dimensions are 190x190.

Now that I have my offsets, what are the min/max ranges I can set? I believe I've seen in this thread that we don't want the min value to be less than the probe X or Y offset, so in my case, I don't want to set LEFT_PROBE_BED_POSITION less than 31 and I don't want to set FRONT_PROBE_BED_POSITION less than 2. But what about the max values? I'm guessing we need to keep the probe over the bed, so would my max be less than the max dimension minus the probe offset? In my case RIGHT_PROBE_BED_POSITION should be less than (190 - 31) or 159? Am I correct in my calculations? Of course I would offset that a few mm since the probe microswitch lever is wider than 1mm.

Even though the defines say "PROBE_BED_POSITION", it appears what we're trying to accomplish is keep both the probe and the hotend within the usable build area, correct?

Bruce
Re: Bed Auto Leveling.. check this out
July 14, 2014 04:13AM
You could try this

// set the rectangle in which to probe
#define LEFT_PROBE_BED_POSITION (X_PROBE_OFFSET_FROM_EXTRUDER+2)
#define RIGHT_PROBE_BED_POSITION X_MAX_POS
#define BACK_PROBE_BED_POSITION Y_MAX_POS
#define FRONT_PROBE_BED_POSITION (Y_PROBE_OFFSET_FROM_EXTRUDER+2)

// 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 5
//#define ORIGIN_FRONT_LEFT
//#define ORIGIN_BACK_LEFT
//#define ORIGIN_FRONT_RIGHT
//#define ORIGIN_BACK_RIGHT

I should just say I didn't come up with this, I copied it from Roxy's configuration.h.

Edited 1 time(s). Last edit at 07/14/2014 05:18AM by Brainscan.
Re: Bed Auto Leveling.. check this out
July 14, 2014 06:34AM
Quote
Brainscan
You could try this

// set the rectangle in which to probe
#define LEFT_PROBE_BED_POSITION (X_PROBE_OFFSET_FROM_EXTRUDER+2)
#define RIGHT_PROBE_BED_POSITION X_MAX_POS
#define BACK_PROBE_BED_POSITION Y_MAX_POS
#define FRONT_PROBE_BED_POSITION (Y_PROBE_OFFSET_FROM_EXTRUDER+2)

// 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 5
//#define ORIGIN_FRONT_LEFT
//#define ORIGIN_BACK_LEFT
//#define ORIGIN_FRONT_RIGHT
//#define ORIGIN_BACK_RIGHT

I should just say I didn't come up with this, I copied it from Roxy's configuration.h.

Yeah, that actually works. It seems the define names are correct. It is asking for the absolute probe position, so when I put in a max of 188, it moves the probe to 188, not the hotend.

Bruce
Re: Bed Auto Leveling.. check this out
July 14, 2014 07:40AM
Just something that I ran into that was mentioned briefly a couple pages ago in this thread. Once you've got your values in Configuration.h and uploaded to the Mega board, you should do a M502 to restore factory settings, followed by a M500 to refresh the EEPROM settings. Be careful you don't have any other settings you've changed only in EEPROM and write them down if you do so you can put them back.

I completely glossed over that in the thread because I didn't see any settings related to ABL in Repetier Host's EEPROM dialog box, but actually the z probe offset is stored in there. I couldn't figure out why when I went to start my first print, it did the G28 followed by the G29, but the print head was still over 10mm off the bed when it started printing.

Bruce
Re: Bed Auto Leveling.. check this out
July 17, 2014 10:08PM
Just got this ABL setup and running great but the ONLY thing I dont like is how the probe retracts between probing. Is there a setting to keep the servo down while probing and then lift after the last probe?
Re: Bed Auto Leveling.. check this out
July 18, 2014 01:19AM
Quote
Floyd
Just got this ABL setup and running great but the ONLY thing I dont like is how the probe retracts between probing. Is there a setting to keep the servo down while probing and then lift after the last probe?

Earlier in the thread, I think there was some code you could modify to keep the probe down while probing.

I think it should be an option in the Configuration.h ultimately though.

Also, doesn't it seem like there should be a Z_RAISE_BEFORE_RETRACT setting? We have settings to raise the z-axis before homing and before probing to make sure we have clearance to get the probe down, but when it's done, the probe just retracts where it is. It works ok for my case, but it seems like someone could have a probe setup where the probe might need a little clearance to retract without hitting the bed.
Re: Bed Auto Leveling.. check this out
July 18, 2014 11:11AM
Ill have to dig through some pages to see then I guess.
I agree it should lift a little before it retracts because my switch hits against the bed when it does.
It seems like a silly little request but id rather have this setup and last instead of the switch hitting the bed a few times before I print.
Re: Bed Auto Leveling.. check this out
July 18, 2014 01:16PM
[3dprintboard.com] Roxy came up with some enhanced code for G29 and he said it's easy to add a blocking move to raise before retract. I forgot to ask him how to do it but he replies really quickly so if you request the change there he should help pretty swiftly. I recommend getting his M48 probe repeatabilty code too.

Edited 2 time(s). Last edit at 07/18/2014 01:17PM by Brainscan.
edn
Re: Bed Auto Leveling.. check this out
July 20, 2014 04:36PM
Quote
brucehvn
Also, doesn't it seem like there should be a Z_RAISE_BEFORE_RETRACT setting? We have settings to raise the z-axis before homing and before probing to make sure we have clearance to get the probe down, but when it's done, the probe just retracts where it is. It works ok for my case, but it seems like someone could have a probe setup where the probe might need a little clearance to retract without hitting the bed.

Yes, that should be in there. But if you install the Enhanced Bed Leveling code at:

[3dprintboard.com]

You can make the probe raise before it retracts.
Re: Bed Auto Leveling.. check this out
July 21, 2014 09:48AM
Thanks guys, got it cranking away and working great for the G29 probe.
Is there anyway to have the G28 z home work the same way? or atleast lift 2-3mm before retract?
Re: Bed Auto Leveling.. check this out
July 21, 2014 11:06AM
Quote
Floyd
Thanks guys, got it cranking away and working great for the G29 probe.
Is there anyway to have the G28 z home work the same way? or atleast lift 2-3mm before retract?

You can always add a lift in your start code.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
July 21, 2014 12:51PM
Quote
Floyd
Thanks guys, got it cranking away and working great for the G29 probe.
Is there anyway to have the G28 z home work the same way? or atleast lift 2-3mm before retract?

Roxy has edited the first post at 3dprintboard with info about how to add the retract to the G28 command.
Re: Bed Auto Leveling.. check this out
July 21, 2014 04:03PM
Quote
regpye

You can always add a lift in your start code.

Adding a lift in the start code won't help this problem, sorry.

Edited 1 time(s). Last edit at 07/21/2014 04:06PM by Brainscan.
Re: Bed Auto Leveling.. check this out
July 22, 2014 02:48PM
Quote
Brainscan
Roxy has edited the first post at 3dprintboard with info about how to add the retract to the G28 command.
Thanks ill check it out. Other than this little issue it works great.
Re: Bed Auto Leveling.. check this out
July 22, 2014 08:37PM
Changed my firmware and it works great now. No more bumping the plate!
Re: Bed Auto Leveling.. check this out
August 09, 2014 08:42PM
So - this looks great. I'm dead sick of leveling the bed. Some PLAs its not so critical, but I;ve got this green stuff that that doesn't stick unless the bed temp and Z height from the bed are spot on. As well, the springs and screw adjusters seem to vary a little over very long prints where there has been lots of vibration (high speed hex infill for example).

Anyway, I upgraded the Sanguinololu board to a 1284p processor and now have the memory space for the auto bed level. But I have no servo outputs on the board.

Anyone connected this servo to the Sang. board before ?

Also, limit switches seem to have terrible repeatability. I'm going to use self adhesive copper tape in each corner of the glass, with a small electrical test probe monted on the servo. Should give better than .05mm precision which is what is required for this.

Also - I assume that the Z probe is connected in parallel to the normal Z end stop switch ?
Re: Bed Auto Leveling.. check this out
August 10, 2014 08:10AM
Finally got bed levelling working.

Problem is that when you have the EEPROM turned on in the configuration, the Z-height offset of the probe is not taken over from the Configuration.h file.
You need to go into the menu and go to CONTROL -> MOTION -> Z Offset. Another thing is that this value is positive while you would expect it to be the same as in the Configuration.h (negative).
Re: Bed Auto Leveling.. check this out
August 10, 2014 08:51AM
When changing the z probe offset you need to send M502 followed by M500 or it will just use the last settings stored in EEPROM, and yes the offset will be negative.
Re: Bed Auto Leveling.. check this out
August 10, 2014 09:03AM
I would like to see an "Probe bed level" menu item in the marlin menu which does G29.

Also with the "clasic" endstop situation I had, choosing "Auto home" homed all my axis and put the nozzle in the home position.
Because I have auto bed leveling now and safe z homing, it stays in the middle of the bed.
I would like it to go to the home position with the auto home command in the menu.
Re: Bed Auto Leveling.. check this out
August 10, 2014 09:11AM
Quote
maxaha1
So - this looks great. I'm dead sick of leveling the bed. Some PLAs its not so critical, but I;ve got this green stuff that that doesn't stick unless the bed temp and Z height from the bed are spot on. As well, the springs and screw adjusters seem to vary a little over very long prints where there has been lots of vibration (high speed hex infill for example).

Anyway, I upgraded the Sanguinololu board to a 1284p processor and now have the memory space for the auto bed level. But I have no servo outputs on the board.

Anyone connected this servo to the Sang. board before ?

Also, limit switches seem to have terrible repeatability. I'm going to use self adhesive copper tape in each corner of the glass, with a small electrical test probe monted on the servo. Should give better than .05mm precision which is what is required for this.

Also - I assume that the Z probe is connected in parallel to the normal Z end stop switch ?

I use Hall effect sensors so I can probe a 5x5 grid using Roxy's lovely code and get 0.0002 repeatability which is way more than needed.
Re: Bed Auto Leveling.. check this out
August 10, 2014 09:28AM
Quote
Draob
I would like to see an "Probe bed level" menu item in the marlin menu which does G29.

Also with the "clasic" endstop situation I had, choosing "Auto home" homed all my axis and put the nozzle in the home position.
Because I have auto bed leveling now and safe z homing, it stays in the middle of the bed.
I would like it to go to the home position with the auto home command in the menu.

I'm not sure what you mean by the "marlin menu". Do you mean in your host software?

As far as the probe location, by default safe z homing puts the probe in the middle of the bed, but you can set the coordinates for safe z homing in your Configuration.h. So you can have the "safe" home be the same position you used to have when doing a G28 (home all axes). You just have to set those coordinates correctly to make sure the probe is not off the bed.
Re: Bed Auto Leveling.. check this out
August 10, 2014 11:51AM
I meant the menu on the LCD if you have one connected.

It would be great to add it, since you can also adjust the Z-offset from the LCD.

What I mean is that according to the marlin code list G28 means home al axis.
But with auto bed leveling it doesn't do that, it homes X and Y and Z still stays from the printbed.

Because G28 is different when you don't have auto bed leveling and when you do, everyone has to change their sliced G-code files for this.
Re: Bed Auto Leveling.. check this out
August 10, 2014 12:04PM
I'm a bit confused by what you mean too?! G28 does home all axis whether you have bed levelling or not. The fact that the nozzle is above the bed at the end is purely due to the z offset. Send G1 Z0 after homing and your nozzle will go to the bed. Really not sure what the issue is as this is expected behaviour. Also z offset should be set in configuration.h and then updated with M502 then M500, using z offsets in other places is likely to cause problems at some point. If you have your probe offset correctly you shouldn't have to use M206 at all. I don't have an LCD at the moment but buttons can easily be added to pronterface but I'm sure they can be added to the LCD menu too I just haven't had to figure that out for myself yet. Bruce gives a good explanation above about choosing your own safe z probe position.

Edited 1 time(s). Last edit at 08/10/2014 12:04PM by Brainscan.
Re: Bed Auto Leveling.. check this out
August 11, 2014 03:38AM
hello i tryed both versions same thing happens
Re: Bed Auto Leveling.. check this out
August 11, 2014 05:04AM
Quote
maxaha1


I use Hall effect sensors so I can probe a 5x5 grid using Roxy's lovely code and get 0.0002 repeatability which is way more than needed.

How did you set up the hall effect sensor, that would interest me greatly.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Sorry, only registered users may post in this forum.

Click here to login