GithubHelp home page GithubHelp logo

fabi0san / ducalibrator Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 0.0 614 KB

An OctoPrint Plugin for performing micro calibration in linear delta machines.

License: GNU Affero General Public License v3.0

Python 0.55% CSS 0.02% JavaScript 98.02% HTML 1.40%
delta-robot marlin octoprint octoprint-plugin

ducalibrator's People

Contributors

fabi0san avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ducalibrator's Issues

Add support for manually deployed probe.

I am using a Anycubic delta Kossel. The auto calibrate works with the probe and it is set as a NC (Normally closed) probe in Marlin,

When clicking probe it just lowers and hits the bed (when probe is attached)

[FR] Implement optional constraints for certain parameters

Hi. I've recently rebuilt my delta - slightly enlarged the base, changed all bolts and such. As I've prepared the changes and was ordering some new aluminum extrusion beams, I drew the AutoCAD models - so I know all dimensions of my printer accurate to 1mm. I've also measured existing parts, such as diagonal rods and carriages with callipers.

The calibration that Marlin's algorithm and DuCalibrator give me the accurate flat first layer - but the adjustments I've got are pretty wild and the resulting dimensions of the print are skewed. For example, my diagonal rods are 217mm, but the algorithm suggests 234mm. One of the rod's trim is calculated to be over 5mm! The precision of my hobbyist callipers leaves much to be desired, but this is certainly way out of the real dimensions of the printer.

So here is a feature request: can DuCalibrator allow the user to input the boundaries for the fetched geometry values? I.e. I could have told the algorithm that I am certain diagonals are 217mm plus-minus 1mm, radius is the value plus-minus 3mm, and I have no idea about endstops. As the result, an algorithm could discard the solutions that are outside of those boundaries.

How to setup TMC_HOME_PHASE

I have optical end stops.

Have you created instruction on how to view the stepper phase of home to update marlin with a good value?

I couldnt find it in the readme, I remember ages ago you mentioned that it shouldnt be to close to the home value

ROD LENGTH corrections aren't fetched.

Hello @Fabi0San

Have one possible enhancement request:
I have added on my delta some rod length corrections to calibrate the print size according to each tower direction, exemple:
#define DELTA_DIAGONAL_ROD_TRIM_TOWER {2.391, -0.024, -2.367}
Unfortunately, that is not possible to get from the firmware.
Your calculation, appears to, uses those values to calibrate.
Do you think it's possible to add those values manually to the initial fetched data?

Thank you

Rod Length

I have run 9 trials.

The first 7 got down to 0.070 RMS. I only changed Tower Offset, Endstop Offset and Delta Radius.

Now for 8 onwards I have unticked Rod length. I know my rod length is 272mm give or take a few microns. (as build with a jig)

however, the results so far for Rod Length 281.1472mm - which I know even using a ruler are way off.

If I carry on probing, will it eventually converge near 272mm?

question

I built brand new rods using a jig. and I am pretty confident they are all 272mm long

With the algroythm to calculate the correct gemoetry, is it best to leave rod length unticked and just calibrate the towers and the endstop offsets?

Also you mention calculating the steps per unit manually. - any advice for doing this ona delta? I have seen the tri block shape which run parallel to each tower. is this the best option?

TMC home phase

Hello

I am sure the previous readme had how to use debug mode to find and then set the TMC home phase correctly.

I cannot find this anymore. Should the TMC home phase be close? opposite?

DuCalibrator hangs during probing

From time to time DuCalibrator simply hangs during probing.
It shows the spinning Probing-Icon, but doesn't react on pressing abort.
Here are the last famous words from serial.log:

2020-07-21 12:58:33,329 - Send: G0 Z3
2020-07-21 12:58:33,347 - Recv: ok
2020-07-21 12:58:33,351 - Send: G0 X49.84185 Y-14.21035
2020-07-21 12:58:33,361 - Recv: ok
2020-07-21 12:58:33,366 - Send: G30 E0
2020-07-21 12:58:33,793 - Recv: Bed X: 49.8418 Y: -14.2103 Z: -0.0043
2020-07-21 12:58:33,801 - Recv: X:49.8418 Y:-14.2103 Z:-0.0043 E:0.0000 Count A:17260 B:23540 C:19032
2020-07-21 12:58:33,815 - Recv: ok
2020-07-21 12:58:33,820 - Send: M118 DONE_257
2020-07-21 12:58:33,824 - Recv: DONE_257
2020-07-21 12:58:33,827 - Recv: ok
2020-07-21 12:58:33,989 - Recv:  T:20.56 /0.0000 B:21.25 /0.0000 @:0 B@:0
2020-07-21 12:58:34,171 - Recv: Not SD printing
2020-07-21 12:58:34,327 - Send: G0 Z3
2020-07-21 12:58:34,335 - Recv: ok
2020-07-21 12:58:34,345 - Send: G0 X51.53063 Y-6.95778
2020-07-21 12:58:34,353 - Recv: ok
2020-07-21 12:58:34,358 - Send: G30 E0
2020-07-21 12:58:34,788 - Recv: Bed X: 51.5306 Y: -6.9578 Z: 0.0003
2020-07-21 12:58:34,792 - Recv: X:51.5306 Y:-6.9578 Z:0.0003 E:0.0000 Count A:16811 B:23402 C:19583
2020-07-21 12:58:34,797 - Recv: ok
2020-07-21 12:58:34,810 - Send: M118 DONE_258
2020-07-21 12:58:34,814 - Recv: DONE_258
2020-07-21 12:58:34,816 - Recv: ok
2020-07-21 12:58:35,180 - Recv: Not SD printing
2020-07-21 12:58:35,320 - Send: G0 Z3
2020-07-21 12:58:35,334 - Recv: ok
2020-07-21 12:58:35,338 - Send: G0 X52.16584 Y0.46171
2020-07-21 12:58:35,347 - Recv: ok
2020-07-21 12:58:35,350 - Send: G30 E0
2020-07-21 12:58:35,788 - Recv: Bed X: 52.1658 Y: 0.4617 Z: 0.0096
2020-07-21 12:58:35,796 - Recv: X:52.1658 Y:0.4617 Z:0.0096 E:0.0000 Count A:16425 B:23200 C:20132
2020-07-21 12:58:35,807 - Recv: ok
2020-07-21 12:58:35,814 - Send: M118 DONE_259
2020-07-21 12:58:35,819 - Recv: DONE_259
2020-07-21 12:58:35,821 - Recv: ok
2020-07-21 12:58:35,989 - Recv:  T:20.22 /0.0000 B:21.62 /0.0000 @:0 B@:0
2020-07-21 12:58:36,185 - Recv: Not SD printing
2020-07-21 12:58:36,389 - Send: G0 Z3
2020-07-21 12:58:36,395 - Recv: ok
2020-07-21 12:58:36,398 - Send: G0 X51.73792 Y7.89606
2020-07-21 12:58:36,408 - Recv: ok
2020-07-21 12:58:36,418 - Send: G30 E0
2020-07-21 12:58:36,850 - Recv: Bed X: 51.7379 Y: 7.8961 Z: 0.0077
2020-07-21 12:58:36,855 - Recv: X:51.7379 Y:7.8961 Z:0.0077 E:0.0000 Count A:16113 B:22935 C:20666
2020-07-21 12:58:36,861 - Recv: ok
2020-07-21 12:58:36,874 - Send: M118 DONE_260
2020-07-21 12:58:36,878 - Recv: DONE_260
2020-07-21 12:58:36,880 - Recv: ok
2020-07-21 12:58:37,185 - Recv: Not SD printing
2020-07-21 12:58:38,013 - Recv:  T:20.37 /0.0000 B:21.47 /0.0000 @:0 B@:0
2020-07-21 12:58:38,193 - Recv: Not SD printing
2020-07-21 12:58:39,221 - Recv: Not SD printing
2020-07-21 12:58:39,723 - Send: M118 PING
2020-07-21 12:58:39,729 - Recv: PING
2020-07-21 12:58:39,733 - Recv: ok
2020-07-21 12:58:39,761 - Send: M118 PING
2020-07-21 12:58:39,767 - Recv: PING
2020-07-21 12:58:39,781 - Recv: ok
2020-07-21 12:58:40,005 - Recv:  T:20.47 /0.0000 B:21.66 /0.0000 @:0 B@:0
2020-07-21 12:58:40,222 - Recv: Not SD printing
2020-07-21 12:58:40,625 - Send: M118 PING
2020-07-21 12:58:40,633 - Recv: PING
2020-07-21 12:58:40,636 - Recv: ok
2020-07-21 12:58:41,187 - Recv: Not SD printing
2020-07-21 12:58:41,486 - Send: M118 PING
2020-07-21 12:58:41,493 - Recv: PING
2020-07-21 12:58:41,497 - Recv: ok
2020-07-21 12:58:41,989 - Recv:  T:20.34 /0.0000 B:21.41 /0.0000 @:0 B@:0
2020-07-21 12:58:42,185 - Recv: Not SD printing
2020-07-21 12:58:42,471 - Send: M118 PING
2020-07-21 12:58:42,477 - Recv: PING
2020-07-21 12:58:42,480 - Recv: ok
2020-07-21 12:58:43,185 - Recv: Not SD printing
2020-07-21 12:58:43,477 - Send: M118 PING
2020-07-21 12:58:43,485 - Recv: PING
2020-07-21 12:58:43,488 - Recv: ok

[Question] Does it requires G29 with specific bed leveling compilation option or is G33 good enough?

I'm currently printing with an FLsun Q5 calibrated solely with G33, so my understanding is that I'm not currently leveraging any bed mesh levelling calibration (G33 does probe the bed but only to find delta geometry if i understand correctly).

My question is can I directly use this plugin or should I first start with a G29 bed levelling, and if so which option do you recommend in Marlin's firmware? AUTO_BED_LEVELING_UBL or AUTO_BED_LEVELING_BILINEAR, currently I don't have any option enabled.

Thanks!


Just tried probing and while it does properly get a good first probe point it does fail quickly after:

Recv: Bed X: 5.93 Y: -19.10 Z: 0.19
Recv: X:5.93 Y:-19.10 Z:20.09 E:0.00 Count A:16679 B:17133 C:15589
Recv: ok
Send: M118 DONE_4
Recv: DONE_4
Recv: ok
Send: G0 Z20
Recv: ok
Send: G0 X24.24409 Y-3.49630
Recv: ok
Send: G30 E0
[...]
Recv: Bed X: 24.24 Y: -3.50 Z: -1.04
Recv: X:24.24 Y:-3.50 Z:18.86 E:0.00 Count A:15431 B:17355 C:16189
Recv: ok
Send: M118 DONE_5
Recv: DONE_5
Recv: ok
Send: G0 Z20
Recv: ok
Send: G0 X19.57089 Y20.42010
Recv: ok
Send: G30 E0
[...]
Recv: Error:Probing Failed
Changing monitoring state from "Operational" to "Error: Probing Failed"
Send: M112
Send: N55315 M112*38
Send: N55316 M104 T0 S0*37
Send: N55317 M140 S0*96
Changing monitoring state from "Error: Probing Failed" to "Offline (Error: Probing Failed)"
Connection closed, closing down monitor

Klipper support

I'll follow this because is interesting, but I'm using klipper.

Feature Request

Hello,

have you thought about the start probing the same point maybe 10-20 times to see the repeatability and range of the sensor being used.

I am sure this could help in the calcualtions to understand if the figures are out, of if they are within the sensors range

DuCalibrator hangs during 'Fetch Geometry'

Observed: On my MP Mini Delta, after entering 100 as my probing radius, and clicking 'Fetch Geometry', the UI shows the spinning gear, but the printer does nothing, and I let the Fetch run for 5 minutes.

Not sure if I'm trying to use this tool on an incompatible printer (I have no idea if it's using Marlin firmware) or if there's a setting I can adjust.

Questions and suggestions regarding Klipper

(Moved from here: Klipper3d/klipper#4820 (comment))

@Fabi0San As requested ;-)

General things I noticed

  • Does your plugin rely on M118to be working? Then you should mention in your description, that the [respond] section has to be activated in Klipper config. It is not by default.

  • What about activated mesh bed leveling? Is this being deactivated during calibration or do active values have any impact on your calibration routine? In my case, Klipper always reloads the bed mesh when it is restarted normally, so I have always an active bed mesh, which I don't re-probe every time I start a print. One would have to clear it explicitely (by issuing BED_MESH_CLEAR macro) to deactivate it. Perhaps this is of no interest, but as I don't know, how the whole magic works, I thought I mention it ;-)... Note, that if you save your corrections after BED_MESH_CLEAR the user would have to run a bed mesh probe at the very end. Take into account here that Klipper has the possibility to save multiple bed mesh profiles - you could even use BED_MESH_PROFILE to save the current values to a temporary profile before clearing the mesh.

  • After Trial #0 the new values are saved, that's fine, but you should also save the original calibration values before the first trial even started as an additional point in your history, so that one can return to the very very beginning. I had to manually recover a printer.cfg to get back to this.

In my special case

  • The endstop position changed a lot! Why?

  • I set 20mm as 'Safe height' in settings, as my Z probe offset is 16.417 (btw, you could easily get this from Klipper and add a 5mm safety margin as a starting point for this config value I think).
    Now, the first time I probed the bed, the head lifted only about 5mm when moving from probe point to probe point and after everything was done, RMS said 16.349. I applied, config was saved and Klipper restarted. But now, on the second attempt, the head moved roughly about 20mm during its movements and suddenly RMS was 0.016 ;-) (I didn't run a third attempt, as I thought I'd first report this).
    As I know that my printer is very well calibrated, this massive jump from RMS 16.349 to RMS 0.016 can not be a result of your plugin correcting my poor calibration values, but from some kind of miscalculation regarding safe height and/or z probe offset (or maybe it is just a matter of how values are displayed?).

Calibration values of my printer.cfg before and after Trial #0:

Original calibration values from DELTA_CALIBRATE
#*# [probe]
#*# z_offset = 16.417
#*#
#*# [printer]
#*# delta_radius = 133.856187
#*#
#*# [stepper_a]
#*# angle = 210.053520
#*# arm_length = 269.690000
#*# position_endstop = 292.869717
#*#
#*# [stepper_b]
#*# angle = 331.059599
#*# arm_length = 269.690000
#*# position_endstop = 293.006780
#*#
#*# [stepper_c]
#*# angle = 90.000000
#*# arm_length = 269.690000
#*# position_endstop = 291.924204
Modified calibration values after Trial #0
#*# [probe]
#*# z_offset = 16.417
#*#
#*# [printer]
#*# delta_radius = 134.467785
#*#
#*# [stepper_a]
#*# angle = 210.080290
#*# arm_length = 271.782728
#*# position_endstop = 276.369199
#*# rotation_distance = 40.000000
#*#
#*# [stepper_b]
#*# angle = 330.996364
#*# arm_length = 271.782728
#*# position_endstop = 276.853918
#*# rotation_distance = 40.000000
#*#
#*# [stepper_c]
#*# angle = 90.000000
#*# arm_length = 271.782728
#*# position_endstop = 275.565977
#*# rotation_distance = 40.000000

For the time being I return to my original values, as I am getting decent results with them and because I don't know if one of the things above might have a negative impact on my prints atm. I simply am not able to judge the results ;-) - but if there is really something going wrong here and you corrected it or if you can explain what is happening here I am happy to try it again ๐Ÿ‘

Probe number

I saw from your readme about the number of probes
50 is good 500 is slow etc - I think this is relating to CPU speed. I do not have this limitation.

Do you have guidelines on diminishing return for the number of points?

I was thinking is it best to start with less e.g. 50 and when the RMS gets below a value increase to increase the number of points

Fetch Geometry now working

Hello,

I have a Marlin delta. The Fetch Geometry does not appear to work when using my actual printer, but works with the simulated printer. For my printer, the gear keeps on spinning. From what I can tell from the code, you emit an M503 to fetch the current geometry. My printer supports that for sure. This is what I receive when I run it in Terminal. Any thoughts on what might be the issue?

Send: M503
Recv: echo:Steps per unit:
Recv: echo: M92 X100.00 Y100.00 Z100.00 E477.30
Recv: echo:Maximum feedrates (mm/s):
Recv: echo: M203 X200.00 Y200.00 Z200.00 E100.00
Recv: echo:Maximum Acceleration (mm/s2):
Recv: echo: M201 X1500 Y1500 Z1500 E1500
Recv: echo:Acceleration: S=acceleration, T=retract acceleration
Recv: echo: M204 S800.00 T700.00
Recv: echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)
Recv: echo: M205 S0.00 T0.00 B20000 X10.00 Z10.00 E10.00
Recv: echo:Home offset (mm):
Recv: echo: M206 X0.00 Y0.00 Z0.00
Recv: echo:Endstop adjustment (mm):
Recv: echo: M666 X-0.10 Y0.00 Z-1.49
Recv: echo:Delta Geometry adjustment:
Recv: echo: M666 A0.08 B-0.07 C0.00 E0.00 F0.00 G0.00 R99.30 D214.00 H249.05 P0.00
Recv: echo:PID settings:
Recv: echo: M301 P26.88 I1.72 D105.25

Any help would be greatly appreciated. Thank you!

Default Init Commands

The default Init Commands

G0 F12000 ;speed

The speed F12000 seems quite large? did you mean F1200?

M112: Emergency Stop

I have just updated the software and can now fetch the current geometry. Once this is done, when I klick on probe bed and fit the probe I get a M112 error requiring printer reset.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.