Page 1 of 1

Calibration HELPER - Z axis levelling script for Onyx bed

Posted: Sat Mar 30, 2013 12:30 am
by Ross_Customs
Here is a script I use to assist in adjusting the Z-MAX endsop screws - use with caution!

It automates the dropping of the extruder to the centre of the heated bed, and then out to each upright - placing the corresponding delta arms almost vertical.
You can then eyeball (at first) the adjustments needed for each endstop, once you get close - you can then adjust the Z value closer to zero and use paper.
For the early iterations, use a Z value of about 5mm (Default in the code below), otherwise you might drive the extruder into the bed with this script as it move out from the bed.

[*] If the extruder lowers as it travels out, you'll need to put the head of the limit screw downwards (Clock-wise)
[*] If the extruder lifts as it travels out, you'll need to put the head of the limit screw upwards (Anti-clockwise)

The code is saved in Repetitiers' "G-Coce Editor" as one of the numbered scripts.
Just copy it from here and paste in the window and save.

You can run it from the "Printer" menu option by selecting "Send Script x" while connected to your Rostock.

Code: Select all

; README: This is written for a Rostock Max with an Onyx bed.
;         If you have the smaller square beds the extruder 
;         head will be off the side of your bed when it moves to the pillars!

; WARNING:Make sure you have your Z0 set and stepper directions set correctly otherwise
;         you might crash the extruder into the bed or the sliders into the ceiling
;         SCROLL DOWN to EDIT the lowest height you go to - be conservative in the beginning!

    G28             ; Home all axes

; ----------------------------------------------------------------------------
; Fun with steppers...
    M1 S3
    G91                                 ; Use relative positioning
    G1 Z-3.27 F392
    G1 Z-3.67 F440
    G1 Z-2.91 F349.22
    G1 Z-1.46 F174.62
    G1 Z-4.36 F261.62
    M1 S1
    G1 Z-0.69 F82.41
    M1 P15
    G1 Z-0.39 F82.41
    M1 P5
    G1 Z-0.39 F82.41
    M114
    M1 S3
    G90                                  ; Use absolute positioning

; ----------------------------------------------------------------------------
; Now onto calibration help.
    G01 X0 Y0 Z20 F9000  ; Fast drop to centre of bed (~20mm off)
    G01 F500                        ; Slow moves from now on

; DANGER make sure this won't crash the extruder DANGER
; I suggest starting with Z5 and eyeballing it the first time, then reducing the value.
; ------> EDIT CALIBRATION HEIGHT BY ADJUSTING THE Z PARAMETER <----------
    G01 Z5         ; Drop closer to bed (~5mm)

    M1 S10               ; Pause ten seconds

    G01 X-103.92 Y-60   ; Go towards X pillar (X delta arms will be near vertical)
    M1 S10                    ; Pause ten seconds

    G01 X0 Y0                ; Centre carriage
    M1 S3                       ; Pause three seconds

    G01 X103.92 Y-60    ; Go towards Y pillar
    M1 S10                    ; Pause ten seconds

    G01 X0 Y0               ; Centre carriage
    M1 S3                     ; Pause three seconds

    G01 X0 Y120          ; Go towards Z pillar
    M1 S10                   ; Pause ten seconds

    G01 X0 Y0              ; Centre carriage
    M1 S3                     ; Pause three seconds

    G01 X0 Y0 Z20 F9000  ; Raise carriage for adjustment of end stops
    M1 S20                         ; Pause twenty seconds
    M84                              ; Stop idle hold (Releases steppers)

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Sat Mar 30, 2013 12:33 am
by cambo3d
you have a video of this in action?

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Sat Mar 30, 2013 1:57 pm
by Ross_Customs
Yes - got it uploaded last night but had problems getting into Youtube on the desktop (Mobile phone - poorly focused but the gist is there)

[youtube]http://www.youtube.com/watch?v=1Q00_aYUWqw[/youtube]

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Sat Mar 30, 2013 3:16 pm
by cambo3d
if you had a dial indicator on the end, you could see as the platform moves where there are high or low spots.

something like i did here. but I did it manually. I'll try that script when i get my machine back together.
CIMG1645.JPG

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Sat Mar 30, 2013 5:13 pm
by mhackney
This works as long as you are 100% your Delta Radius is correct. Unlike a Cartesian printer, a delta printer can move in an arc in the Z plane if the parameters to the math is wrong. A Cartesion printer travels in a fixed linear path due to the mechanics. It's one of the nuances of a delta printer. So, unless you know the print head is moving in a perfect plane, you can't use it to measure the bed. If you know your bed is dead flat, you can detect a problem with tilt or delta radius though.

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Sat Mar 30, 2013 11:00 pm
by Ross_Customs
The printer I'm using this in a is a Rosock Kit from SMCNC, with the Onyx bed and borosilicate glass.
So it should be pretty flat.

I did see it lifting up of the bed a little when making the moves from centre to upright - found the "Delta arm blues" posts...
Took the delta arms off and used fingers to run a #21 drill though the hole, a dremel to radius the holes inside edge, and lithium grease on assembly - that convex movement has stopped. Discovered a loose Z rail carriage too.

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Fri Apr 05, 2013 3:46 pm
by Broose
There are some great instructions for manually calibrating the bed elsewhere in these forums. I have taken a somewhat different approach to Ross Customs here to semi-automate the calibration. I discovered this thread after the fact.

One nice feature of the Repetier-Host is that you can jog the machine during a pause. I use that to get the z-position at the center and near each column for "snagging the paper." Here is the Gcode file for moving the head around and a spreadsheet that figures out how many degrees to turn each limit switch screw

G-code first time calibration:
Onyx Calibration - First Time.gcode
(1.22 KiB) Downloaded 513 times
(Jog down from 10mm)
G-code fine tune:
Onyx bed Calibration.gcode
(1.22 KiB) Downloaded 466 times
(Jog down from 3mm)

And the Excel spreadsheet to calculate how much to turn the screws:
Bed Calibration.xls
(35.5 KiB) Downloaded 447 times
I also put together a youtube video showing it in action:
[youtube]http://www.youtube.com/watch?v=1DUtl9NTm68[/youtube]

IMPORTANT: You should set your MAX_LENGTH values first, add 1mm to the MAX-LENGTH values to account for adjusting the screws so that the head can move a bit below zero, and make sure after you've done this that you can manually jog down to Z=3MM and move around the table at that Z height without crashing into the table (or 10mm if you are using the first-time version).

This doesn't really get into adjusting DELTA_RADIUS.

-B

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Mon May 13, 2013 8:59 pm
by LorenOlepi
Thanks for posting!

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Wed Aug 07, 2013 6:10 pm
by Ross_Customs
I have one of these I am about to modify for use.
The spring the forces the plunger down was easily removed.
There are 3 screws on the far side of the photo that hold the blue part on.
Gently lever the blue part up, and remove the internal spring.

I just have to cut the 'C' part and make a mount for this to attach on the 'carriage'

http://www.harborfreight.com/digital-th ... 66319.html
[img]http://www.harborfreight.com/media/cata ... _16276.jpg[/img]

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Thu Aug 08, 2013 1:30 pm
by altarke
One nice feature of the Repetier-Host is that you can jog the machine during a pause. I use that to get the z-position at the center and near each column for "snagging the paper." Here is the Gcode file for moving the head around and a spreadsheet that figures out how many degrees to turn each limit switch screw




I must be missing something - by me the script does not pause, it pops the pause message and continues so I can't adjust anything! Any ideas why?
Otherwise I like the procedure alot. There should be something similar to help adjust the PRINTER_RADIUS in the Configuration.h.

Thanks

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Thu Aug 08, 2013 3:15 pm
by Ross_Customs
The script I've done doesn't "pause" but...
There is a 'sleep' for 3 seconds (gcode M1 S3) at the three corners/posts/columns and in the middle.
Perhaps Repetier can jog at this point, but the time frame is too short?

I want to dig into this more and get something that works for the radius too.

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Fri Aug 09, 2013 12:04 pm
by altarke
The script I've done doesn't "pause" but...
There is a 'sleep' for 3 seconds (gcode M1 S3) at the three corners/posts/columns and in the middle.
As I recall, it did not even stop for 3 sec, but I will try it again
Perhaps Repetier can jog at this point, but the time frame is too short?
Maybe I will break the script to 4 positions and run it one at the time
I want to dig into this more and get something that works for the radius too.
You can not imagine how I (and I am sure anyone with who owns a Rostock MAX) is looking forward having this script :D

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Fri Aug 09, 2013 8:04 pm
by Broose
altarke wrote:One nice feature of the Repetier-Host is that you can jog the machine during a pause. I use that to get the z-position at the center and near each column for "snagging the paper." Here is the Gcode file for moving the head around and a spreadsheet that figures out how many degrees to turn each limit switch screw




I must be missing something - by me the script does not pause, it pops the pause message and continues so I can't adjust anything! Any ideas why?
Otherwise I like the procedure alot. There should be something similar to help adjust the PRINTER_RADIUS in the Configuration.h.

Thanks
On mine, the printer doesn't pause until the end of the move where the pause message comes up. Its a minor Repetier bug in that it puts the message up right after the previous move begins instead of waiting until the previous move completes.

Does yours continue the whole script to the end through all of the positions without pausing?

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Mon Aug 12, 2013 2:29 pm
by altarke
Does yours continue the whole script to the end through all of the positions without pausing?
Yep!! no stopping - not quite sure how to effectively leverage this script to ay advantage when it will not play nice - yet I cant wait to get all the bugs out and have a reliable scrip to do the calibration process once and effectively as accurate as can be

Re: Calibration HELPER - Z axis levelling script for Onyx be

Posted: Mon Aug 12, 2013 5:00 pm
by Broose
altarke wrote:
Does yours continue the whole script to the end through all of the positions without pausing?
Yep!! no stopping - not quite sure how to effectively leverage this script to ay advantage when it will not play nice - yet I cant wait to get all the bugs out and have a reliable scrip to do the calibration process once and effectively as accurate as can be
It sounds like the @pause command is not working on your system. Not quite sure why. You can type @pause into the gcode window in the print panel while a print is running and it will throw up the dialog and should pause, or you can stick @pause into a Gcode program and see if it pauses there. Have you pushed the "pause" button on the screen during one of your prints and does that work?