openfab-lab / toolsDocs

Repo pour la documentation des machines
3 stars 5 forks source link

Auto leveling on anet A6 #15

Closed Jorgininho closed 1 year ago

Jorgininho commented 5 years ago

Just an isue to trace what I'm doing on the Anet A6 for the autoleveling:

Firmware need updates, several lignes will be uncommented :

//#define AUTO_BED_LEVELING_3POINT //#define AUTO_BED_LEVELING_LINEAR

define AUTO_BED_LEVELING_BILINEAR

//#define AUTO_BED_LEVELING_UBL //#define MESH_BED_LEVELING

define X_PROBE_OFFSET_FROM_EXTRUDER -10 // X offset: -left +right [of the nozzle]

define Y_PROBE_OFFSET_FROM_EXTRUDER -60 // Y offset: -front +behind [the nozzle]

define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]

define FIX_MOUNTED_PROBE


At this point another issue shows off, by uncommenting these lines, the firmware became to big in size to be uploaded on the command card. A solution is to comment other line about options that we can disable. page which describes the space for each options lines that were commented (need to be confirmed when i'll submit the pull request), also the option choosen might not be the best one:

//#define PREVENT_COLD_EXTRUSION

//#define AUTOTEMP

From there the firmware can fit.


Here start the destroy process, the upload of the firmware failed, and bricked the card and make it useless because the bootlader got corrupted. From this point it was needed to flash a new bootloader on the card. Following this procedure , and this video

to be continued...

Jorgininho commented 5 years ago

So autoleveling is done on the Anet A6 here are the steps to reach it :

We've uncommented the following line because the autolevel captor isn't above when homing the X and Y axis, so this allow a safe Z-homing and avoid the nozzle to press on bed, so in config.h:

define Z_SAFE_HOMING

From this point we got a compatible firmware that can be uploaded on the anet a6. You can Upload it on the Anet


Connect the captor

Next step after mounted the connector on the nozzle with the 3D shape printed above, is to connect the captor to the printer motherboard. The type of captor used is : SN04-N It is a capacitor captor which means it'll detect metalic part as the bed of the printer, putting a glass on the bed may prevent the good use of this captor. 3 wires to connect from this captor to the mother board :


Configuration

Here comes the fun, the configuration of the Zoffset, all command are inspired by this page , the method used is for the marlin firmware 1.1.x The parameter that handle the autolevel configuration is the Z offset (M851 in G-code)

All the configuration are done via G-code command via the USB cable directly to the printer, we used pronterface to do it (one software is lauched, set baudrate to 250000 before connect)

From now, the autolevel is set up, 2 ways to use it for printing:

The best way to test the configuration is to pring a 1rst layer form like this one

!!!!This configuration may needs to be done each time a manipulation on the printer leads to a movement of the captor from the nozzle (this is why it needs to be fixed RIGID)

I'll submit the pull request later on, cheers !

nicolasdb commented 5 years ago

Connect the sensor not captor. huhu

"he managed to escape from his captors/sensors two nights later"

Jorgininho commented 5 years ago

So apparently the sensor isn't set-up correctly. For a reason I ignore, the nozzle was touching the bed during homing.

The behavior of the command G30 needs some investigation since I don't have the feeling it give back results that can be used. 1rst i tried to test the sensor, needs to uncomment the following line in configuration.h :

define Z_MIN_PROBE_REPEATABILITY_TEST

These leads to multiple fail for compiling the firmware as it is (and multiple bricking of the anet :/ ) So I did the test from the firmware with the lines about autoleveling commented. the result as it is :

M48 P50 X100 Y100 V4 SENDING:M48 P50 X100 Y100 V4 M48 Z-Probe Repeatability Test Positioning the probe... Bed X: 100.000 Y: 100.000 Z: -0.032 1 of 50: z: -0.037 mean: -0.0375 sigma: 0.000000 min: -0.037 max: -0.037 range: 0.000 2 of 50: z: -0.040 mean: -0.0388 sigma: 0.001250 min: -0.040 max: -0.037 range: 0.003 3 of 50: z: -0.037 mean: -0.0383 sigma: 0.001179 min: -0.040 max: -0.037 range: 0.003 4 of 50: z: -0.037 mean: -0.0381 sigma: 0.001083 min: -0.040 max: -0.037 range: 0.003 5 of 50: z: -0.032 mean: -0.0370 sigma: 0.002449 min: -0.040 max: -0.032 range: 0.008 6 of 50: z: -0.037 mean: -0.0371 sigma: 0.002244 min: -0.040 max: -0.032 range: 0.008 7 of 50: z: -0.037 mean: -0.0371 sigma: 0.002082 min: -0.040 max: -0.032 range: 0.008 8 of 50: z: -0.035 mean: -0.0369 sigma: 0.002073 min: -0.040 max: -0.032 range: 0.008 9 of 50: z: -0.037 mean: -0.0369 sigma: 0.001964 min: -0.040 max: -0.032 range: 0.008 10 of 50: z: -0.040 mean: -0.0372 sigma: 0.002077 min: -0.040 max: -0.032 range: 0.008 11 of 50: z: -0.035 mean: -0.0370 sigma: 0.002083 min: -0.040 max: -0.032 range: 0.008 12 of 50: z: -0.035 mean: -0.0369 sigma: 0.002073 min: -0.040 max: -0.032 range: 0.008 13 of 50: z: -0.035 mean: -0.0367 sigma: 0.002053 min: -0.040 max: -0.032 range: 0.008 14 of 50: z: -0.032 mean: -0.0364 sigma: 0.002259 min: -0.040 max: -0.032 range: 0.008 15 of 50: z: -0.035 mean: -0.0363 sigma: 0.002211 min: -0.040 max: -0.032 range: 0.008 16 of 50: z: -0.035 mean: -0.0363 sigma: 0.002165 min: -0.040 max: -0.032 range: 0.008 17 of 50: z: -0.037 mean: -0.0363 sigma: 0.002121 min: -0.040 max: -0.032 range: 0.008 18 of 50: z: -0.035 mean: -0.0363 sigma: 0.002083 min: -0.040 max: -0.032 range: 0.008 19 of 50: z: -0.035 mean: -0.0362 sigma: 0.002047 min: -0.040 max: -0.032 range: 0.008 20 of 50: z: -0.035 mean: -0.0361 sigma: 0.002012 min: -0.040 max: -0.032 range: 0.008 21 of 50: z: -0.035 mean: -0.0361 sigma: 0.001978 min: -0.040 max: -0.032 range: 0.008 22 of 50: z: -0.035 mean: -0.0360 sigma: 0.001945 min: -0.040 max: -0.032 range: 0.008 23 of 50: z: -0.035 mean: -0.0360 sigma: 0.001914 min: -0.040 max: -0.032 range: 0.008 24 of 50: z: -0.035 mean: -0.0359 sigma: 0.001884 min: -0.040 max: -0.032 range: 0.008 25 of 50: z: -0.035 mean: -0.0359 sigma: 0.001855 min: -0.040 max: -0.032 range: 0.008 26 of 50: z: -0.032 mean: -0.0358 sigma: 0.001933 min: -0.040 max: -0.032 range: 0.008 27 of 50: z: -0.032 mean: -0.0356 sigma: 0.001995 min: -0.040 max: -0.032 range: 0.008 28 of 50: z: -0.035 mean: -0.0356 sigma: 0.001962 min: -0.040 max: -0.032 range: 0.008 29 of 50: z: -0.035 mean: -0.0356 sigma: 0.001931 min: -0.040 max: -0.032 range: 0.008 30 of 50: z: -0.032 mean: -0.0355 sigma: 0.001979 min: -0.040 max: -0.032 range: 0.008 31 of 50: z: -0.035 mean: -0.0355 sigma: 0.001949 min: -0.040 max: -0.032 range: 0.008 32 of 50: z: -0.032 mean: -0.0354 sigma: 0.001987 min: -0.040 max: -0.032 range: 0.008 33 of 50: z: -0.035 mean: -0.0354 sigma: 0.001958 min: -0.040 max: -0.032 range: 0.008 34 of 50: z: -0.032 mean: -0.0353 sigma: 0.001989 min: -0.040 max: -0.032 range: 0.008 35 of 50: z: -0.032 mean: -0.0352 sigma: 0.002015 min: -0.040 max: -0.032 range: 0.008 36 of 50: z: -0.035 mean: -0.0352 sigma: 0.001987 min: -0.040 max: -0.032 range: 0.008 37 of 50: z: -0.035 mean: -0.0352 sigma: 0.001961 min: -0.040 max: -0.032 range: 0.008 38 of 50: z: -0.032 mean: -0.0351 sigma: 0.001982 min: -0.040 max: -0.032 range: 0.008 39 of 50: z: -0.032 mean: -0.0351 sigma: 0.002001 min: -0.040 max: -0.032 range: 0.008 40 of 50: z: -0.032 mean: -0.0350 sigma: 0.002016 min: -0.040 max: -0.032 range: 0.008 41 of 50: z: -0.032 mean: -0.0349 sigma: 0.002028 min: -0.040 max: -0.032 range: 0.008 42 of 50: z: -0.032 mean: -0.0349 sigma: 0.002038 min: -0.040 max: -0.032 range: 0.008 43 of 50: z: -0.032 mean: -0.0348 sigma: 0.002046 min: -0.040 max: -0.032 range: 0.008 44 of 50: z: -0.035 mean: -0.0348 sigma: 0.002022 min: -0.040 max: -0.032 range: 0.008 45 of 50: z: -0.030 mean: -0.0347 sigma: 0.002123 min: -0.040 max: -0.030 range: 0.010 46 of 50: z: -0.032 mean: -0.0347 sigma: 0.002124 min: -0.040 max: -0.030 range: 0.010 47 of 50: z: -0.032 mean: -0.0346 sigma: 0.002125 min: -0.040 max: -0.030 range: 0.010 48 of 50: z: -0.032 mean: -0.0346 sigma: 0.002125 min: -0.040 max: -0.030 range: 0.010 49 of 50: z: -0.032 mean: -0.0345 sigma: 0.002123 min: -0.040 max: -0.030 range: 0.010 50 of 50: z: -0.032 mean: -0.0345 sigma: 0.002121 min: -0.040 max: -0.030 range: 0.010 Finished! Mean: -0.034500 Min: -0.040 Max: -0.030 Range: 0.010 Standard Deviation: 0.002121

seems the sensor is working correctly

to be continued

Jorgininho commented 5 years ago

So the issue I have (probe offset measured by G30 isn't relevant) already happens in this https://github.com/MarlinFirmware/Marlin/issues/7662 But when I tried the proposed solution i led to some error in movement command.... Needs to measure the distance between nozzle and sensor manually.

Jorgininho commented 5 years ago

So I abandonned the use of the G30 command to measure the offset between the nozzle and the sensor. The method used to set up the autoleveling is the following :

M851 Z0 (set up of the offset to 0) G28 (homing) M211 S0 (turn off software endstop) adapt the height to the nozzle to have to normal setup (just a thin paper that goes through) M114 (check the distance in Z after the set up above)

if Z=-1.4 then the Z offset needs to be -1.4 mm

M851 Z-1.4 (will set up the Z offset to -1.4mm) M500 (store the Z offset setup) G28 (homing) G0 Z0 (check that the nozzle is at a printing distance from the bed)

!!!!!! THE DOUBT AND INVESTIGATION !!!!!!

I leveled 1rst manually the bed, after printing a 1rst layer test, It doesn't seems the autoleveling is taken in account.... I'm kind of lost...

Jorgininho commented 5 years ago

this current issue is like the following https://github.com/MarlinFirmware/Marlin/issues/5578

There might be an hardware issue where the X axis is tiltedHas a little height difference on Z axis, set it up and launching print of the first layer same shit...

A mechanical check shows the sensor isn't at the same level of the bed from end to another of the X axis. the autobedleveling is suppose to correct this issue, the weird behavir is that when the sensor is closer to the bed, the correction in Z seems higher than where the sensor is further from the bed

Maybe try to invert axis : https://github.com/MarlinFirmware/Marlin/issues/8018

Jorgininho commented 5 years ago

So the issue seems not software but hardware, the rod of the X axis seems to be twisted regarding the behavior of the compensation from the autoleveling: https://github.com/AnHardt/Marlin/issues/84

So might needs to correct the X-axis like this : https://3dprinterwiki.info/dealing-with-bent-rods/ Or changing the frame of the Anet.

Meanwhile I put back the Firmware as it from actual branch of anet A6 github, but change one parameter to uncomment the following line :

define Z_SAFE_HOMING

So it allows the homing on Z with the probe in the middle of the bed.

After homing we want the prob to be at Z=0 to allow a quicker setup of the bed to the following needs to be changed :

define Z_CLEARANCE_DEPLOY_PROBE 0

The usage of the printer is as before, so bed leveling needs to be done after a normal auto homing.

Soon to be coming a detailled manual on how to burn a bootloader on the anet since its the only succes of all this adventure :)

Its not a give up, if there is a possibility to let the printer as it is today, Iwould love to try to fix this X tilted axis issue in December or January when I'll be back...

When this hardware issue will be solved, here are configuration files for marlin than include the autoleveling and that can be uploaded on the anet: Marlin.zip

nicolasdb commented 5 years ago

Et si on changeait la board? Et qu'on en parle plus?

Jorgininho commented 5 years ago

nope, à mon avis le probleme est mécanique, il se situe à priori sur la barre de métal de l'axe X qui sont tordues

nicolasdb commented 5 years ago

il n'y avait pas un soucis de capacité de mémoire de la board? C'est peut-être moi qui ai la RAM qui bug. ^^

Jorgininho commented 5 years ago

Concernant la capacité, c'est pas forcement nécéssaire, j'ai commenté differents parametre pour gagner de la place: dans configuration_adv.h:

//#define AUTOTEMP //#define ARC_SUPPORT //#define EXTENDED_CAPABILITIES_REPORT

Sinon, j'ai réorienté la barre pour que la déformation soit à l'horizontale, mais ça ne change rien :(

nicolasdb commented 1 year ago

Autoleveling? voilà, plus de problème. image