Welcome! Log In Create A New Profile

Advanced

what is wrong with using the software endstops to auto-level the bed?

Posted by shadowphile 
what is wrong with using the software endstops to auto-level the bed?
June 15, 2015 01:24AM
I have a standard ATMega 2560 with a RAMPS 1.4 board.
Leveling most recently was my biggest headache and the G29 and G30 commands seem to have constant issues and don't work for me, which I think stems from their sophistication.
Mechanically I have ensured that my frame is rigid, square, and symmetric with accurately placed limit-switches and fairly level bed by using a $40 set of anodized extruded alunimum vertex parts from RobotDigg.
The Z-minimum limit switch is a set of FSRs under the bed. Yes, I went old-school: fix it in the hardware, not the software.

So all I really need is a routine that will automatically take out the doming and level the bed and set it exactly to zero.

I customized the G30 command in the firmware(RichCattel) by adding an 'ESj' parameter that must go with G30 Xn Ym command, ie G30 X-65 Y45 ES0 to indicate:
'probe at the X,Y location and use the measured z-height to adjust the software end-stops for the tower indicated by the value after the ES prefix.' (0=X, 1=Y, etc).
I have a Pronterface macro that calls this special G30 command at each of the towers in sequence, then the middle. If the towers zero-out but the center measurement won't, then I adjust the M666 R value until they
all converge to zero at the same time, while doing repeat runs of the macro. (I still have to save with M500 and manually re-home for now).

Just from the math, repeat runs should zero out all the towers (unless your chassis is too shaky).
Ideally the offset would go to zero in just one run. In my case after just two runs I had the towers AND the center within .01mm. This is amazing to me because I have been trying since last October to get my first printer actually printing and everything was a mess. I haven't yet confirmed the statistics of this result vs heating, moving, usage, etc, but at worst case I just run the macro again. It's very fast.

From now on, even if I move the rig or after I heat everything up, I just re-run the macro and end up with a nozzle that actually chatters as it moves sideways (chattering means it is half touching and half not touching, which is the ultimate best possible height due to nozzle shake from the steppers).

It would be easy to expand this to a larger automated process that auto-adjusts M666 X, Y, Z,R,H parameters.

I would think G29/G30 would be already doing this process and I feel like I am rewriting the wheel here.
Another thing I am pointing out is that IMHO printing the vertex part-sets may be considered cheap and DIY but for only $45 you can get all extruded anodized aluminum vertex parts (RobotDigg). That is even cheaper than printing and way more accurate and strong.

The point is that if the mechanics are fairly accurate, the software can be simple and run like butter.
Re: what is wrong with using the software endstops to auto-level the bed?
June 15, 2015 05:45AM
Quote
shadowphile
I have a standard ATMega 2560 with a RAMPS 1.4 board.

That's your first mistake IMO.

Quote
shadowphile
...So all I really need is a routine that will automatically take out the doming and level the bed and set it exactly to zero.

I customized the G30 command in the firmware(RichCattel) by adding an 'ESj' parameter that must go with G30 Xn Ym command, ie G30 X-65 Y45 ES0 to indicate:
'probe at the X,Y location and use the measured z-height to adjust the software end-stops for the tower indicated by the value after the ES prefix.' (0=X, 1=Y, etc).
I have a Pronterface macro that calls this special G30 command at each of the towers in sequence, then the middle. If the towers zero-out but the center measurement won't, then I adjust the M666 R value until they
all converge to zero at the same time, while doing repeat runs of the macro. (I still have to save with M500 and manually re-home for now).

Just from the math, repeat runs should zero out all the towers (unless your chassis is too shaky).
Ideally the offset would go to zero in just one run. In my case after just two runs I had the towers AND the center within .01mm. This is amazing to me because I have been trying since last October to get my first printer actually printing and everything was a mess. I haven't yet confirmed the statistics of this result vs heating, moving, usage, etc, but at worst case I just run the macro again. It's very fast.

From now on, even if I move the rig or after I heat everything up, I just re-run the macro and end up with a nozzle that actually chatters as it moves sideways (chattering means it is half touching and half not touching, which is the ultimate best possible height due to nozzle shake from the steppers).

It would be easy to expand this to a larger automated process that auto-adjusts M666 X, Y, Z,R,H parameters.

I don't use Marlin, but I thought that Rich Cattel's fork already supported the G30 A command, which does that?

In my fork of RepRapFirmware (for Duet electronics), I use a least-squares fitting procedure to calibrate the three endstop adjustments, the tower positions and the diagonal rod length. Only one set of probe points is needed, so the whole process takes only 25 seconds. See [forums.reprap.org] for more and [www.youtube.com] for the video.

Quote
shadowphile
...Another thing I am pointing out is that IMHO printing the vertex part-sets may be considered cheap and DIY but for only $45 you can get all extruded anodized aluminum vertex parts (RobotDigg). That is even cheaper than printing and way more accurate and strong.

I agree. I use the Robotdigg corners on my 2020 Kossel, and it is very stable



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: what is wrong with using the software endstops to auto-level the bed?
June 15, 2015 09:21PM
RCs marlin already has a specialised G30, however in my experience it can only adjust very small misalignments. You have to calibrate the printer normally by adjusting the endstop heights and then the radius. There are at least 3 different tutorials that discuss a similar calibration procedure.

I dont fully understand you custom G30 procedure but its almost not necessary if you calibrated normally. The m666 and m665 help of course with the quick adjustment of radius.
Re: what is wrong with using the software endstops to auto-level the bed?
June 15, 2015 09:50PM
wow, that was a quick reply! My solution is not meant to be a fix-all calibration but more of a tool to manually dial in a flat and level bed.
It is only about 8 new lines of code in the firmware to take the precise measurements of the probing and automatically adjust the offset values. My Pronterface macro uses that function to probe at the four key spots.
Manually doing this was tedious, slow and not accurate to the .01 accuracy I am shooting for. (I couldn't even seem to move the nozzle when entering moves like .05mm.)

I am currently running G30 A on a heated bed AND nozzle and after 20 iterations it is not even close. Although the FSRs are well insulated, they must be getting fairly warm and they are turning out to be more fussy than I assumed. What I need is a 'presence' based limit-switch method instead of a 'force' based method. Too bad glass isn't conductive; then I could use a closed-circuit method when the nozzle touches the bed. I tried it out using a layer of foil and it worked fantastic,didn't even dent the foil.
Re: what is wrong with using the software endstops to auto-level the bed?
June 16, 2015 02:22AM
Quote
shadowphile
What I need is a 'presence' based limit-switch method instead of a 'force' based method.

Like this? [www.youtube.com]



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login