Don't know where to find an answer to this: I'm using an Arduino Uno and GRBL with my CNC router and would like to finally connect an emergency stop switch. Is there any way to connect the switch to the Uno or do I need to have the switch in line with the power supply? If the switch is on the power supply line and pushed to stop everything will I have to start again from scratch and re-home?
I have mine on my power supply line. I like having all power killed...just in case. Unfortunately, when I hit it, I have to restart the job. Fortunately, when I do hit it, it is for a good reason and usually at the beginning of the job so it is no big deal. An example of such an occurrence is that I like to set my xyz zero in the middle of the part in my CAM set up but I forget to. Then, I zero everything in the middle and hit start. The machine immediately makes a beeline for the lower left corner because that is the default so I hit the e-stop because it is quick and easy. Here is a wiring set up for the Xpro which could be translated to the arduino. It is different then mine, but probably is a better way. Refer to pins, A0,A1,A2 on the GRBL wiki.
Thanks for the diagram Giarc, still wondering if anybody out there has switched it through the Uno board?
Watch this video. Its for the xpro, but it explains the reason why you want to kill power to the motors AND reset the arduino (in your case). They use a normally open / normally closed button and wire the normally open between the psu and the motors and the normally closed side to the reset pin on the arduino. I bought this switch to do this, but haven't hooked it up yet. Maybe I'll do that today and report back if you'd like. https://www.amazon.com/gp/product/B00NTT91Y0
I'm a little confused. You said to wire the normally open side between the psu and the motors and the normally closed side to the reset pin on the arduino. Should the normally open side be connected to the reset pin and the normally closed side be connected between CNC xPro V3 board and 24VDC PSU?
That certainly makes more sense. The ooznest wiring diagram shows this: https://ooznest.co.uk/wp-content/uploads/2018/11/Emergency-Stop-Wiring-Diagram.pdf But I did notice that their e button had the markings on the switch opposite of mine. I received the correct gauge wire yesterday so I'll wire it up today and report back.
I found the above article while I was digging around for more info on e-stops with an Arduino Uno. I have an e-stop similar to the one in the Ooznest video with both NO and NC sides, so I'm going to wire the NO side to the A0 pin on the Uno (reset/abort) and a ground pin. The NC side will get connected to the power supply feeding the stepper drivers and a ground. My cnc is tucked away at the moment but as soon as I can get to it I will let you know if it works.
I wired the e stop as I described above and it worked fine. I will attach the wiring diagram for my cnc in case it might help someone having trouble.