Welcome! Log In Create A New Profile

Advanced

Bed Auto Leveling.. check this out

Posted by AlexBorro 
Re: Bed Auto Leveling.. check this out
October 30, 2013 04:55AM
Well the servo is working now, but now none of my axis will move. No idea what is wrong with it.

EDIT: Making sure the power supply is on is always good. Maybe I should go to bed now smiling smiley

UPDATE: Now the printer is crashing constantly.

Edited 2 time(s). Last edit at 10/30/2013 05:00AM by Hawkeye0914.
Re: Bed Auto Leveling.. check this out
October 30, 2013 05:04AM
I messed something up. Now when I turn the printer on the servo just spins continuously.

EDIT: While trying to go through the setting a small mark series. I can here all of the motors making noises like they are straining. Then after a few minutes, the printer crashes and comes back a couple of times then the servo just goes nuts. Once that happens just plugging in the printer makes the servo go nuts spinning. I believe that this has ruined two of my servos.

Edited 1 time(s). Last edit at 10/30/2013 05:23AM by Hawkeye0914.
Re: Bed Auto Leveling.. check this out
October 30, 2013 01:06PM
If the servo(s) are wired to the 5V supply, they may be pulling more current than the regulator on your Mega board can handle. I'd check and make sure you have low power servos.
Re: Bed Auto Leveling.. check this out
October 30, 2013 01:07PM
uncle_bob Wrote:
-------------------------------------------------------
> If the servo(s) are wired to the 5V supply, they
> may be pulling more current than the regulator on
> your Mega board can handle. I'd check and make
> sure you have low power servos.


Somehow I killed two servos, but it seems to be working now. Is there a way to run the auto level without running a print? I would like to make sure its working.
Re: Bed Auto Leveling.. check this out
October 30, 2013 01:48PM
Just do a G28 then a G29.

You have to do it every time before printing manually or put iit the codes in your g-code start.

And you can measure on the bed. Look at the z axis when you are moving X or Y.
Re: Bed Auto Leveling.. check this out
October 31, 2013 05:49PM
I finally got everything working, the right height and everything except now, after G29 completes and the printing starts. It seems like the axes are inverted from what they were. Ill try to take a video to show what its doing.

EDIT: If I home the X and Y axes, it doesnt have the axes reversed. Does this reset the leveling data?

Edited 1 time(s). Last edit at 11/02/2013 12:08AM by Hawkeye0914.
Re: Bed Auto Leveling.. check this out
November 03, 2013 04:53PM
Hi, i have a Makerfarm Prusa i3 8" and im adding the Auto Leveling Feature to it.
Now i have a problem that i dont get fixed.
Everytime when i send the G29 command i got the message that the Z Endstops are hit after the third position are tested.
Can anyone help me?

thanks a lot
Tarzipan
Re: Bed Auto Leveling.. check this out
November 03, 2013 05:14PM
Tarzipan, actually the Z Endstop was hit!!! No problem at all with such message..

Best Regards.

Alex.
Re: Bed Auto Leveling.. check this out
November 03, 2013 09:14PM
This thread is very cool. I'm wondering, has anyone hooked a servo up to a Rambo board? Looking at the Wiki information, I'm guessing I would need to hook it up to pin 1, which is connected to the PWMExt pin holes in the PCB. Is this correct?

Also, for the 5V supply, is the pin labeled 5V always going to have regulated 5V that I can use for the servo motor?

Thanks,
-- John
Re: Bed Auto Leveling.. check this out
November 04, 2013 03:01AM
Yes The z endstop is triggered, but After The third probe they Lift up The z Probe and stopped all movings. So The probing is Not completed.
Im using your Firmware from github with The settings from The makerfarm Firmware.

Maybe i made an mistake by configure The nozzle Offset but when i send G92 The Display wont Set The coordinates to 0x 0y 0z, or ist this command Not there for Setting The coordinates to zero?

Edit: Here ist the Log from Repetier Host
09:40:11.176 : Bed x: 30 y: 130 z: 17.85
09:40:30.588 : Bed x: 30 y: 30 z: 18.23
09:40:52.380 : Bed x: 130 y: 30 z: 17.43
09:40:52.380 : echo:endstops hit: Z:17.43

Edited 1 time(s). Last edit at 11/04/2013 03:53AM by Tarzipan.
Re: Bed Auto Leveling.. check this out
November 04, 2013 04:44AM
Tarzipan, check this line in your configuration_adv.h, it shout be NOT commented:
#define ENDSTOPS_ONLY_FOR_HOMING

Mit freundlichen Grüßen

Alex.
Re: Bed Auto Leveling.. check this out
November 04, 2013 05:20AM
Its already not commented.

My Configs:
//============================= 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

// these are the positions on the bed to do the probing
#define LEFT_PROBE_BED_POSITION 30
#define RIGHT_PROBE_BED_POSITION 130
#define BACK_PROBE_BED_POSITION 130
#define FRONT_PROBE_BED_POSITION 30

// these are the offsets to the prob relative to the extruder tip (Hotend - Probe)
#define X_PROBE_OFFSET_FROM_EXTRUDER 20
#define Y_PROBE_OFFSET_FROM_EXTRUDER 5
#define Z_PROBE_OFFSET_FROM_EXTRUDER -19.1

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

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


//If defined, the Probe servo will be turned on only during movement and then turned off to avoid jerk
//The value is the delay to turn the servo off after powered on - depends on the servo speed; 300ms is good value, but you can try lower it.
// You MUST HAVE the SERVO_ENDSTOPS defined to use here a value higher than zero otherwise your code will not compile.

// #define PROBE_SERVO_DEACTIVATION_DELAY 300

#endif


This Video shows the problem
Video

Edited 1 time(s). Last edit at 11/04/2013 10:20AM by Tarzipan.
Re: Bed Auto Leveling.. check this out
November 04, 2013 12:34PM
You might want to check your wiring for a loose connection if you are getting random trigger events. If the "hit" occurs just as the switch is leaving the surface, you may have switch bounce.
Re: Bed Auto Leveling.. check this out
November 04, 2013 03:59PM
Hi,
I checked the connections and they are good.

After lots of configtests I have a working solution, but I think it's a little bit buggy.
When I set the X and Y Offset, the shown X and Y coordinates at the LCD after the probing (G29) are not correct. So I can't drive to the home coordinates without the G28 command. At the moment I set the X and Y Offset to 0 and the probing positions are:

// these are the positions on the bed to do the probing
#define LEFT_PROBE_BED_POSITION 30
#define RIGHT_PROBE_BED_POSITION 150
#define BACK_PROBE_BED_POSITION 150
#define FRONT_PROBE_BED_POSITION 30

I looked into the Marlin_main.cpp and I think that the tmp Values (x_tmp, y_tmp, z_tmp) should be used for the actual coordinates that the LCD Display show. I can't test it, because I don't know which command save the values.

The Z Way is the same. The Display shows different values than the Repetier-Host.
Or is this just a problem based on my printer system?
Re: Bed Auto Leveling.. check this out
November 07, 2013 12:45AM
Alex,

Do you know if you have help to create a semi auto level?

Instead of it doing it every time, it will be manually trigger and the setting can be stored in the EEPROM.

thanks
Daniel
Re: Bed Auto Leveling.. check this out
November 07, 2013 06:30AM
Hi Daniel, I have a plan to implement a semi-automatic BAL.... it would be by placing a manual probe in the X-Carriage, run the leveling and store data on EEPROM.
But unfortunately these days I have not enough time to do that!!!

Actually I need people to test it.. implementing is not that hard, but I need extensive tests before releasing an official version.

If someone wish to apply for beta testers, let me know (send me a Private Message) ;-)

Best Regards.

Alex.
Re: Bed Auto Leveling.. check this out
November 08, 2013 01:22PM
I plan on adding this to my mendelmax 1.5+ has anyone made a mount for it?


---------------------------------------------------------------------------
-twitch

MendelMax 1.5+ - Ramps 1.4 - J-Head .5mm - Raspberry Pi running Octoprint
Re: Bed Auto Leveling.. check this out
November 08, 2013 05:20PM
Hi Guys

Been testing this out past week and have designed a Groove moutn which holds the servo quite nice. Download Link below before i put it up on thingiverse and github

Problem im having is if i set the X offset to a positive number when running G29 Y does not move and will only home along the X and Z Axis. any ideas? if i set X offset to negative number works okay. but problem is Endstop is in the +X side of carriage otherwise the Z Probe missing the glass on single plate i3 with my mount.

Config.h file

Temp STL Download Link
Note : currently STL file is setup for E3D size mount so J-head people may need to dremel a bit for j-head fit. when i upload proper ill upload different sizes but current hole cut is 12.2mm

Edited 1 time(s). Last edit at 11/08/2013 05:21PM by Enlightx.
Re: Bed Auto Leveling.. check this out
November 08, 2013 09:46PM
Quote
JohnSL
This thread is very cool. I'm wondering, has anyone hooked a servo up to a Rambo board? Looking at the Wiki information, I'm guessing I would need to hook it up to pin 1, which is connected to the PWMExt pin holes in the PCB. Is this correct?

Also, for the 5V supply, is the pin labeled 5V always going to have regulated 5V that I can use for the servo motor?

Thanks,
-- John
Yep, I'm testing it now on RAMBo, I've added this to the pins.h under the rambo section :
#ifdef NUM_SERVOS
  #define SERVO0_PIN         22

  #if NUM_SERVOS > 1
    #define SERVO1_PIN         24
  #endif

  #if NUM_SERVOS > 2
    #define SERVO2_PIN         23
  #endif
#endif
this will make the servo use the MOTO-EXT pins, so MX1-3 is for servo 1, MX2-3 is for servo 2 and MX3-3 is for servo 3. The MX1-1 is 5V and MX1-2 is for ground, same for MX2 and MX3 (those are the 5x3 pins between the endstops and thermistors).
I haven't tested this yet, as I just finished printing the endstop holder (waiting for it to cool down so I can remove it from the bed), but I've tested the servo with the M280 command and it works.

Right now I'm wondering if I need to keep my Z-min endstop where it is, since it would be needed for homing with G28, in which case, where do I connect the BAL endstop? I guess I'll figure that all out in the next few minutes smiling smiley
Great work Alex, keep it up! smiling smiley
Re: Bed Auto Leveling.. check this out
November 08, 2013 09:53PM
If your end stops wire to the NC (normally closed) pin on the microswitch, the new end stop goes in series with the old one. If your end stops are wired to the NO (normally open) pin, they wire in parallel. Option 1 (normal closed) is the most common.
Re: Bed Auto Leveling.. check this out
November 08, 2013 10:37PM
Kakaroto, you can use the Z-Probe for homing as well... actually that is the idea..

When you setup servo for endstop (in this case, for Z endstop), it will engage when you perform homing for Z axis.

So you don't need both endstops (Z-Probe and other z-endstop only for homing), unless you are paranoid for safety...

Best Regards.

Alex.
Re: Bed Auto Leveling.. check this out
November 09, 2013 07:25AM
been working on this all last night and now this morning and cannot get it th move the Y axis when running G29 at all UNLESS after running g28 i move extruder to middle of the bed.

Also noticed that after running g29 nothing will move as if an endstop is high but from what i can see nothing is triggered other then min endstops.

any ideas?

config file posted in previous post if people want to see my settings
Re: Bed Auto Leveling.. check this out
November 09, 2013 12:48PM
Thanks Alex, I figured that out indeed after a few minutes of testing. I didn't realize the servo would be used for the min endstop with G28. Hopefully, it will raise Z before extending the servo arm (I know it does in G29, but can't remember if it did it for G28 as well).
I'm having a lot of trouble though securing the arm to the servo, it keeps being lose, so I'm printing a lot of arms with different heights and inset depths, etc.. to try and make it fit nicely. Then I can play with the feature smiling smiley

Update:
Looks like there is a #define Z_RAISE_BEFORE_HOMING. I've set it to 15, but the Z is not raised when I call G28, so there might be a bug there.

Edited 1 time(s). Last edit at 11/09/2013 02:12PM by kakaroto.
Re: Bed Auto Leveling.. check this out
November 10, 2013 09:58AM
Enlightx -

I had the same problem you described. After reviewing the code that determines the location to do the three probes based on these values in configuration.h:

// these are the positions on the bed to do the probing
#define LEFT_PROBE_BED_POSITION 30
#define RIGHT_PROBE_BED_POSITION 150
#define BACK_PROBE_BED_POSITION 260
#define FRONT_PROBE_BED_POSITION 30

// these are the offsets to the prob relative to the extruder tip (Hotend - Probe)
#define X_PROBE_OFFSET_FROM_EXTRUDER 45.50
#define Y_PROBE_OFFSET_FROM_EXTRUDER 18.00
#define Z_PROBE_OFFSET_FROM_EXTRUDER -14.00

I determined that the LEFT_PROBE_BED_POSITION should not be less than X_PROBE_OFFSET_FROM_EXTRUDER or it causes a negative value resulting in the behavior you described (30-45.50=-15.50 in this example). Once I bumped my LEFT_PROBE_BED_POSITION value to anything above the X_PROBE_OFFSET_FROM_EXTRUDER value it works great! FWIW the same rule likely holds true for the Y offset and the front bed position as well.

Thank you for this feature Alex!!!
Re: Bed Auto Leveling.. check this out
November 10, 2013 11:18PM
I am having a few problems with the setup that I have. A few things are not working properly so I guess I have done something dumb.
I have the servo moving properly, happy with that.
When I do a G28 the homing works,BUT the probe is nowhere near the bed, in fact I have to shut down before the z axis bottoms out.
If I home the x and Y manually and then centre the bed, I can do a Z homing and the probe drops down and homing is done.
If I do a G29, the probe moves to the first location, probes and then moves to the next location. It doesn't lift as it should do. The second probing takes place and then moves on the the third location, still doesn't lift up and I noticed that the bed being a little lower on that side makes the probe move because of dragging on the bed.

After the probing has finished, I check the distance from the nozzle and can bring the nozzle down so far and then there is no further movement. The paper fits nicely under the nozzle..
If I move towards the left, I can see that the nozzle is dragging on the plate, so the difference in height has not been registered and the BAL is not working
Any ideas what could be wrong? What have I missed or what dumb thing have I done?

Here are the readings from Pronterface showing the read out from what I have done;


//Just started the printer and I have manually homed the X and Y axis and then set a M114
SENDING:M114
X:0.00Y:0.00Z:0.00E:0.00 Count X: 0.00Y:0.00Z:0.00
//Manually centre the X and Y axis
SENDING:G1 X100 F4000 Y100 F4000
//Homed the Z axis and sent a M114
SENDING:M114
X:100.00Y:100.00Z:9.60E:0.00 Count X: 100.00Y:100.00Z:9.60
SENDING:G29
Bed x: 15 y: 180 z: 6.53
Bed x: 15 y: 30 z: 21.37
Bed x: 190 y: 30 z: 34.03
echo:endstops hit: Z:34.03
//Probed in all 3 positions, probe didn't lift before moving to first position and also didn't lift between probing.
>>>m114
SENDING:M114
X:182.64Y:91.19Z:16.71E:0.00 Count X: 180.96Y:93.68Z:20.66

Some photos of what is happening













Edited 5 time(s). Last edit at 11/11/2013 12:32AM by regpye.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
November 11, 2013 01:44PM
thanks s3tech

spot on solved the problem i knew it would be something silly like that

on another note i was thinking just has anyone ever tried using a Infra Red Distance Sensor? there only around £10 and run on 5V and uses analog output.
Re: Bed Auto Leveling.. check this out
November 11, 2013 07:25PM
For the 5 volts I used a 7805 regulator and put the 1 and 2 pins in the power plug of the 12 volts input to the RAMPS board. Pin 3 (output) I took a lead to the 5 volt point on the RAMPS board.
Works easy and the correct voltage.




[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
November 11, 2013 11:19PM
I checked my setup and adjusted the power on the Z motors.
If I do a Z homing the motors work fine and I can also run the motors up and down without any problem.
When I enter a G29 the Z motors make a loud noise now and don't move. After a short time the probe moves to the next location and tries to probe, but has some difficulty because the Z motor hasn't lifted. (still making a noise)
Same with the following location, motor doesn't lift and probing is not accurate because it has dragged along the bed.

It appears that something is affecting the Z motors when using G29

Has anyone got an idea what might be the cause?

Another thing that I noticed was that if the Z could be lifted before homing, it would stop any problem with being too close to the bed and not allowing the sensor to swing down completely.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
November 12, 2013 11:50AM
Check in your configuration file the feedrate of z axis in this line

#define DEFAULT_MAX_FEEDRATE

Alsso check the homing feedrate

#define HOMING_FEEDRATE

the z axis need a low speed if you try to dirve the z axis to fast the motors only make a noise and cant turn the z axis, if you have 2 stepstick or Pololu drives and your board is a ramps 1.4 you can drive the 2 z axis with one stepper driver per motor and in this way you can drive the z axis much faster than when you use with only one stepstick, to do this you need to enable

#define Z_DUAL_STEPPER_DRIVERS

in Configuration_adv
Re: Bed Auto Leveling.. check this out
November 12, 2013 04:47PM
Thanks RicardoGA for that info, I will check it out.
I do have a spare Pololu available, might try that also.
Seems strange that the Z drives work 100% until I use a G29, that is when all the problems start.


[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