Fail Safe Z stop



  • I have a coreXY machine with duetwifi electronics and dc42's mini probe.
    I have been experimenting with using a piezo disc for Z zeroing and bed levelling but I am concerned that if the controller fails or the touch to the bed is not recognised I could potentially break my bed glass, or the hot end mount.
    I do have a wired micro switch connected to the board and it works, indicated by the Z led going out when the switch is manually activated.

    My question.
    What do I need to put in the config file so that the firmware knows that the mini probe or the piezo is the primary for setting Z 0 and bed levelling and that the micro switch is a fail safe which should stop and ideally reverse the Z motion if activated.

    Any thoughts?



  • I don't know the specific setup for duetwifi but you're talking about having an active z min endstop whilst printing as a limit switch, in addition to z probe.



  • Most CNC machines are set up this way with 2 sets of stop (homing) switches. the first one is the soft limit that does the homing. The second one is a hard limit that shuts down the drives if it gets tripped. Having that type of setup in our printers would be a nice safety feature.



  • Theres a sort of parallel discussion going on in the piezo thread about reading the analogue value on the piezo board as a slowdown/stop trigger.



  • @appjaws. I've done something similar by using a spare endstop and M581 set to initiate an emergency stop. Actually I went a step further and fitted micro switches to all the axes maxima as well as a backup for Z min (set slightly higher than the "normal" Z probe). So if I do something stupid like try to sent a carriage beyond it's maximum range before I've home it, then the micro switch will catch it. I wired all the switches in series (all normally closed) so any one will trigger the emergency stop. HTH Ian



  • @timcurtis67:

    Most CNC machines are set up this way with 2 sets of stop (homing) switches. the first one is the soft limit that does the homing. The second one is a hard limit that shuts down the drives if it gets tripped. Having that type of setup in our printers would be a nice safety feature.

    Yes - can be done - see my post above.
    Ian



  • Well I thought I had cracked this.
    I adjusted the Z end stop to be a little higher than the Z0 trigger point and added the following into the config file.
    M581 Z S1 T2 C0 ; Set Z stop as fail safe for Z zeroing and run /sys/trigger2.g

    I then constructed a /sys/trigger2.g file with the following entries
    G91
    G1 Z5 F200

    Whenever I tripped the Z end stop the bed did move down 5mm - great

    I then did a home Z , the bed kept rising even though the end stop had triggered so I had to click the emergency stop button on the web interface. I then could not move the Z motors and had to switch off and on in order to release the pressure on the bed glass.

    Am I missing something or is what I am trying to do not possible.

    I just want the bed to move immediately by 5mm when the Z endstop is triggered regardless what the condition of the Z probe.



  • Maybe it doesn't like having effectively two Z stops. You could try wiring the Z end stop switch to spare E stop - say E0. Then use M581 E0 S1 T2 C0. HTH



  • Thanks deckingman, tried your suggestion, it works if I am moving the bed towards the hotend and if I trip the switch, the movement stops and then moves in the opposite direction by 5mm as instructed in the macro file.
    However, if I an homing Z, the switch has no effect and the bed keeps moving.
    It looks as if the homing cannot be interupted, I'll check with dc42.



  • @appjaws. It works for me. The only thing I'm doing different to you is that I simply use T0 to trigger an emergency stop rather than using T2 to trigger a file. I have limit switches on Z min and all the axes maxima and wired together in series and connect to E0, then I have another emergency stop button which is connected to E1. Pressing any of these switches during home immediately initiates an emergency stop. My two lines are M581 E0 S1 T0 C0 and M581 E1 S1 T0 C0.

    Do you have the latest firmware? In earlier versions, the triggers wouldn't work if a macro was being executed (and homing is affectively a macro) but DC fixed that in a later firmware version (can't remember which one). HTH

    Ian



  • Thanks Ian,
    I was trying to avoid an emergency shutdown and having a trigger file actioned was the simplest way to move the bed out of trouble and keep the machine live.
    I think dc42's fix only allowed an emergency stop to interrupt homing but I can't see why other codes shouldn't be allowed to interrupt the homing process, as long as it is obvious to the user that Z has not been homed.
    So for now it looks as if I'll have to use T0.

    Thanks for your help and suggestions
    Paul



  • Hi Paul,

    That's strange though. I'd have thought that if the interrupt works during homing then it ought to be able to run a file as well as execute an emergency shutdown command. We really need DC42 top step in here. Maybe he hasn't seen this thread and a new one might bring the matter to his attention? Ian

    PS I'm in the middle of a lot of printing at the moment but when I get chance, I'll change my M581 lines to see if T2 will work on my machine.


Log in to reply