Welcome to Our Community

Some features disabled for guests. Register Today.

Unable to Start or Finish Homing Cycle

Discussion in 'Control Software' started by Jim Janiak, May 25, 2020.

  1. Jim Janiak

    Builder

    Joined:
    Jul 28, 2019
    Messages:
    5
    Likes Received:
    0
    I just finished building an ACRO1010 laser engraver using an Arduino Mega 2560 controller running Grbl 1.1g. The engraver works great, except I have never been able to use the Homing Cycle.

    When homing is turned on, the machine boots in alarm state, as it should. I enter $X to reset and then $H to home. The machine just sits there - no movement with either axis. After about a minute or so it goes back into alarm state. Since the machine is trying to home, I can't use '?' to see what is happening. If I disable the homing cycle the machine works fine, I just manually home it.

    I'm using limit switches supplied with the kit in a "normally open" mode. I have confirmed they are working correctly with a continuity tester on the Arduino pins. I'm using Pin10 for X-Axis and 11 for Y-Axis. I also disabled Z-Axis homing in config.h, by commenting out the homing definitions and replacing them with:
    #define HOMING_CYCLE_0 (1<<X_AXIS)
    #define HOMING_CYCLE_1 (1<<Y_AXIS)
    #define N_HOMING_LOCATE_CYCLE 1

    I'm new to laser engraving and Grbl, so I'm not sure how I can see what is happening to determine where I messed up. A log of a recent attempt is below along with my configuration settings.

    Any suggestions or ideas are greatly appreciated!

    Thanks,

    Jim

    In the following the machine does not move after the $H commands.

    Waiting for connection...
    Waiting for connection...
    Grbl 1.1g ['$' for help]
    [MSG:'$H'|'$X' to unlock]
    error:9
    [MSG:Caution: Unlocked]
    ok
    ?
    <Idle|MPos:0.000,0.000,0.000|Bf:35,254|FS:0,0|Pn:XYZR|WCO:0.000,0.000,0.000>
    ok
    $i
    [VER:1.1g.20180813.Mega:ACRO1010]
    [OPT:VNM+,35,255]
    ok
    ?
    <Idle|MPos:0.000,0.000,0.000|Bf:35,254|FS:0,0|Pn:XYZR|Ov:100,100,100>
    ok
    $H
    ?
    ALARM:8
    ok
    Grbl 1.1g ['$' for help]
    [MSG:'$H'|'$X' to unlock]
    [MSG:Caution: Unlocked]
    ok
    ?
    <Idle|MPos:0.000,0.000,-10.000|Bf:35,254|FS:0,0|Pn:XYZR|WCO:0.000,0.000,0.000>
    ok
    $$
    $0=5
    $1=255
    $2=0
    $3=0
    $4=1
    $5=1
    $6=0
    $10=3
    $11=0.005
    $12=0.002
    $13=0
    $20=0
    $21=0
    $22=1
    $23=1
    $24=250.000
    $25=50.000
    $26=25
    $27=10.000
    $30=1000
    $31=0
    $32=1
    $100=230.620
    $101=230.620
    $102=500.000
    $110=3000.000
    $111=3000.000
    $112=500.000
    $120=15.000
    $121=15.000
    $122=10.000
    $130=914.000
    $131=914.000
    $132=500.000
    ok
    $X
    ok
    $H
    ALARM:8
    ok
    Grbl 1.1g ['$' for help]
    [MSG:'$H'|'$X' to unlock]
    [MSG:Caution: Unlocked]
    ok
    ?
    <Idle|MPos:0.000,0.000,-10.000|Bf:35,254|FS:0,0|Pn:XYZR|WCO:0.000,0.000,0.000>
    ok
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    13,992
    Likes Received:
    4,107
    Use our Flashing tool under wizards and tools to setup the 2 axes firmware
    We did all the compile options for you in there
    Also use our profile in Grbl settings then
     
  3. Jim Janiak

    Builder

    Joined:
    Jul 28, 2019
    Messages:
    5
    Likes Received:
    0
    Hi Peter I looked at that option. I'm using an Arduino Mega 3560, the wizard only allows me to select an Arduino Uno or Nano. Do you know which one I should select?

    Thanks,

    Jim
     
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    13,992
    Likes Received:
    4,107
    Oh in that case neither.

    Also, most Grbl 2560 builds arent as stable (at the Atmega328 is the more used version) , check the source where you got it from for issues related to homing then, you'll have to discuss this with the Firmware vendor/developer then
     
  5. Jim Janiak

    Builder

    Joined:
    Jul 28, 2019
    Messages:
    5
    Likes Received:
    0
    Thanks for the insight about the 2560. I was not aware of the stability issues. I may look into an Atmega328 as an alternative.
     
  6. Jim Janiak

    Builder

    Joined:
    Jul 28, 2019
    Messages:
    5
    Likes Received:
    0
    I found an UNO from an old project. Reflashed it with an empty program to clear it out, then used the Flash Wizard to flash it with the 2 axis option. I'm making progress, but it's still not Homing right. Now when I home, the x-axis will move to the left (-x direction) for 5 mm, pause, then move left for 5mm. Next the y-axis will move closer (-y direction) for 5 mm, pause, move 5mm closer, then stop. It appears the home cycle completes at this point. I have the gantry in the middle and it does not contact any limit switches. If I change the pull off distance from $27=5 to $27=20. It moves in 20mm increments as described above.

    I have the x-limit switch in pin 9 and the y-limit in pin 10 of the UNO. My current config is below. Any ideas on what is causing this and how to fix it are greatly appreciated.

    [21:06:48] [ $$ ] ok
    [21:06:48] [ $I ] [VER:1.1g.20181112:ACRO1010]
    [21:06:48] [ $I ] [OPT:V,15,128]
    [21:06:48] [ $I ] ok
    [21:06:59] [ $$ ] $0=5 ;Step pulse time, microseconds
    [21:06:59] [ $$ ] $1=255 ;Step idle delay, milliseconds
    [21:06:59] [ $$ ] $2=0 ;Step pulse invert, mask
    [21:06:59] [ $$ ] $3=0 ;Step direction invert, mask
    [21:06:59] [ $$ ] $4=1 ;Invert step enable pin, boolean
    [21:06:59] [ $$ ] $5=0 ;Invert limit pins, boolean
    [21:06:59] [ $$ ] $6=0 ;Invert probe pin, boolean
    [21:06:59] [ $$ ] $10=2 ;Status report options, mask
    [21:06:59] [ $$ ] $11=0.010 ;Junction deviation, millimeters
    [21:06:59] [ $$ ] $12=0.002 ;Arc tolerance, millimeters
    [21:06:59] [ $$ ] $13=0 ;Report in inches, boolean
    [21:06:59] [ $$ ] $20=0 ;Soft limits enable, boolean
    [21:06:59] [ $$ ] $21=0 ;Hard limits enable, boolean
    [21:06:59] [ $$ ] $22=1 ;Homing cycle enable, boolean
    [21:06:59] [ $$ ] $23=0 ;Homing direction invert, mask
    [21:06:59] [ $$ ] $24=500.000 ;Homing locate feed rate, mm/min
    [21:06:59] [ $$ ] $25=200.000 ;Homing search seek rate, mm/min
    [21:06:59] [ $$ ] $26=250 ;Homing switch debounce delay, milliseconds
    [21:06:59] [ $$ ] $27=5.000 ;Homing switch pull-off distance, millimeters
    [21:06:59] [ $$ ] $30=1000 ;Maximum spindle speed, RPM
    [21:06:59] [ $$ ] $31=0 ;Minimum spindle speed, RPM
    [21:06:59] [ $$ ] $32=1 ;Laser-mode enable, boolean
    [21:06:59] [ $$ ] $100=230.620 ;X-axis steps per millimeter
    [21:06:59] [ $$ ] $101=230.620 ;Y-axis steps per millimeter
    [21:06:59] [ $$ ] $102=250.000 ;Z-axis steps per millimeter
    [21:06:59] [ $$ ] $110=3000.000 ;X-axis maximum rate, mm/min
    [21:06:59] [ $$ ] $111=3000.000 ;Y-axis maximum rate, mm/min
    [21:06:59] [ $$ ] $112=500.000 ;Z-axis maximum rate, mm/min
    [21:06:59] [ $$ ] $120=10.000 ;X-axis acceleration, mm/sec^2
    [21:06:59] [ $$ ] $121=10.000 ;Y-axis acceleration, mm/sec^2
    [21:06:59] [ $$ ] $122=10.000 ;Z-axis acceleration, mm/sec^2
    [21:06:59] [ $$ ] $130=914.000 ;X-axis maximum travel, millimeters
    [21:06:59] [ $$ ] $131=914.000 ;Y-axis maximum travel, millimeters
    [21:06:59] [ $$ ] $132=200.000 ;Z-axis maximum travel, millimeters
    [21:06:59] [ $$ ] ok
     
  7. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    13,992
    Likes Received:
    4,107
    Check the troubleshooting tab to see if they are "off" before the move (should show green, if they are red invert $5)
     
  8. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    746
    Yeah, make sure the NC/NO issue is correct first.

    But it's usually a noise issue. Connect a 0.1uF/100nF ceramic cap between each of your switch pins and ground, and make sure your limit cables are either shielded wire or inside the grounded machine frame extrusion.

    That said, I have had grbl just arbitrarily seek its previous "home" and pretend there are totally limit switches at an arbitrary 0,0. Not sure what that behaviour is, I can only assume it's some kind of failsafe buried in the grbl code that I haven't seen yet. It did go away once I had the caps on there though, I think the stepper cables are noisy.
     
  9. Jim Janiak

    Builder

    Joined:
    Jul 28, 2019
    Messages:
    5
    Likes Received:
    0
    Hi Rob - Thanks for the advice on the noise issue. That solved the problem! After I verified in the troubleshooting tab the swithes were set correctly, I added the 0.0uF cap filters. That cleared up the issue immediately. I had the limit switch wire running inside the vrail for both x and y axis.

    I was surprised it was noise. I thought that the noise would trigger 'false positives' with the switches. I did not see anything like that in the troubleshooting tab.

    Regardless, it's now working and I appreicate your and Peter's help in resolivng my problem. I was going crazy trying to figure it out.

    Jim
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice