connecting EStop switch

Results 1 to 12 of 12

Thread: connecting EStop switch

  1. #1
    Member
    Join Date
    Mar 2011
    Location
    USA
    Posts
    313
    Downloads
    0
    Uploads
    0

    Default connecting EStop switch

    If I want to implement an emergency stop button can I just connect a NO switch between ground and the RST or some other pin on the arduino?
    I am using an UNO with a proto screw shield on top.
    I would like to be able to hit this big red button to stop all motion and stop the spindle if something is going wrong but I would also like to be able
    to resume when I fix the issue. Don't really want it to kill power as it takes a while for the power supply to actually stop after unplugging it, same for the VFD so a
    software STOP would be best.
    Your thoughts are all appreciated.
    Thanks

    Similar Threads:


  2. #2
    Member
    Join Date
    Dec 2015
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default Re: connecting EStop switch

    I ran and programmed NC machines back in the day.
    One of the things that i think they did right was clearly differentiate between Hold, Stop, and E-Stop. In a similar vein, the distinction of Limits and Hard Limits existed.
    But those were the Big Boys on big machines.
    Still, if this is E-stop, I want mine to KILL things. Hold switch is nice. But if I have the big red button, I want it to stop things so that no amount of software, transients, or general confusion can make it do anything except stop. As a result, E-Stop is on the mains. Dead. Done.
    Yes, the re-start can be lengthy. Yes, it can be a hassle. I agree and sympathize. Been there many times.
    If you're after a pause or hold switch, there's lots of options.



  3. #3
    Member
    Join Date
    Mar 2011
    Location
    USA
    Posts
    313
    Downloads
    0
    Uploads
    0

    Default Re: connecting EStop switch

    the problem I have with killing power is that even if I unplug my power supply it takes a little bit to actually stop. Same for the VFD.
    I have a breaker on the wall where the main power is coming from that is easy to get to for an all out KILL THE POWER situation so maybe
    I am looking more for a HOLD or PAUSE function.
    How do I implement that in ARDUINO/GRBL?
    Thanks



  4. #4
    Member
    Join Date
    Mar 2015
    Location
    Netherlands
    Posts
    221
    Downloads
    0
    Uploads
    0

    Default Re: connecting EStop switch

    GRBL supports a hold function on Pin A1 and a resume on Pin A2. This will stop all motions i a controlled way without losing steps and resumes where i was left.

    The abort pin, Pin A0, immediately stops all movements, performs a soft reset and positions are lost.


    Read this discussion for more information: https://github.com/gnea/grbl/issues/171



  5. #5
    Member
    Join Date
    Mar 2011
    Location
    USA
    Posts
    313
    Downloads
    0
    Uploads
    0

    Default Re: connecting EStop switch

    Does the hold function work with just a momentary contact switch or does the switch need to be held closed to work?



  6. #6
    Member
    Join Date
    Mar 2015
    Location
    Netherlands
    Posts
    221
    Downloads
    0
    Uploads
    0

    Default Re: connecting EStop switch

    The Hold contact should be a momentary contact.



  7. #7
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    1906
    Downloads
    2
    Uploads
    0

    Default Re: connecting EStop switch

    Hold will not stop the spindle!!!

    What you need to do is kill power AND reset Grbl AND signal the interface to stop streaming. All of these things need to happen. Many streaming programs are poorly written and will just sit there happily waiting for the next ok response from Grbl. Once they get that its off to the races again.

    The reset of Grbl will immediately stop any motion as it will interrupt the step/direction signals and PWM.

    The killing of power insures everything is really off.

    The signal to the interface is to break and halt sending of any more commands.

    As for reset you need to close the circuit between the reset pin and ground which will keep the Arduino in a reset loop until the circuit is opened.. For an e-stop you should use a latching switch



  8. #8
    Member
    Join Date
    Mar 2011
    Location
    USA
    Posts
    313
    Downloads
    0
    Uploads
    0

    Default Re: connecting EStop switch

    Quote Originally Posted by 109jb View Post
    Hold will not stop the spindle!!!

    What you need to do is kill power AND reset Grbl AND signal the interface to stop streaming. All of these things need to happen. Many streaming programs are poorly written and will just sit there happily waiting for the next ok response from Grbl. Once they get that its off to the races again.

    The reset of Grbl will immediately stop any motion as it will interrupt the step/direction signals and PWM.

    The killing of power insures everything is really off.

    The signal to the interface is to break and halt sending of any more commands.

    As for reset you need to close the circuit between the reset pin and ground which will keep the Arduino in a reset loop until the circuit is opened.. For an e-stop you should use a latching switch


    So will a latching switch on the RST port to ground stop all motion and the spindle if it is being controlled by GRBL?
    Then another momentary button for pause and another one for resume?



  9. #9
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    1906
    Downloads
    2
    Uploads
    0

    Default Re: connecting EStop switch

    Quote Originally Posted by tkms002 View Post
    So will a latching switch on the RST port to ground stop all motion and the spindle if it is being controlled by GRBL?
    Then another momentary button for pause and another one for resume?
    In general, a latching switch on the Arduino reset pin (Not the Grbl defined soft reset pin) will put the arduino into a perpetual reset condition and this will stop everything including the spindle. However there are some caveats.

    So to explain, on reset all of the arduino pins are initially set as inputs and then set to be input or output as appropriate within the Grbl boot-up. Because of this there is a possibility of a pin "floating" to a higher level for a brief time during boot up (from the time the latching switch is opened to when Grbl finishes booting). You could install a weak external pull-down resistor on all of the output pins to prevent this float. That is the first thing.

    Second, it depends on how your systems are set up. The pins will go low on reset and if that is the state for "off" then all is good. However, for example, if you have it set up so that coolant is turned on by a low pin signal and off by a high pin signal then a reset of just the Arduino will turn on the coolant rather than turn it off. If you insure that pin low is always off then an Arduino reset will turn everything off. The config.h file is where you set the pin states for on/off and I believe all of the defaults settings are pin low = off.

    As far as the hold/resume buttons a momentary contact switch is OK. I personally don't use these switches, so can't say for sure but I prefer NC switches as they have proven more noise immune. I believe that the detection routine for these switches is only looking for a pin state change, so either a NC or NO switch should work.



  10. #10
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    1906
    Downloads
    2
    Uploads
    0

    Default Re: connecting EStop switch

    I wanted to add that the above goes for the Arduino 328p like the Uno has. Other processors running grbl may be different and you should be able to test those by simply probing the pins during a hard reset.



  11. #11
    Member
    Join Date
    Mar 2011
    Location
    USA
    Posts
    313
    Downloads
    0
    Uploads
    0

    Default Re: connecting EStop switch

    Quote Originally Posted by 109jb View Post
    I wanted to add that the above goes for the Arduino 328p like the Uno has. Other processors running grbl may be different and you should be able to test those by simply probing the pins during a hard reset.


    Probing the pins??



  12. #12
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    1906
    Downloads
    2
    Uploads
    0

    Default Re: connecting EStop switch

    Quote Originally Posted by tkms002 View Post
    Probing the pins??
    Meaning using a meter to check the pin state during reset. Connect a meter between the pin and ground and press and hold the reset button on whatever microprocessor you are using. If while holding the reset the pins are at 0V then it works like an UNO and pins are low during reset. If it reads 5v (3.3V on some MCU's) then the pins are high during reset.

    If you don't have a meter you can use an LED. LED on means pin high, off means pin low.



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

connecting EStop switch

connecting EStop switch