Welcome to Our Community

Some features disabled for guests. Register Today.

Limit switches work, but homing does not

Discussion in 'Control Software' started by Giarc, Jan 5, 2022.

  1. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,994
    Likes Received:
    1,672
    I almost hate to ask about this because it is probably something simple. I currently have a CNC router that I built in 2016 which uses an Aduino Uno, DQ542MA drivers, and a 36 Volt power supply. I have never installed limit switches. Four years ago, I decided to try and mill a PCB for the GRBL limit switch filtering board from the grbl wiki.
    cd2eae48-eba7-11e6-9ec0-887fec41f2c7.jpg
    I purchased all the components, and then life got busy and I never got around to it. I am currently making major changes to the machine and ever since making my lathe with the Blackbox and extension limit switches, I have been sold on homing. So, I soldered everything up and hooked it up. I used some switches that I had already soldered wire to the NC and C terminals to test it out. Had these not already had wire on them, I would have went with NO and C. I must note that all this is being done with extra motors, two extra drivers, and a spare power supply I had available. I set the Control Software so that it is an Acro Laser with 2 axis to test my circuit. Since this was the first PCB I had ever milled I did not want to fry my current CNC control system since it has worked issue free for nearly 6 years.

    I downloaded Open Builds Control today on the computer I was using for testing. When I test the switches in the trouble shooting tab of control they function properly and change from green to red then back to green when released. When I jog and trigger a switch, they lock the "machine" like they should. Everything seems to work fine until I hit the "Home" button in Control. I expected the motors to turn, then I was going to trigger the switches, and Control would show the machine as homed. However, when I hit the "Home" button, nothing happens at all. The motors do not turn. Eventually I get an error telling me it could not find the switches.

    Here are my grbl settings:

    [15:13:23] [ $$ ] $0=10 ;Step pulse time, microseconds

    [15:13:23] [ $$ ] $1=255 ;Step idle delay, milliseconds

    [15:13:23] [ $$ ] $2=0 ;Step pulse invert, mask

    [15:13:23] [ $$ ] $3=1 ;Step direction invert, mask

    [15:13:23] [ $$ ] $4=1 ;Invert step enable pin, boolean

    [15:13:23] [ $$ ] $5=1 ;Invert limit pins, boolean

    [15:13:23] [ $$ ] $6=0 ;Invert probe pin, boolean

    [15:13:23] [ $$ ] $10=1 ;Status report options, mask

    [15:13:23] [ $$ ] $11=0.020 ;Junction deviation, millimeters

    [15:13:23] [ $$ ] $12=0.002 ;Arc tolerance, millimeters

    [15:13:23] [ $$ ] $13=0 ;Report in inches, boolean

    [15:13:23] [ $$ ] $20=0 ;Soft limits enable, boolean

    [15:13:23] [ $$ ] $21=1 ;Hard limits enable, boolean

    [15:13:23] [ $$ ] $22=1 ;Homing cycle enable, boolean

    [15:13:23] [ $$ ] $23=7 ;Homing direction invert, mask

    [15:13:23] [ $$ ] $24=100.000 ;Homing locate feed rate, mm/min

    [15:13:23] [ $$ ] $25=1000.000 ;Homing search seek rate, mm/min

    [15:13:23] [ $$ ] $26=250 ;Homing switch debounce delay, milliseconds

    [15:13:23] [ $$ ] $27=10.000 ;Homing switch pull-off distance, millimeters

    [15:13:23] [ $$ ] $30=1000 ;Maximum spindle speed, RPM

    [15:13:23] [ $$ ] $31=0 ;Minimum spindle speed, RPM

    [15:13:23] [ $$ ] $32=1 ;Laser-mode enable, boolean

    [15:13:23] [ $$ ] $100=57.143 ;X-axis steps per millimeter

    [15:13:23] [ $$ ] $101=57.143 ;Y-axis steps per millimeter

    [15:13:23] [ $$ ] $102=57.143 ;Z-axis steps per millimeter

    [15:13:23] [ $$ ] $110=5000.000 ;X-axis maximum rate, mm/min

    [15:13:23] [ $$ ] $111=5000.000 ;Y-axis maximum rate, mm/min

    [15:13:23] [ $$ ] $112=5000.000 ;Z-axis maximum rate, mm/min

    [15:13:23] [ $$ ] $120=500.000 ;X-axis acceleration, mm/sec^2

    [15:13:23] [ $$ ] $121=500.000 ;Y-axis acceleration, mm/sec^2

    [15:13:23] [ $$ ] $122=500.000 ;Z-axis acceleration, mm/sec^2

    [15:13:23] [ $$ ] $130=1300.000 ;X-axis maximum travel, millimeters

    [15:13:23] [ $$ ] $131=1300.000 ;Y-axis maximum travel, millimeters

    [15:13:23] [ $$ ] $132=70.000 ;Z-axis maximum travel, millimeters


    So far I am only into this for about $10 in optocouplers and resistors, and some time (but that was fun). I would not have bothered and just added more extension switches to the order I placed for additional V-slot last night, but my power supply is 36 Volts.
     
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,749
    Likes Received:
    4,264
    Did you remember to click yes when prompted to flash the 2-axes firmware?

    If not, Grbl is trying to home Z first, there is no Z motor, thus the perception that nothing is moving and of course it fails to hit the Z homing switch that doesnt exist too, explaining the error.

    Wizards and Tools > Firmware Flash tool > 2 Axes
     
    sharmstr likes this.
  3. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,994
    Likes Received:
    1,672
    I am pretty sure I did when I chose the acro setup.

    When I first tested, I was using 3 axis an three switches and I depressed the z first.

    I left the stuff at work and will not be able to check today.

    Thanks.
     
  4. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,994
    Likes Received:
    1,672
    Apparently when I chose Acro 1515 the Firmware flash tool reset the $5 value to disable. It now works.
     
    #4 Giarc, Jan 7, 2022
    Last edited: Jan 7, 2022
    Peter Van Der Walt likes this.
  5. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,994
    Likes Received:
    1,672
    I spoke too soon. It works in 2 axis laser mode. When I changed it back to a Lead, it only homes the X and Y.
     
  6. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,994
    Likes Received:
    1,672
    I solved it by setting it up as a LEAD 1010 then reflashed the firmware using the tools and wizards. Now it all works as expected.
     
  7. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,749
    Likes Received:
    4,264
    Yes, the 2-axes firmware only homes X and Y as its meant for a 2-axes machine. If you have a Z axis, you need the 3-axes firmware (Z, then XY homing)
     
  8. Giarc

    Giarc OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Jan 24, 2015
    Messages:
    2,994
    Likes Received:
    1,672
    Apparently I am horrible at milling pcbs as well. One of the traces pealed off so I had to go old school on it because I had to see this through. Don't ever give up! :thumbsup:

    If this wasn't a 36 V power supply, I would definitely have purchased more of the extension switches. Soooooo much easier.
    IMG_20220107_125336.jpg
     
    sharmstr likes this.
  9. JIMMY WEBER

    Builder

    Joined:
    Feb 12, 2023
    Messages:
    2
    Likes Received:
    0
    Peter,
    Is there a way to take the z axis out of the homing cycle?
     
  10. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,749
    Likes Received:
    4,264
    Yes!
    If you have a BlackBox 4X: Go to Wizards and Tools > Firmware flashing tool > Select 2-axes under Type and then Flash
    If you have a BlackBox X32: Go to Grbl Settings tab and set $44=3 and $45=0 , Save and Reset
     
  11. JIMMY WEBER

    Builder

    Joined:
    Feb 12, 2023
    Messages:
    2
    Likes Received:
    0
    i dont have a black box i have arduno Uno.
     
  12. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,749
    Likes Received:
    4,264
    Same instructions as BlackBox 4X
     

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