Welcome! Log In Create A New Profile

Advanced

Bed Auto Leveling.. check this out

Posted by AlexBorro 
Re: Bed Auto Leveling.. check this out
December 24, 2013 07:12PM
Quote
Enlightx
any one finding they are getting lots of servo chatter?

iv tried shielding cable still get gitter. iv had to use an external 5v supply as the gitter is taking too much strain on the 5v line of the arudino and voltage regulator is getting too hot and crashing 5V line to atmega chip.

also what are people using for servos currently? would be interested in getting one that no one has issues with.


TGY-1800A servo and the 7805 voltage regulator works well and is cheap.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
December 24, 2013 08:47PM
Quote
jwd
Hi Everyone,

I have a RUMBA board and my servo voor the auto bed leveling feature is delivered tomorrow. Does anyone know how to connect the servo to the RUMBA board?
(I can find a ground and a 5 V pin on the board but where must i connect the third pin?

Hi look here : [reprap.org] you'v got the wirring of EXP3 you can use PMW1 or PMW2 , try and say me , because i want meke the auto level on my Roxanne to winking smiley
Re: Bed Auto Leveling.. check this out
December 24, 2013 10:24PM
I've tried several servos. None of them have created issues for the Mega 5V regulator.
Re: Bed Auto Leveling.. check this out
December 24, 2013 10:29PM
Quote
uncle_bob
I've tried several servos. None of them have created issues for the Mega 5V regulator.

The last machine that I just built yesterday I just shorted the 5v and the VVC pins together using a jumper link.
It is working fine, no problems. Still using a TGY-1800A servo, they seem to be good and only cost $3.99.

Bought the servos from HobbyKing, cheaper to buy in a 3 pack.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
December 25, 2013 01:46AM
Works good Alex, I have fitted it to a few printers now and they all work fairly good.

One problem that someone may have worked out better than me is how to successfully attach the micro switch to the servo.
I have tried epoxy to hold the switch to the servo arm, but it is not reliable. I have had a couple come loose after about 15-20 hours use.

The best method I have found so far is to bind the switch to the servo arm with some light gauge wire and the apply epoxy that comes in a stick (cut off what you need and then nead it together to mix it) This forms a better connection and the epoxy putty being firm can be moulded (Australian spelling) by fingers to form a good connection and shape. Adding a small zip tie around the arm and the micro switch cable wires also stops the cable wires breaking off with the continued movement up and down when probing.

Maybe someone has better ideas that work?

Edited 1 time(s). Last edit at 12/25/2013 01:47AM by regpye.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
December 25, 2013 11:11AM
Here's what I made to mount the servo and switch:
[www.thingiverse.com]
edn
Re: Bed Auto Leveling.. check this out
December 25, 2013 03:38PM
Yes, I have the Marlin code ported to the PrintrBoard with Auto-Bed Leveling working... I do have some issues but getting close to getting them resolved. Right now I'm debugging the 'ACCURATE_BED_LEVELING' with:

#define ACCURATE_BED_LEVELING_POINTS 5

This is a little bit excessive but it is needed for the debugging I'm doing. In the G29 command I've added code to display the probed positions of the bed and to print out the height of each probed position above (or below) the mean. I've appended the code to do that at the end of this post in case anybody wants to use it in their debug effort (or to verify what I'm asserting). The code goes right after the clean_up_after_endstop_move(); statement.

I'm not all the way through to the root cause but I think I know what is causing a huge amount of problems for people. I'm thinking the bulk of the problems have to do with the translated coordinates going negative. Bed positions that are higher up work fine and the bed leveling code works great! But on places that are too low, the bed leveling code can't correct and I'm seeing the prints fail to get any adhesion to the bed on the first layer.

What I'm looking into is "#define min_software_endstops true" in Configuration.h and the line in " static void set_bed_level_equation()" that does:
// but the bed at 0 so we don't go below it.
current_position[Z_AXIS] = -Z_PROBE_OFFSET_FROM_EXTRUDER

In a nut shell, I suspect, the corrected coordinates going negative in the Z-Axis is not being respected and handled correctly by the firmware. The following code will print the probed distance above or below the bed mean. I have my origin in the back right corner. The matrix prints correctly for me to easily visualize how my bed is slanted and/or warped. You may need to factor that into your usage if you have things setup differently:

Code didn't paste in correctly... It's attached instead.

Edited 2 time(s). Last edit at 12/25/2013 04:10PM by edn.
Attachments:
open | download - print_bed_height.c (1.6 KB)
edn
Re: Bed Auto Leveling.. check this out
December 25, 2013 03:57PM
I have Auto_Bed_Leveling working on the PrintrBoard. (I do have some issues but I'm working through them). What I've got is this code in the PINS.H file for motherboard type 81:

#ifdef NUM_SERVOS
#define SERVO0_PIN 11
#define Z_MIN_PIN 30 //needs to be updated to what ever wire is used.

That logical pin is the corner pin on the Expansion-2 Header that is closest to the main power connector. Wire that pin to your servo control wire and you should see things start to come alive.
Re: Bed Auto Leveling.. check this out
December 25, 2013 05:13PM
Yeah, looks pretty good stevenrc.
I am working on one specifically for the Prusa i3 and will upload when finished.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
December 25, 2013 05:44PM
Hi guys just noticed i had never released my servo groove mount i made for my E3D hotend.

Github Link

J-Head version will be made as soon
Re: Bed Auto Leveling.. check this out
December 26, 2013 08:04AM
Quote
regpye
Yeah, looks pretty good stevenrc.
I am working on one specifically for the Prusa i3 and will upload when finished.

OK, I have it made and working. Here are a few shots of the actual part with the servo mounted.
Also a few drawings of the 3D part and if anyone wants to make the part there is a link to the STL file here.

The servo used is a TGY-1800A and the micro switch is a sub-miniature snap action type.
I mounted the bracket using two of the same bolts that hold the Wades extruder to the carriage. I also added a heat shield made from very thin aluminium sheet to go between the hotend and the servo as it is a bit close.

Been using it all day and not had any problems.

Photos and drawings of bracket attached;

MP me for the [url=http://regpye.com.au/BAL/i3 servo/ABLbracket%20i3.stl]STL file[/url] as I may not have been successful in attaching it here.


[url]http://regpye.com.au[/url]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Attachments:
open | download - ABLbracket-i3-1.jpg (35.8 KB)
open | download - ABLbracket-i3-2.jpg (38.8 KB)
open | download - ABLbracket-i3-3.jpg (33.1 KB)
open | download - ABLbracket-i3-4.jpg (43.7 KB)
open | download - before-shield.jpg (32.2 KB)
open | download - shield-in-place.jpg (30.1 KB)
open | download - righthand-side.jpg (29 KB)
Re: Bed Auto Leveling.. check this out
December 26, 2013 01:30PM
The best way to mount the switch to the arm is to use M2 (or smaller) nuts and bolts. You can get it nice and tight. You can hit it with thread locker once you are sure it's tight enough.

Check your servo's for temperature stability before you bolt them into a setup. It's quick and easy to do. If they drift (as many do) you'll save a lot of time by getting better ones before you do the building.
Re: Bed Auto Leveling.. check this out
December 26, 2013 08:35PM
When running G29, the z-probe drops into position, touches twice, then retracts the z probe, before pulling up 5 mm between measurement points. Typically in all the videos I've watched the z-probe stays down until its finished measuring all the points. My probe pulls up in between measurement points. This cause the corners of the microswitch to dig into my heatbed during the z-probe retract.
Re: Bed Auto Leveling.. check this out
December 26, 2013 09:10PM
Quote
momentum
When running G29, the z-probe drops into position, touches twice, then retracts the z probe, before pulling up 5 mm between measurement points. Typically in all the videos I've watched the z-probe stays down until its finished measuring all the points. My probe pulls up in between measurement points. This cause the corners of the microswitch to dig into my heatbed during the z-probe retract.

Try setting the angle so that there is room for movement on retract. I had to adjust mine for the last probing so that the switch lever didn't dig into the bed when moving towards print position. My switch stays down between probings, unlike yours, can't help you with that part.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
December 27, 2013 08:05AM
I posted a video of what it is doing.

G28 then G29

[www.youtube.com]
Re: Bed Auto Leveling.. check this out
December 27, 2013 09:49AM
Quote
-DUS-
Thanks!

I applied the above modifications, and now the Z_raises work normally for G29. Howver, for G28 the issue remains. Is that described somewhere else in the code?

I have changed the line in bold and red (line 1285) in marlin.main.cpp - 50 is the value for acceleration of z axis - for me solved the problem when doing the G28 the Z motor stall



#if Z_HOME_DIR < 0 // If homing towards BED do Z last
#ifndef Z_SAFE_HOMING
if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
#if defined (Z_RAISE_BEFORE_HOMING) && (Z_RAISE_BEFORE_HOMING > 0)
destination[Z_AXIS] = Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS) * (-1); // Set destination away from bed
feedrate = max_feedrate[Z_AXIS];
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate, active_extruder);
st_synchronize();
#endif
HOMEAXIS(Z);
}
#else // Z Safe mode activated.
if(home_all_axis) {
destination[X_AXIS] = round(Z_SAFE_HOMING_X_POINT - X_PROBE_OFFSET_FROM_EXTRUDER);
destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - Y_PROBE_OFFSET_FROM_EXTRUDER);
destination[Z_AXIS] = Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS) * (-1); // Set destination away from bed
feedrate = 50; // feedrate = XY_TRAVEL_SPEED;
current_position[Z_AXIS] = 0;

plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate, active_extruder);
st_synchronize();
current_position[X_AXIS] = destination[X_AXIS];
current_position[Y_AXIS] = destination[Y_AXIS];

HOMEAXIS(Z);
}
.....

Edited 1 time(s). Last edit at 12/27/2013 09:49AM by zrcz.
Re: Bed Auto Leveling.. check this out
December 27, 2013 03:59PM
Quote
momentum
I posted a video of what it is doing.

G28 then G29

[www.youtube.com]

Seems very strange. Not only is it lifting the probe between sensing, it is also probing in all four corners while everyone else probes in three corners only. How about showing us the start of your G-code so we can see what it is suppose to be doing?

You should have something like this;

G21 ;metric values
G90 ;absolute positioning
M107 ;start with the fan off
G1 Z15.0 F{travel_speed} ;Lift nozzle 15mm
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G29 ; Perform Auto Bed Leveling
G1 Z15.0 F{travel_speed} ;Lift nozzle 15mm
G92 E0 ;zero the extruded length
G1 F200 E3 ;extrude 3mm of feed stock
G92 E0 ;zero the extruded length again

Edited 1 time(s). Last edit at 12/27/2013 04:17PM by regpye.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
December 27, 2013 06:20PM
I'm simply running a G28 then G29

I'm attaching my configuration.h in the case I screwed something up.

Edited 1 time(s). Last edit at 12/27/2013 06:25PM by momentum.
Attachments:
open | download - Configuration.h (27.8 KB)
Re: Bed Auto Leveling.. check this out
December 27, 2013 10:14PM
Try using this configuration. You will need to rename it.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Attachments:
open | download - Configuration (2).h (27 KB)
Re: Bed Auto Leveling.. check this out
December 28, 2013 01:18AM
Quote
regpye
Try using this configuration. You will need to rename it.

I made one change on the following line because it was throwing a bunch of errors in the font definition.
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

It now touches 3 (not 4) points during the G29 but still lifts the Z-probe between points.

I see some new lines of code in my version of the config.h. Maybe the lift between z-probes is a new "feature"??

Thank you for the help!!
Re: Bed Auto Leveling.. check this out
December 28, 2013 02:15AM
Quote
momentum
Quote
regpye
Try using this configuration. You will need to rename it.

I made one change on the following line because it was throwing a bunch of errors in the font definition.
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

It now touches 3 (not 4) points during the G29 but still lifts the Z-probe between points.

I see some new lines of code in my version of the config.h. Maybe the lift between z-probes is a new "feature"??

Thank you for the help!!

No worries for the help, glad to assist.
Where did you get your configuration file? I noticed the different lines of code, not seen that before.


[regpye.com.au]
"Experience is the mother of all knowledge." --Leonardo da Vinci
Re: Bed Auto Leveling.. check this out
December 28, 2013 10:08AM
Quote
regpye
Quote
momentum
Quote
regpye
Try using this configuration. You will need to rename it.

I made one change on the following line because it was throwing a bunch of errors in the font definition.
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

It now touches 3 (not 4) points during the G29 but still lifts the Z-probe between points.

I see some new lines of code in my version of the config.h. Maybe the lift between z-probes is a new "feature"??

Thank you for the help!!

No worries for the help, glad to assist.


Where did you get your configuration file? I noticed the different lines of code, not seen that before.



[github.com]
Re: Bed Auto Leveling.. check this out
December 28, 2013 10:15AM
Looks like Alex changed the code a few weeks back.

"I have changed this code a few weeks ago.

Now the probe deploys and retracts for EACH probing.. it makes the probe
position more consistent when you choose to turn the servo off after
movements."

Looks like he is also going to add the pull up before the probe retract.

"I will relocate the retract command after the probe raise and perform
another raise in the last probing and then retract the probe.."
edn
Re: Bed Auto Leveling.. check this out
December 28, 2013 03:55PM
Quote
regpye
Seems very strange. Not only is it lifting the probe between sensing, it is also probing in all four corners while everyone else probes in three corners only. How about showing us the start of your G-code so we can see what it is suppose to be doing?

The 'ACCURATE_BED_LEVELING' code that is now merged back into the main branch of the tree does this. It probes an n x n grid. And it puts down the probe, does the probe, and retracts the probe at each point.

I'm pretty sure the difference is because you are using different branches of the code.
Re: Bed Auto Leveling.. check this out
December 29, 2013 06:21AM
Hi guys just a head up

Started to flash the new marlin update this morning
With my setup (i3, Ramps 1.3, panelolu2) i cannot fit it on a Arduino Mega 1280

Fits okay on an Arduino Mega 2560

if you get an error compiling that will be why .
if you want to be double sure change board type to mega 2560 and recompile if it works okay you need to get yourself a new board.
Re: Bed Auto Leveling.. check this out
December 29, 2013 12:07PM
Marlin has been bumping the 128K barrier for quite a while. If you enable this or that, it can easily go over. I would not go for a new board that's only got 128K these days. It's not just the auto bed leveling stuff that's bulking things up. You never know what you might want to add here or there.
Re: Bed Auto Leveling.. check this out
December 29, 2013 12:11PM
i dont think you can even buy the 1280 boards now just a warning for people who are still on the old model (like i was)

i tried stock config file and as soon as you add autolevel (with no panels at all) the auto level takes it strait over.

running the earlier autolevel okay with 1280 and all my other stuff.
Re: Bed Auto Leveling.. check this out
December 29, 2013 01:37PM
I'm not sure what my problem is but I can't seem to get this to work.

I've changed my Config.h file (attached) to mirror what other's have done but it's only probing 2 locations prior to printing and when the print starts the nozzle doesn't lower to the bed and just prints in the air.

Not sure if it's in my config.h or config_adv.h file or if I have my G-code wrong.

Could someone help me out with this please? Below is my start G-code:

M190 S115; Warm the bed
G21; metric values
G90; Set position to absolute
G1 Z15.0 F5000; lift nozzle
G28 X0 Y0; move X/Y to min endstops
G28 Z0; move Z to min endstops
G29; Perform Auto Bed Leveling
G1 X0 Y0 F4000; move X/Y to min endstops
G1 Z15.0 F5000; lift nozzle
M109 S235; Set Extruder Temp
G92 E0; zero the extruded length
G1 F200 E3; extrude 3mm of feed stock
G92 E0; zero the extruded length again
Attachments:
open | download - Configuration.h (27 KB)
Re: Bed Auto Leveling.. check this out
December 29, 2013 09:56PM
What version of Marlin are you running? When was it downloaded?

All of the bed leveling stuff is in the firmware.
Re: Bed Auto Leveling.. check this out
December 29, 2013 11:19PM
I downloaded it on November 27th, it's version 1. I followed the instructions in the read me file from Github (linked in the first post of this thread) to set it up.

I have a MakerFarm i3 that has been runing with older firmware and I have a second i3 which I just built and loaded the new Marlin software. The new i3 is what I'm having issues with, it's what I'm trying to get the auto bed leveling feature to work on. I used the old marlin firmware (from the makerfarm i3) to compare it with the new Marlin firmware and made changes so the new machine would work. It was working fine until I tried to get the bed leveling feature working so I'm thinking it's something I did there.

Edited 1 time(s). Last edit at 12/29/2013 11:22PM by p40whk.
Sorry, only registered users may post in this forum.

Click here to login