Automatic Bed Leveling

All things related to the Rostock MAX 3D Printer, the worlds FIRST Delta kit!
jesse
Printmaster!
Posts: 422
Joined: Tue Jan 01, 2013 8:38 pm
Contact:

Automatic Bed Leveling

Post by jesse »

euroflo
Noob
Posts: 4
Joined: Mon Apr 29, 2013 4:37 am
Location: Australia

Re: Automatic Bed Leveling

Post by euroflo »

Now thats the ducks nuts..!!
geneb
ULTIMATE 3D JEDI
Posts: 5358
Joined: Mon Oct 15, 2012 12:47 pm
Location: Graham, WA
Contact:

Re: Automatic Bed Leveling

Post by geneb »

Johann has placed the code for that online - I think in the Marlin repo, but I'm not sure. I don't expect it'll be too much longer before it lands in Repetier and specifically, the SeeMeCNC branch.

g.
Delta Power!
Defeat the Cartesian Agenda!
http://www.f15sim.com - 80-0007, The only one of its kind.
http://geneb.simpits.org - Technical and Simulator Projects
User avatar
Jimustanguitar
ULTIMATE 3D JEDI
Posts: 2608
Joined: Sun Mar 31, 2013 1:35 am
Location: Notre Dame area
Contact:

Re: Automatic Bed Leveling

Post by Jimustanguitar »

Looks like a mechanical end-stop, right? I'm imagining that I hear it click :)
User avatar
JohnStack
Printmaster!
Posts: 839
Joined: Thu Jan 03, 2013 7:07 pm
Location: Carlsbad, CA
Contact:

Re: Automatic Bed Leveling

Post by JohnStack »

Ok, you can't just put out a video like this an not say anything! LOL

Some kind of additional limit switch that captures and echos position?
Technologist, Maker, Willing to question conventional logic
http://dropc.am/p/KhiI1a
Durandal
Printmaster!
Posts: 75
Joined: Thu Mar 28, 2013 9:16 pm

Re: Automatic Bed Leveling

Post by Durandal »

He post's more in the video, it is indeed a mini switch, the probe itself is a allen wrench and by the looks of it some weak springs.

What would be really cool is a CMM touch probe attachment to allow measurement in 2.5 axes. (measuring upward without a tilting head is rather difficult.)

Combine a quick tool change system to allow multiple extruders with one offset and you've got yourself a fairly powerful little machine.
User avatar
foshon
Printmaster!
Posts: 600
Joined: Fri Mar 08, 2013 3:05 pm
Location: Just to the right of SeeMeCNC

Re: Automatic Bed Leveling

Post by foshon »

geneb wrote:Johann has placed the code for that online - I think in the Marlin repo, but I'm not sure. I don't expect it'll be too much longer before it lands in Repetier and specifically, the SeeMeCNC branch.

g.
May already be there?

Code: Select all

#ifdef SOFTWARE_LEVELING
void calculate_plane(long factors[], long p1[], long p2[], long p3[]) {
	factors[0] = p1[1] * (p2[2] - p3[2]) + p2[1] * (p3[2] - p1[2]) + p3[1] * (p1[2] - p2[2]);
	factors[1] = p1[2] * (p2[0] - p3[0]) + p2[2] * (p3[0] - p1[0]) + p3[2] * (p1[0] - p2[0]);
	factors[2] = p1[0] * (p2[1] - p3[1]) + p2[0] * (p3[1] - p1[1]) + p3[0] * (p1[1] - p2[1]);
	factors[3] = p1[0] * ((p2[1] * p3[2]) - (p3[1] * p2[2])) + p2[0] * ((p3[1] * p1[2]) - (p1[1] * p3[2])) + p3[0] * ((p1[1] * p2[2]) - (p2[1] * p1[2]));
}

float calc_zoffset(long factors[], long pointX, long pointY) {
	return (factors[3] - factors[0] * pointX - factors[1] * pointY) / (float) factors[2];
}
#endif
Purple = sarcasm

Please do a board search before posting your question, many have been answered with very time consuming detail already.
User avatar
CosplayEngineer
Plasticator
Posts: 7
Joined: Sat Mar 30, 2013 12:08 am

Re: Automatic Bed Leveling

Post by CosplayEngineer »

In 30 seconds that accomplished something that took me weeks to do.
User avatar
Eaglezsoar
ULTIMATE 3D JEDI
Posts: 7159
Joined: Sun Apr 01, 2012 5:26 pm

Re: Automatic Bed Leveling

Post by Eaglezsoar »

Has anyone tried that posted code to see if it works?
I am not a programmer and I have no idea what that code does.
Does it store the values it determines somewhere so it refers to the values every time it prints?
How do I run that code?
“ Do Not Regret Growing Older. It is a Privilege Denied to Many. ”
User avatar
foshon
Printmaster!
Posts: 600
Joined: Fri Mar 08, 2013 3:05 pm
Location: Just to the right of SeeMeCNC

Re: Automatic Bed Leveling

Post by foshon »

I don't know if it can be ran at this point Carl. It may be missing the call. On the Repetier sub-forum at reprap there was a recent discussion on z-probing. The author (owner?) of Repetier stated it is coming. I sent him a PM and asked if it could be used by a micro switch device. Here is a link to the discussion, should open up at the post he starts talking about it, if not it's near the bottom.

http://forums.reprap.org/read.php?267,2 ... msg-209004
Purple = sarcasm

Please do a board search before posting your question, many have been answered with very time consuming detail already.
Polygonhell
ULTIMATE 3D JEDI
Posts: 2417
Joined: Mon Mar 26, 2012 1:44 pm
Location: Redmond WA

Re: Automatic Bed Leveling

Post by Polygonhell »

I think what Johann is trying to do and what the repetier code does are different.
The repetier code takes measurements at 3 points and generates the supporting plane and Z offset.
What Johann is I think trying to do is closer to bed/screw mapping on a CNC mill, he's measuring at regular points and will probably attempt some sort of piecewise correction.
The difference is that while you only need to measure 4 points to fix software calibration issues, with a more detailed model of the bed you can also correct for small geometric errors.
User avatar
foshon
Printmaster!
Posts: 600
Joined: Fri Mar 08, 2013 3:05 pm
Location: Just to the right of SeeMeCNC

Re: Automatic Bed Leveling

Post by foshon »

Cool! Either way it's good to see the software advancing again.
Purple = sarcasm

Please do a board search before posting your question, many have been answered with very time consuming detail already.
User avatar
JohnStack
Printmaster!
Posts: 839
Joined: Thu Jan 03, 2013 7:07 pm
Location: Carlsbad, CA
Contact:

Re: Automatic Bed Leveling

Post by JohnStack »

Staying true to my "I absolutely never get anything done on a Monday" rif:

1. code looks right, needs inputs somehow. I guess the script in conjuction with more limits would do it.
2. And then there's this:

http://www.measurecentral.com/products/ljg/2d_laser.php
Technologist, Maker, Willing to question conventional logic
http://dropc.am/p/KhiI1a
User avatar
daftscience
Printmaster!
Posts: 203
Joined: Sun Jan 13, 2013 12:37 pm

Re: Automatic Bed Leveling

Post by daftscience »

I'm wondering if it would be possible to somehow incorperate this. or this into the hotend mount. It could do two things. Act as a crash prevention and be used to autolevel the bed.
User avatar
JohnStack
Printmaster!
Posts: 839
Joined: Thu Jan 03, 2013 7:07 pm
Location: Carlsbad, CA
Contact:

Re: Automatic Bed Leveling

Post by JohnStack »

daftscience wrote:I'm wondering if it would be possible to somehow incorperate this. or this into the hotend mount. It could do two things. Act as a crash prevention and be used to autolevel the bed.
I used those force resistors in an arduino project last year and dropped them in favor of a capacitative touch pad. (Just an on/off switch). They weren't very precise. I thought I would try them on a small actuator-driving project.

It might be interesting to rig up an adapter with separate readouts; however, I don't think they're very precise. You would almost have to calibrate them first (and over and over again) before using them.

An IR or optical measurement solution would be more precise. Did you check this out?

http://www.adafruit.com/products/164

The data sheet - if under 10 cm appears to be very precise!

http://sharp-world.com/products/device/ ... 21yk_e.pdf
Technologist, Maker, Willing to question conventional logic
http://dropc.am/p/KhiI1a
User avatar
kbob
Printmaster!
Posts: 286
Joined: Tue May 28, 2013 4:27 am
Location: Eugene, OR, US

Re: Automatic Bed Leveling

Post by kbob »

A Hall effect sensor is very precise. It detects a magnetic field. I wonder whether a PWM current in the heated bed would create enough of a magnetic field for a Hall effect sensor.
User avatar
JohnStack
Printmaster!
Posts: 839
Joined: Thu Jan 03, 2013 7:07 pm
Location: Carlsbad, CA
Contact:

Re: Automatic Bed Leveling

Post by JohnStack »

kbob wrote:A Hall effect sensor is very precise. It detects a magnetic field. I wonder whether a PWM current in the heated bed would create enough of a magnetic field for a Hall effect sensor.
Kinda interesting! I wonder how three of them would work together.

Mind the soundtrack but... another idea.

http://www.youtube.com/watch?v=FA2aj33OwMo
Technologist, Maker, Willing to question conventional logic
http://dropc.am/p/KhiI1a
User avatar
JohnStack
Printmaster!
Posts: 839
Joined: Thu Jan 03, 2013 7:07 pm
Location: Carlsbad, CA
Contact:

Re: Automatic Bed Leveling

Post by JohnStack »

Ok, putting this out for feedback.

How about a laser-triggered measuring device. The general idea is to stick the T on an axis, turn it on and when the head crosses the beam, an indicator light goes on.

I will probably fab one of these up with a laser pointer and light sensor to see if it might work. I've got a spare arduino, a laser pointer and some light sensors.

Attached is the image of the drawing.

Anything you might change?
Attachments
laser trigger for measuring.png
Technologist, Maker, Willing to question conventional logic
http://dropc.am/p/KhiI1a
User avatar
daftscience
Printmaster!
Posts: 203
Joined: Sun Jan 13, 2013 12:37 pm

Re: Automatic Bed Leveling

Post by daftscience »

kbob wrote:A Hall effect sensor is very precise. It detects a magnetic field. I wonder whether a PWM current in the heated bed would create enough of a magnetic field for a Hall effect sensor.
That's a really interesting idea. If will work, I have no clue. One concern, if the hall effect sensor can pick up the bed, would it trigger the same everywhere on the surface of the bed? Also, those with glass, or aluminum might not be able to use this.

JohnStack wrote:Ok, putting this out for feedback.
How about a laser-triggered measuring device. The general idea is to stick the T on an axis, turn it on and when the head crosses the beam, an indicator light goes on.

I will probably fab one of these up with a laser pointer and light sensor to see if it might work. I've got a spare arduino, a laser pointer and some light sensors.

Attached is the image of the drawing.

Anything you might change?
I'm not sure I follow how the laser rig would work for detecting the different points on the bed. Maybe i'm missing something. I do think the idea of the IR might be interesting. With my suggestion I was trying to figure out how to permanently mount something onto the effector that will measure the calibration points. This way it doesn't need to be removed when printing.

Again though. That IR idea seems like it would work beautifully.
Gimbal
Printmaster!
Posts: 44
Joined: Tue May 28, 2013 10:25 am

Re: Automatic Bed Leveling

Post by Gimbal »

For glas bed a laser pointing in an angel (45deg ex) and reflecting on the glas back to a photo sensor should do the trick, put the sensor at the end of a small tube right, guess 5$ will do it :-)
User avatar
JohnStack
Printmaster!
Posts: 839
Joined: Thu Jan 03, 2013 7:07 pm
Location: Carlsbad, CA
Contact:

Re: Automatic Bed Leveling

Post by JohnStack »

Great idea but I'm thinking the challenge is proximity to the area being measured; therefore I've got some square aluminum tube stock (1"), I orderedthe laser bracket and laser bracket from Adafruit. The idea right now is just to mark a small spot on the heated bed with red paint to get the laser line close, then place the "device" on the glass.

The price so far (adafruit is a little high but they're friends) - $16 without power.

I'm just going to wire it to a 12-volt off the PS.
Technologist, Maker, Willing to question conventional logic
http://dropc.am/p/KhiI1a
Gimbal
Printmaster!
Posts: 44
Joined: Tue May 28, 2013 10:25 am

Re: Automatic Bed Leveling

Post by Gimbal »

I will putt the laser/sensor permanent on the effector on etch side of the hotend, this will able me to do leveling before every print and it's easy to tweak the firmware to adjust it automatically
User avatar
JohnStack
Printmaster!
Posts: 839
Joined: Thu Jan 03, 2013 7:07 pm
Location: Carlsbad, CA
Contact:

Re: Automatic Bed Leveling

Post by JohnStack »

I'd love to see that!!!
Technologist, Maker, Willing to question conventional logic
http://dropc.am/p/KhiI1a
Gimbal
Printmaster!
Posts: 44
Joined: Tue May 28, 2013 10:25 am

Re: Automatic Bed Leveling

Post by Gimbal »

Well haven't give it much torts but then i went thru my old treasure boxes recalling i have an Omron E3X amplifier (new) with fiber maybe it can be useful, put the fiber in a orifice 0.3mm aliening them to reflect on the glass, hmm, will give it a go. The Arduino part, i will look in to it when i got the time, will go abroad next week and babysit a Crue of Pakistani technician for a month and i have fiddling with Arduino a few year.
User avatar
JohnStack
Printmaster!
Posts: 839
Joined: Thu Jan 03, 2013 7:07 pm
Location: Carlsbad, CA
Contact:

Re: Automatic Bed Leveling

Post by JohnStack »

You won't need arduino unless you're doing a display of some time. I found laser circuits all over the place. I just remembered that there was a trip circuit plan based on Arduino...

It's two resistors, the sensor, power, an LED and an Laser I think.
Technologist, Maker, Willing to question conventional logic
http://dropc.am/p/KhiI1a
Post Reply

Return to “Rostock MAX”