Auto-Leveling in Firmware Not Active - Mini IR Height Sensor

I have auto leveling enabled in firmware to use my mini ir height sensor board from David Crocker. I've followed directions from his blog https://miscsolutions.wordpress.com/mini-height-sensor-board/ to the point I've set my configuration to the offset i obtained. However, when i load the firmware and boot it, auto-leveling is off. I turn it on from the LCD menu, but i don't see an option to have it run the auto-level. Do i need to send it Gcode to run the auto level from the menu? Or is it suppose to run before a print? It seems like i should be able to run auto level if i enable it in the lcd menu. Can it enable automatically?

Comments

  • It is same as for all z probes. IR is nothing special to handle. You should use dev version which fixes many issues around autoleveling and also has a menu entry in "Setup" menu. If you have a fixed bed you normally only need to level once. If you are not z-max homign you need to have z-min = z probe pin and use homing order XY Preheat Z with z rpobe position so enabling probe is possible.
  • Repetier said:
    It is same as for all z probes. IR is nothing special to handle. You should use dev version which fixes many issues around autoleveling and also has a menu entry in "Setup" menu. If you have a fixed bed you normally only need to level once. If you are not z-max homign you need to have z-min = z probe pin and use homing order XY Preheat Z with z rpobe position so enabling probe is possible.
    So just switching to the Development version should do it? My Z probe is is in the Z min stop, and i'll look into homing with XY then Preheat Z before probing. Also with a z probe pin should i have a z-max endstop?
  • Dev version should help. I always advice a z-max endstop, but as discussed in this forum several times it is possible to use z-probe as z-min endstop as well. Both ways have advantages and disadvantages and it is more personal opinion on what is better.
  • edited March 30
    Repetier said:
    Dev version should help. I always advice a z-max endstop, but as discussed in this forum several times it is possible to use z-probe as z-min endstop as well. Both ways have advantages and disadvantages and it is more personal opinion on what is better.
    So i uploaded my config file to the DEV 1.0.0 version, and found i could try to level. But for some reason the z axis won't go below like halfway. Does the printer have to boot with the z axis in the z0 position? I can't manually move it down further than that position either. Do i need to define something else in my settings regarding the z probe? Perhaps i need the nozzle to get to to printing temp? I am going to try to re-do the procedure on David Crocker's page and redefine my offsets. Any tips? Do i need to use the sensor in analog mode or change my firmware to something other than a standard z probe?
  • You need to have ALWAYS_CHECK_ENDSTOPS 0 since z min is also z probe and it triggers before you hit bed.

    You need to configure to go up a bit at startup so it is untriggered when you start homing. This also means to never go fully up so this always works. Temperature is not required - that is for printers where nozzle is z probe so ooze does not change height. Sensor MUST send a digital on/off value. Only that mode will work!
  • Use M119 to test if probe is configured correctly. If triggered Z min and z probe should show H otherwise L! Only when that is working proceed.

  • Repetier said:
    You need to have ALWAYS_CHECK_ENDSTOPS 0 since z min is also z probe and it triggers before you hit bed.

    You need to configure to go up a bit at startup so it is untriggered when you start homing. This also means to never go fully up so this always works. Temperature is not required - that is for printers where nozzle is z probe so ooze does not change height. Sensor MUST send a digital on/off value. Only that mode will work!
    So i know that i verified i could read when the sensor was activated like on the David Crocker blog instructions. It boots in digital mode and with M119 z probe would go to H when triggered. I had  ALWAYS_CHECK_ENDSTOPS checked, so i need to uncheck that box to make it 0 correct? I don't recall seeing Zmin toggling with the probe before, but i wanted to re-verify my config before re-running.

    Since my probe is using z min, do i need ENDSTOP_PULLUP_Z_MIN/ENDSTOP_Z_MIN_INVERTING to be a Electronic, Normally Open switch?

    And if temp doesnt matter then why do i need to Home X Y Preheat then Z?
  • If your z home position is min you need to configure z min endstop the same as z probe.

    Reason for choosing the temperature homing is that in that case you can define z homing position. Since you use z probe homing on 0,0 is normally not possible as you need to activate probe offset and that takes some room. So just set temperature to 0 = off so it leaves the important part.

    Your probe gets configured twice once as z min endstop and then as z probe so making both same is good so you know what gets used since the order is undetermined. For required setting just test. When it switches from L to H and back is is good.
  • Repetier said:
    If your z home position is min you need to configure z min endstop the same as z probe.

    Reason for choosing the temperature homing is that in that case you can define z homing position. Since you use z probe homing on 0,0 is normally not possible as you need to activate probe offset and that takes some room. So just set temperature to 0 = off so it leaves the important part.

    Your probe gets configured twice once as z min endstop and then as z probe so making both same is good so you know what gets used since the order is undetermined. For required setting just test. When it switches from L to H and back is is good.
    How do i verify z min and z probe are configured the same? I've configured Z probe to use z min endstop, and z min endstop i have set to electronic normally open and to use the zmin endstop pin. Is this right? I won't be able to test another config file until later today. Just trying to wrap my head around this..
  • edited March 31
    It doesn't seem like both the probe and z endstop are working together. The z probe is:

    > 4:51:46 PM: N77 M119 *58
    < 4:51:46 PM: endstops hit: x_min:L y_min:L z_min:L Z-probe state:H
    > 4:52:58 PM: N145 M119 *10
    < 4:52:58 PM: endstops hit: x_min:L y_min:L z_min:L Z-probe state:L

    First M119 was with the IR sensor not activated its LED off
    Second M119 was with the IS sensor activated its LED on

    Was my ENDSTOP_PULLUP_Z_MIN/ENDSTOP_Z_MIN_INVERTING = Electronic, Normally Open switch the wrong selection?

    Just tried toggling Z_PROBE_ON_HIGH to true and it still gives me a H on an not activated probe and a L on an active probe, with no zmin changes..
  • edited March 31
    Also Z won't go in the negative direction at all. every reboot it would climb +z and not want to go down at all. Even manually it thinks Z0 is where ever it boots up in...

    Update: adding in a Zmax button, the printer will still try to continue upward even if zmax is H, i checked with M119 and it's not acting like an endstop....

  • Also Z won't go in the negative direction at all. every reboot it would climb +z and not want to go down at all. Even manually it thinks Z0 is where ever it boots up in...

    Update: adding in a Zmax button, the printer will still try to continue upward even if zmax is H, i checked with M119 and it's not acting like an endstop....

    link to my configuration.h file:
    https://drive.google.com/open?id=0B7lZgNIb_aruZmtNSjlwcWFsZkU
  • #define ENDSTOP_PULLUP_Z_MIN true
    #define ENDSTOP_Z_MIN_INVERTING true
    #define MIN_HARDWARE_ENDSTOP_Z true

    #define Z_PROBE_PIN ORIG_Z_MIN_PIN
    #define Z_PROBE_PULLUP 1
    #define Z_PROBE_ON_HIGH 1

    are the 2 blocks that must match.  Both have pullup as required for mechanical endstops (electronic is without pullup). I think MIN_HARDWARE_ENDSTOP_Z true mean high on low signal while z probe has it different direction so one of them seems wrong. After that
    they should be in sync and show the same signal level.

    Make sure z min is L when you need to go down.


  • Repetier said:
    #define ENDSTOP_PULLUP_Z_MIN true
    #define ENDSTOP_Z_MIN_INVERTING true
    #define MIN_HARDWARE_ENDSTOP_Z true

    #define Z_PROBE_PIN ORIG_Z_MIN_PIN
    #define Z_PROBE_PULLUP 1
    #define Z_PROBE_ON_HIGH 1

    are the 2 blocks that must match.  Both have pullup as required for mechanical endstops (electronic is without pullup). I think MIN_HARDWARE_ENDSTOP_Z true mean high on low signal while z probe has it different direction so one of them seems wrong. After that
    they should be in sync and show the same signal level.

    Make sure z min is L when you need to go down.


    Those 2 blocks are the same in my firmware, just like you posted above, copied from my config file:

    #define MULTI_ZENDSTOP_HOMING 0   Does this have anything to do with anything?
    #define ENDSTOP_PULLUP_X_MIN true
    #define ENDSTOP_X_MIN_INVERTING true
    #define MIN_HARDWARE_ENDSTOP_X true
    #define ENDSTOP_PULLUP_Y_MIN true
    #define ENDSTOP_Y_MIN_INVERTING true
    #define MIN_HARDWARE_ENDSTOP_Y true
    #define ENDSTOP_PULLUP_Z_MIN true
    #define ENDSTOP_Z_MIN_INVERTING true Just like you noted above
    #define MIN_HARDWARE_ENDSTOP_Z true
    #define ENDSTOP_PULLUP_Z2_MINMAX true
    #define ENDSTOP_Z2_MINMAX_INVERTING false
    #define MINMAX_HARDWARE_ENDSTOP_Z2 false
    #define ENDSTOP_PULLUP_X_MAX true
    #define ENDSTOP_X_MAX_INVERTING false
    #define MAX_HARDWARE_ENDSTOP_X false
    #define ENDSTOP_PULLUP_Y_MAX true
    #define ENDSTOP_Y_MAX_INVERTING false
    #define MAX_HARDWARE_ENDSTOP_Y false
    #define ENDSTOP_PULLUP_Z_MAX true
    #define ENDSTOP_Z_MAX_INVERTING true  Is this the correct way to setup z_max endstop? It isn't stopping motion
    #define MAX_HARDWARE_ENDSTOP_Z true when the z_max switch is High... it tried to crash right through it.
    #define max_software_endstop_r true

    Z Probe:

    #define Z_PROBE_Z_OFFSET 0
    #define Z_PROBE_Z_OFFSET_MODE 0
    #define UI_BED_COATING 1
    #define FEATURE_Z_PROBE 1
    #define EXTRUDER_IS_Z_PROBE 0
    #define Z_PROBE_BED_DISTANCE 10
    #define Z_PROBE_PIN ORIG_Z_MIN_PIN Again, just like you noted above.
    #define Z_PROBE_PULLUP 1  
    #define Z_PROBE_ON_HIGH 1
  • I copied them from your config to show you which are relevant. I think you need to change either Z_PROBE_ON_HIGH or ENDSTOP_Z_MAX_INVERTING
  • Repetier said:
    I copied them from your config to show you which are relevant. I think you need to change either Z_PROBE_ON_HIGH or ENDSTOP_Z_MAX_INVERTING
    Change them in regards to what? Z min endstop not triggering with z probe? Or why the z max endstop isnt working?
  • edited April 1
    OK so i'm getting somewhere.... i turned #define ENDSTOP_Z_MIN_INVERTING to FALSE and Z_PROBE_ON_HIGH to FALSE and the auto level would run it's 3 points. Thanks for all the help i'm starting to feel like i'm really close!

    Update: So i found how to tell X and Y to move to 110mm bed center for z homing. But what's weird is that when i Z home, the probe just wants to move up and and never back down to trigger the probe. It's like it raises the 30 cm for cleareance but won't go towards the bed to trigger the probe... Something i'm missing?

    Updated link to my configuration.h file:
    https://drive.google.com/open?id=0B7lZgNIb_aruZmtNSjlwcWFsZkU
  • Does M119 now show same level for z min and z probe? Since you inverted both and not one of them I guess that is your error. It will stop the down moves as soon a z min triggers.
  • No Zmin still never changes it's always L. It has never showed a H at all on any setting. The probe works and it acts like a zmin endstop but m119 doesn't show it changing.
  • Ok, but it should do. You should have set z min endstop to hardware with z min pin (assuming you used that pin for z probe). If that does not change in sync homing will never work correctly.
  • edited April 2
    Repetier said:
    Ok, but it should do. You should have set z min endstop to hardware with z min pin (assuming you used that pin for z probe). If that does not change in sync homing will never work correctly.
    I do have z min endstop set to z min pin, as well as z probe set to use z min pin. If i raise Z up and let it move down to home z i can stop it by triggering the sensor. What is weird is that when i'm telling it to use the center of the bed X,Y @ 110mm/110mm, it raises up, moved to center of bed, but doesn't go down much at all to have the prob trigger. It goes down slightly then back up and continues up then stops.  20mm or so above the bed. I run it again and it will continue to end up 20mm or so above where ever it was last.
  • Does not make much sense. If it reacts on the z probe trigger it should also show so with M119 especially if z probe shows the signal as well.

    Your homing procedure sounds like it is triggered directly when trying to go down, which is why you see only the up moves.

    BTW: up/down is relative since I do not know what moves - bed or extruder. For me up is always increasing distance between bed and nozzle. I guess in your case the extruder is moving up when you say up?
  • Repetier said:
    Does not make much sense. If it reacts on the z probe trigger it should also show so with M119 especially if z probe shows the signal as well.

    Your homing procedure sounds like it is triggered directly when trying to go down, which is why you see only the up moves.

    BTW: up/down is relative since I do not know what moves - bed or extruder. For me up is always increasing distance between bed and nozzle. I guess in your case the extruder is moving up when you say up?
    Yes i have a iPrusa clone - Anet A8. +Z or UP is extruder moving away from bed. -Z is towards bed. X is the carriage of the extruder and Y is bed movement. I will mess around a bit more and see what i can do. I'm jsut about to scrap auto leveling for now and do it manually but it's so close. Gotta just be something i'm missing. I'll try to get a video of the process if i still can't get it to work...

  • > 4:51:46 PM: N77 M119 *58
    < 4:51:46 PM: endstops hit: x_min:L y_min:L z_min:L Z-probe state:H 
    > 4:52:58 PM: N145 M119 *10
    < 4:52:58 PM: endstops hit: x_min:L y_min:L z_min:L Z-probe state:L 
    First M119 was with the IR sensor not activated its LED off
    Second M119 was with the IS sensor activated its LED on

    + Probe triggers on high (Z_PROBE_ON_HIGH)  
    From an earlier post, this line should be un-ticked in config.h  so that probe triggers on a low

  • edited April 2
    MartinH said:

    > 4:51:46 PM: N77 M119 *58
    < 4:51:46 PM: endstops hit: x_min:L y_min:L z_min:L Z-probe state:H 
    > 4:52:58 PM: N145 M119 *10
    < 4:52:58 PM: endstops hit: x_min:L y_min:L z_min:L Z-probe state:L 
    First M119 was with the IR sensor not activated its LED off
    Second M119 was with the IS sensor activated its LED on

    + Probe triggers on high (Z_PROBE_ON_HIGH)  
    From an earlier post, this line should be un-ticked in config.h  so that probe triggers on a low

    Currently it is set to 0 (unchecked) and it still returns a H on no trigger and L on a trigger.. And nothing i change in the config is changing the z_min state at all....
  • And now i'm getting compiling errors?

    Arduino: 1.8.1 (Mac OS X), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

    HAL.cpp:784: error: operator '<' has no left operand
     #if COOLER_PWM_SPEED < 0
                          ^
    HAL.cpp:787: error: operator '>' has no left operand
     #if COOLER_PWM_SPEED > 4
                          ^
    HAL.cpp:791: error: operator '==' has no left operand
     #if COOLER_PWM_SPEED == 0
                          ^
    HAL.cpp:794: error: operator '==' has no left operand
     #elif COOLER_PWM_SPEED == 1
                            ^
    HAL.cpp:797: error: operator '==' has no left operand
     #elif COOLER_PWM_SPEED == 2
                            ^
    HAL.cpp:800: error: operator '==' has no left operand
     #elif COOLER_PWM_SPEED == 3
                            ^
    HAL.cpp:803: error: operator '==' has no left operand
     #elif COOLER_PWM_SPEED == 2
                            ^
    sketch/HAL.cpp: In function 'void __vector_22()':
    HAL.cpp:879: error: 'COOLER_PWM_MASK' was not declared in this scope
             if((pwm_pos_set[PWM_FAN1] = (pwm_pos[PWM_FAN1] & COOLER_PWM_MASK)) > 0) WRITE(FAN_PIN,1);
                                                              ^
    HAL.cpp:985: error: 'COOLER_PWM_MASK' was not declared in this scope
             if(pwm_pos_set[PWM_FAN1] == pwm_count_cooler && pwm_pos_set[PWM_FAN1] != COOLER_PWM_MASK) WRITE(FAN_PIN,0);
                                                                                      ^
    HAL.cpp:1062: error: 'COOLER_PWM_STEP' was not declared in this scope
         pwm_count_cooler += COOLER_PWM_STEP;
                             ^
    exit status 1
    operator '<' has no left operand

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.


    ????
  • Update: I gave up on Repetier Firmware and tried the SkyNet3d version of Marlin.... and it's working. Zmin and Z probe trigger together, and auto level is working. Going in for a test print now but i have my config in skynet3d set to pretty much the same as i did repetier. Perhaps it's something deeper than my config settings giving me an issue? If my prints a success i can link you my config files and such to help sniff out anything on your end..
  • You now need to define COOLER_PWM_SPEED 0 but I guess it is defined as empty from not updating the config tool when I added the new option.
Sign In or Register to comment.