Welcome to Our Community

Some features disabled for guests. Register Today.

Need help with homing using blackbox x32

Discussion in 'Controller Boards' started by Kevin123, Jul 19, 2024.

  1. Kevin123

    Kevin123 New
    Builder

    Joined:
    May 12, 2021
    Messages:
    10
    Likes Received:
    2
    I built a custom machine that is using the blackbox X32.

    I updated the firmware to the latest.

    I am running this flash:
    2/3 axis CNC/Laser: Dual y with door switch (My machine requires a door switch)

    My machine is running 3 axis, z axis and x axis and y axis setup as rotary. (set up like a lathe)

    I have a limit switch on each of the extents of the axis, wired in series (Normally closed 2 limit switches per axis)

    In the setup I have turned on the toggle switch "limit switches installed"

    In the settup I have enabled hard limits $21

    Because I do not use a y axis limit switch, I have a jumper wire in the y axis limit on blackbox so it thinks there is no limit switch that is being triggered.

    In settings I have $44=4 home z first and $45=1 Home x axis only (not x/y at same time)

    I can jog all axis just fine on the control

    If i press the limit switch it will trigger the alarm and in trouble shooting tab every limit switch is on the correct axis. Essentially, all 4 of my limit switches work just fine.

    Here is my current problem:
    When i home the machine it homes z first (correct) the limit switch is triggered the machine backs off, all seems fine. Then it trys to home the x axis and the stepper doesnt move, just buzzes. And again, I can jog all axis just fine on the controller. So I trigger the x axis limit with my finger and get this alarm:

    Alarm: 6 - Homing fail. Reset during active homing cycle. [$H]

    Here are my settings at the moment:

    $0=10.0 ; Step pulse time, microseconds
    $1=255 ; Step idle delay, milliseconds
    $2=0 ; Step pulse invert, mask
    $3=5 ; Step direction invert, mask
    $4=0 ; Invert step enable pin, boolean
    $5=0 ; Invert limit pins, boolean/mask
    $6=1 ; Invert probe pin, boolean
    $8=0 ; Ganged axes direction invert as bitfield
    $9=1 ; PWM Spindle as bitfield where setting bit 0 enables the rest
    $10=511 ; Status report options, mask
    $11=0.010 ; Junction deviation, millimeters
    $12=0.002 ; Arc tolerance, millimeters
    $13=0 ; Report in inches, boolean
    $14=0 ; Limit pins invert, mask
    $15=0 ; Coolant pins invert, mask
    $16=0 ; Spindle pins invert, mask
    $17=0 ; Control pins pullup disable, mask
    $18=0 ; Limit pins pullup disable, mask
    $19=0 ; Probe pin pullup disable, boolean
    $20=0 ; Soft limits enable, boolean
    $21=1 ; Hard limits enable, boolean
    $22=1 ; Homing cycle enable, boolean (Grbl) / mask (GrblHAL)
    $23=4 ; Homing direction invert, mask
    $24=25.0 ; Homing locate feed rate, mm/min
    $25=500.0 ; Homing search seek rate, mm/min
    $26=250 ; Homing switch debounce delay, milliseconds
    $27=1.000 ; Homing switch pull-off distance, millimeters
    $28=0.100 ; G73 retract distance, in mm
    $29=0.0 ; Step pulse delay (ms)
    $30=1000.000 ; Maximum spindle speed, RPM
    $31=0.000 ; Minimum spindle speed, RPM
    $32=0 ; Laser-mode enable, boolean
    $33=5000.0 ; Spindle PWM frequency
    $34=0.0 ; Spindle off Value
    $35=0.0 ; Spindle min value
    $36=100.0 ; Spindle max value
    $37=0 ; Stepper deenergize mask
    $39=1 ; Enable printable realtime command characters, boolean
    $40=0 ; Apply soft limits for jog commands, boolean
    $41=0 ; Parking cycle as bitfield where setting bit 0 enables the rest
    $42=2 ; Parking axis
    $43=1 ; Homing passes
    $44=4 ; Homing cycle 1
    $45=1 ; Homing cycle 2
    $46=0 ; Homing cycle 3
    $56=5.0 ; Parking pull-out distance in mm
    $57=100.0 ; Parking pull-out rate in mm/min
    $58=-5.0 ; Parking target in mm
    $59=500.0 ; Parking fast rate in mm/min
    $60=0 ; Restore overrides
    $61=0 ; Safety door options as bitfield
    $62=0 ; Sleep Enable
    $63=3 ; Feed Hold Actions
    $64=0 ; Force Init Alarm
    $65=0 ; Require homing sequence to be executed at startup
    $70=7 ; Network Services
    $73=1 ; Wifi Mode
    $74= ; Wifi network SSID
    $75= ; Wifi network PSK
    $100=250.00000 ; X-axis steps per millimeter
    $101=250.00000 ; Y-axis steps per millimeter
    $102=250.00000 ; Z-axis steps per millimeter
    $110=500.000 ; X-axis maximum rate, mm/min
    $111=500.000 ; Y-axis maximum rate, mm/min
    $112=500.000 ; Z-axis maximum rate, mm/min
    $120=10.000 ; X-axis acceleration, mm/sec^2
    $121=10.000 ; Y-axis acceleration, mm/sec^2
    $122=10.000 ; Z-axis acceleration, mm/sec^2
    $130=200.000 ; X-axis maximum travel, millimeters
    $131=200.000 ; Y-axis maximum travel, millimeters
    $132=200.000 ; Z-axis maximum travel, millimeters
    $320=grblHAL ; Hostname, max: 64
    $322=192.168.5.1 ; IP Address
    $323=192.168.5.1 ; Gateway
    $324=255.255.255.0 ; Netmask
    $325=23 ; Telnet port
    $326=80 ; HTTP port
    $327=81 ; Websocket port
    $337= ; WiFi Access Point (AP) BSSID
    $341=0 ; Tool Change Mode
    $342=30.0 ; Tool Change probing distance
    $343=25.0 ; Tool Change Locate Feed rate
    $344=200.0 ; Tool Change Search Seek rate
    $345=200.0 ; Tool Change Probe Pull Off rate
    $346=1 ; Restore position after M6 as boolean
    $370=4 ; Invert I/O Port Inputs (mask)
    $384=0 ; Disable G92 Persistence
    $392=4.0 ; Spindle on delay in s
    $393=1.0 ; Coolant on delay in s
    $396=30 ; WebUI timeout in minutes
    $397=0 ; WebUI auto report interval in milliseconds
    $398=100 ; Planner buffer blocks
    $481=0 ; Autoreport interval in ms
    $484=1 ; Unlock required after E-Stop as boolean
    $486=0 ; Unlock required after E-Stop as boolean
    $650=0 ; File systems options as bitfield

    Can someone please help me figure out what is going on?
     
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,701
    Likes Received:
    4,249
    Have you calibrated steps per mm? Those seem like defaults? Incorrect steps per mm can cause stalling if the mechanicals aren't able to move at the now-incorrect speeds derived from incorrect steps per mm

    Also needs tuning to prevent stalling


    Whining kind of buzz is a stall as expected from the settings, rattling kind of buzz is something else, so just please elaborate / or post video for review if its not whining or you are unsure
     
  3. Kevin123

    Kevin123 New
    Builder

    Joined:
    May 12, 2021
    Messages:
    10
    Likes Received:
    2
    I changed all those settings.
    X axis still does not move during a homing and triggering the x limit switch by hand still gives Alarm 6 - Homing fail. Reset during active homing cycle. [$H]
     
  4. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,701
    Likes Received:
    4,249
    Along with new Grbl Settings backup (youdid reset so changed values take effect?

    Pics of switch wiring too. Reset while in motion can be a v+ to GND short too
     
  5. Kevin123

    Kevin123 New
    Builder

    Joined:
    May 12, 2021
    Messages:
    10
    Likes Received:
    2
    All switches are wired NC and common.
    I will do a command to move the x axis and manually trigger the x limit to see if it gives alarm 6 later.
     

    Attached Files:

  6. Kevin123

    Kevin123 New
    Builder

    Joined:
    May 12, 2021
    Messages:
    10
    Likes Received:
    2
    I commanded line G0 x.5 and hit the limit switch while the x axis was in motion, got a hard limit alarm as expected. Worked fine.
    Everything works as expected except homing sequence.
    Here is a video. The z axis homes fine, then it moves to x axis and the stepper doesnt move, just buzzes. Might have to turn volume up to hear it. When I trigger the x limit switch I get alarm 6.

     
  7. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,701
    Likes Received:
    4,249
    Doesn't show enough of wiring (controller side and close up of wiring at switches) to be of help for us to review for you.

    Reset when pressing switch sounds like a V+ to GND short. Happy to review but need quality pictures, taken at angles that make sense to review wiring from, in detail
     
  8. Misterg

    Misterg Veteran
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 27, 2022
    Messages:
    340
    Likes Received:
    264
    Erm... In the video, the axis that moves first is the X axis of the machine. The axis that you trigger the limit switch for with your finger is the Z axis of the machine.
     
  9. Kevin123

    Kevin123 New
    Builder

    Joined:
    May 12, 2021
    Messages:
    10
    Likes Received:
    2
    I have it set up like a lathe. This is done on purpose. I know it might not make a lot of sense, but this is in fact how I wanted it set up. I can always change it later if I want.
     

    Attached Files:

  10. Kevin123

    Kevin123 New
    Builder

    Joined:
    May 12, 2021
    Messages:
    10
    Likes Received:
    2
    I'll take some stuff apart and get close up pics of the wiring. I assume you want close up of the switch and the limit wiring at the blackbox, so thats what ill upload.
    You keep saying a v+ to GND short, you mean the limits seem like they are connected that way on the blackbox instead of SIG? They are not, they are wired to SIG. Ill get a pic of that when I can get up to my shop.
     
  11. Misterg

    Misterg Veteran
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 27, 2022
    Messages:
    340
    Likes Received:
    264
    Ahh - apologies.

    Going by the error message, I concur with Peter that the switch is shorting something out.
     
  12. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,701
    Likes Received:
    4,249
    If not directly through bad wiring, could still be unintentional through a short via the frame or something. A crimp terminal touching a screw to the frame or something like that.

    That's all based on you're report of

    From the we assume that if pressing the switch causes a reboot, its something electrical going bad. Brownout. Usually caused by a V+ to GND short as warned against in docs:blackbox-x32:connect-micro-limit [OpenBuilds Documentation] under the Important Warning section. Often from a wrongly wired switch.
     
  13. Kevin123

    Kevin123 New
    Builder

    Joined:
    May 12, 2021
    Messages:
    10
    Likes Received:
    2
    Question, why would the switch only short during a homing sequence and at no other time? Is that possible? I'll be posting updated pics shortly.
     
  14. Kevin123

    Kevin123 New
    Builder

    Joined:
    May 12, 2021
    Messages:
    10
    Likes Received:
    2
    Okay, well thanks for all the help everyone so far! I much appreciate it! I'll post some new pics ASAP
     
  15. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,701
    Likes Received:
    4,249
    Pics might not help as much if you are sure you wired it correctly, so do go other the machine and check for other shorts. Multimeter can help too. Something causes the unexpected reset/reboot.
     
  16. Kevin123

    Kevin123 New
    Builder

    Joined:
    May 12, 2021
    Messages:
    10
    Likes Received:
    2
    Before I post an update on this issue, how do I add door switch to the machine profile "4 axes CNC/Laser (Y2 Motor as A, Limit shared for A)? I currently have my Y axis setup as rotary. This profile would work better for me but I need the door open switch to work.

    Update on the homing issue:
    I spent all day looking at wiring, looking at it again then triple checking it.
    I put a multimeter to the switches, all good, steady 4.6V across all 4 switches.
    Used a scope, all seemed fine, nothing crazy.
    Switched the axis wiring from z to x and x to z, same problem different axis.
    Tried flashing to every single machine profile, nothing.
    Finally I just re wired and soldered a new 4 pin connector to the x axis stepper motor.
    Everything worked after that!!
    I have no idea what exactly the problem was, I could jog fine, switches worked perfect, homing always failed. I have no idea what it was. I do know it was frustrating as hell!! I guess the x axis stepper wiring particularly the 4 pin was causing the issue. It looked fine. But a new one did the trick.

    Thanks guys for taking the time to try to help me, its very much appreciated.
    If anyone can tell me how to add the door switch to the other profile, that would be great!
     
    David the swarfer likes this.
  17. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    14,701
    Likes Received:
    4,249
    Kevin123 likes this.
  18. Kevin123

    Kevin123 New
    Builder

    Joined:
    May 12, 2021
    Messages:
    10
    Likes Received:
    2
    Peter Van Der Walt likes this.

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