584,865 active members*
4,722 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > E-Stop Hard Wire and to Software?
Page 1 of 2 12
Results 1 to 20 of 21
  1. #1
    Join Date
    Mar 2004
    Posts
    500

    E-Stop Hard Wire and to Software?

    Hi all,
    I was just wondering how you would wire the E-Stop to the PS Line and let the software know that it has been triggered. I was thinking of just manually connecting an extra limit switch to the E-Stop Button but I don't know if that would be very good. It will probably be 12 or 24 Volts coming in, so I don't think that this can be just put into parallel port input. I have heard about this on some other threads aswell.
    Thank for the help.
    I really appreciate it.

  2. #2
    Join Date
    Mar 2003
    Posts
    4826
    You can use an auxilary circuit on a second set of contacts on the Estop switch. This way, you don't need to use the higher voltage circuit on the main set of contacts.
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  3. #3
    Join Date
    Jul 2004
    Posts
    104
    Get yourself a relay, I tapped a 5vdc main from my PC power supply across the relay for my e-stop which routes back to the PC with the logic 5vdc = good to go, 0vdc = estop. I used a 4 pole double throw relay I purchased at Grainger. When I hit my estop "everything" goes to zero volts, mill, all the electronics, the servos, the stepper, the whole works. I did use a solid state relay for the mill motor though as its 2hp and 240vac.

    The 4 pole relay is rated for 120vac, I brought the 120vac mains in across that and then to the power supplies for the servos and the big stepper. Theres also a big green power on button and a power on green light wired in the mix. Plus for added safety, a on/off button for the mill motor. I did not want my computer in total control over turning the spindal on/off. This way I can turn it off mechanically and not worry when I'm changing an end mill or working around it.

  4. #4
    Join Date
    Mar 2004
    Posts
    500
    Ok. So basically you have a main E-Stop switch that may be only five volts, and when you hit this switch the computer knows and sets the relay off so everything turns off?
    And for HuFlungDung's answer, what kind of auxilary circuit are you implying?
    Thanks for all of the help guys.
    This is great.
    I really appreciate it.

  5. #5
    Join Date
    Sep 2003
    Posts
    226
    I think what CNCPlastic means is he has one relay that has 4 sets of switches in it; one switches low voltage and tells the computer to E-Stop, and the others are higher voltage which kill the router, servos etc. That way when he hits one e-stop switch it activates one relay which controls 4 separate circuits.

  6. #6
    Join Date
    Jul 2004
    Posts
    104
    Sol's got it right! The low volt (5vdc) switch on the relay is only 1 of 4 e.g. 4 pole double throw (4 switches). The 5vdc switch also trips the solid state relay on/off so its doing double duty. Also I had to put a resistor between the 5vdc and pin 15 which I'm using for my e-stop to keep the printer port from sucking down too much juice. The whole mess took quite a while to figure out.

  7. #7
    Join Date
    Apr 2004
    Posts
    169
    +5 IN---------- N/O-----------------------------
    | | |
    | | |
    |----------RST----------------- | |
    | | |
    __ Coil EStop
    Diode ^ | |
    | | |
    GND---10 Ohm------------------------------------
    If the bad asci art makes any sense this is one way to wire a relay with other Normally open contacts in series with the other power supplies you want to control and a Normally closed contact to the Pc Estop. The switches are normally open . At power on you need to press the Reset switch briefly to get the relay to latch on. Hitting the estop switch shorts the relay coil turning it off and killing the power. The 10 Ohm resistor prevents the power supply being shorted and the diode kills inductive spikes from the coil.

  8. #8
    Join Date
    Apr 2004
    Posts
    169
    Should have previewed that one. I'll post a better diagram shortly

  9. #9
    Join Date
    Apr 2004
    Posts
    169
    This should be better
    Attached Thumbnails Attached Thumbnails estop.jpg  

  10. #10
    Join Date
    Oct 2003
    Posts
    927
    Quote Originally Posted by sol
    That way when he hits one e-stop switch it activates one relay which controls 4 separate circuits.
    Do you mean that when he hits the e-stop it DE-activates the relay?
    Could you run through the events that occur when the mechanical e-stop is "hit"?
    I'm still confused ...
    John

  11. #11
    Join Date
    Sep 2003
    Posts
    226
    Yes, perhaps CNCPlastic can clear this up...but it is a double throw relay so the design could be either way (coil activated or deactivated) by hitting the e-stop.
    It would be safer for the relay's coil to be on while everything is running and for the e-stop switch to cut the coil off. Perhaps that is the way it is...?

  12. #12
    Join Date
    Apr 2004
    Posts
    169
    My description is a bit confusing. The relay needs to be activated ( by pressing the reset switch ) before power is supplied and the machine comes out of e stop. Hitting Estop deactivates the relay and cuts power.

  13. #13
    Join Date
    Mar 2004
    Posts
    500
    What about this? The Relay could control all of the switches out to the motors. I don't know too much about electronics, but this is just a brainwave.
    Attached Thumbnails Attached Thumbnails E-Stop Relay Switch.bmp  

  14. #14
    Join Date
    Jul 2004
    Posts
    104
    Lets break this down into simpler steps...I'm an electrical wiring noob so I'm going to talk in noob language. Someone that actually knows what they are doing helped me figure this all out.

    The Relay - Forget about it being a double throw for a minute, I only use the double throw on 1 of the 4 switches anyway and I'll explain that later. This relay has 4 on/off switches, just like a household light switch. Each switch turns something on and off.

    How does this relay work...well theres an electrical coil in the relay, if you put power to this relay coil it goes boing and flips the four switches on. So long as there is power to relay's coil it will hold the switches in the ON position. If you disconnect power to the relay's coil it goes boing and and all the switches turn off.

    Here's how its wired... I use a big red button to turn it off and a big green button to turn it on. Both buttons are momentary buttons e.g. momentary switches. The red button is normally closed, the green button is normally open, lets use a lightbulb to talk about what that means.

    If you connect a lightbulb to the green power on momentary switch, the lightbulb would turn on when you pushed the button, and would stay on so long as you held the button in, as soon as you let go the lightbulb would turn off. Normally open means normally off remember.

    The red button works just the opposite, if you connected a lightbulb to the red momentary switch, because it is normally closed e.g. normally on, the light bulb would remain on until you pushed the button, it would then turn off, e.g. the switch opens, no contact, but as soon as you let go of the button, the light would come back on because its normally closed/on.

    Are you with me so far? Okay...

    When I push the green power on button it closes the contacts and sends 5vdc to the relay's coil, this turns all 4 switches ON and the mill comes to life...but wait...as soon as I let go of the green button it will cut the power to the coil's relay and everything will turn off right? Don't ask me if I wired it this way at first...okay I did. The solution is quite simple, I push the green button which turns all 4 switches ON correct? Well guess where one of those 4 switches goes? If you guessed to the relay's coil you win a bonus prize. So pushing the green button powers the coil's relay, flips on all the switches and in so doing brings a second power source to the relay's coil to hold the switches in the ON position. I can thus let go of the green button and this second power source will keep the relay going.

    The red button...5vdc comes from my PC's power supply, to the green button and on to the relay's coil + terminal. The relay's coil - terminal passes through the red button on its way to ground. This hopefully is becoming clear now, since the red button is normally closed/on, the relay's coil will continue to function and everything will stay powered up, but if you push the red button it opens the switch, breaking the connection to the relay's coil thus all 4 switches turn off including the one that was keeping the relay's coil ON. Now we are back where we started, one would have to push the green button again to reactivate the relay's coil and turn the switches back on again.

    Some people buy a more fancy red button than I did. You can buy a red E-stop button that stays in once you push it. Thus you have to consciously pull the button back out before you can turn the machine on again. I guess this is so you don't accidently hit the green button and turn the machine on after a crash or whatever. Some red buttons even lock, you have to twist and pull them back out. I decided to save a few bucks and keep it simple with the spring loaded red button.

    What about the double pole part? I use that for my e-stop. I have e-stop configured in Mach 2 as active Low. Warning, it can get confusing to think about this too much. lol

    What does that mean to Mach 2 active low? That means that if the pin its monitoring for e-stop (pin 15 in my case) goes to zero vdc there is a problem, I have pushed the big red button and Mach 2 puts the breaks on.

    So I have 3 wires to connect to the relay switch, I have a pin 15 wire which goes back to Mach 2, I have a 5vdc wire coming from the PC and a ground wire coming from the PC. The relay switch has three terminals, its a double throw which means if you throw the switch to the left, it connects the center terminal to the left terminal, if you throw the switch to the right it connects the center terminal to the right terminal.

    I connect the pin 15 wire to the center terminal. I connect the ground wire to the left terminal and the 5vdc wire to the right terminal. When the relay is off, not powered, it connects the pin 15 e-stop wire to the ground wire on the left terminal. When I press the green button and power up the relay, the switch flips over to the right terminal and now the pin 15 e-stop wire is connected to the 5vdc wire on the right terminal.

    The don't call them left, center, right terminals, they probably call them something like normally closed, common, normally open but its easier to visuallize left, center, right. The main point is the center terminal is always connected to either ground zero vdc or 5vdc depending on whether the relay is on or off.

    So...if I press the green button everthing powers up, Mach 2 gets 5vdc back via the pin 15 e-stop wire and since I have told it that e-stop is active low, and its not low, its 5vdc Mach 2 goes okay we are ready to rock and roll. Now if I press the red e-stop button, the relay turns off the mill and cnc gear, and also sends a zero vdc signal down the pin 15 e-stop wire, Mach 2 goes okay e-stop is active low, it went low, and Mach 2 halts.

    What if my PC loses power??? The mill and geckos are blazing away but the PC gives up the ghost for some reason, maybe I spill a big gulp sode on it or something. SINCE...I'm powering the relay from a 5vdc source off the PC's power supply...yep the relay flips off and everything shuts down. Thats why I wired it this way.

    Oh gawd yes there's more. Of the 3 remaining switches on the relay, #2 sends 120vac to my stepper power supply. #3 and #4 send 120vac to my servo power supply. I double up on the servo power suppy because I'm running 2 servo's off that power supply, the can draw up to 20amps peak but the contacts on the relay are only rated for 15amps. So I just spread the load across 2 of the relay's switches. The relay is rated for up to 240vac.

    The relay coil...pay special attention to the coil rating. The coil requires a minimum voltage, there are lots of relays out there and this varies a lot. I wanted to use a 5vdc power source from my PC to power the relay so I had to buy a relay with a coil rating that would work on 5vdc. Mine is rated 5vdc to 24vdc. So you have one rating for the relay coil, and a second for the relay switches.

    There's still more. If you are running a spindal motor of any size, I was told that turning these on/off can generate a whopper of an electromagnetic pulse which the average PC doesn't much appreciate getting whacked with. So I used a solid state relay to turn my spindal motor on/off. This relay is rated for 240vac as I wired my mill for 240vac (220vac 240vac same thing). The solid state relay's coil is no surprise rated at 5vdc so I use the same PC 5vdc to turn that relay on/off, switch #1 on the relay, so not only does it send 5vdc to down the pin 15 e-stop wire, it also sends 5vdc when turned on to the spindal motor's solid state relay to turn that on. Why a solid state? Solid state relays do something mechanical relays generally don't, they can turn the motor on/off at the zero volt cross over thus avoiding generating the em pulse.

    The last piece, this 5vdc that comes off the relay heading towards the solid state relay to power on the spindal motor...I have a mechanical on/off switch wired into that. So when I press the green power on button the spindal doesn't just take off and start spinning, I have to manually reach over and turn the spindal on and off. Some guys have this automated via Mach 2, I decided I did not want to rely on Intel, Microsoft, or even Mach to for my safety, I still have all my limbs and I plan to keep it that way. I'll turn the spindal on/off manually thank you.

    Well I hope this helps.

  15. #15
    Join Date
    Oct 2003
    Posts
    927
    yes! that helps!
    One thing...the 5Vdc that is sent to pin15 for Mach2 to have knowledge of the high or low status... you have a resistor on its way to pin 15 to prevent the current from damaging the parallel port.... Is this a standard resistance based on the 5Vdc coming from the PC? suppose you supply pin 15 with another 5Vdc from a..oh lets say a wallwart of different amp output.....then the resistance to control the current to pin 15(in your case) must be changed accordingly....I surmise?

    As I understand,,,(yah right)... the pins of the parallel port can only absorb 2.5ma....is this correct? Is the resistor in this case a pull-up? or a sinker?
    or not at all?

    Thanks
    John

  16. #16
    Join Date
    Mar 2004
    Posts
    500
    Oh, thank you sooooo much. That clarified things soooo much. That took a lot of effort. Where did you get the relay from? How much is something like that worth if you don't mind me asking?
    Thank you for the help.
    I really appreciate it. :rainfro:

  17. #17
    Join Date
    Mar 2004
    Posts
    500
    May I ask, how long it took you to wire all of this stuff up?
    Thanks.

  18. #18
    Join Date
    Jul 2004
    Posts
    104
    Its hard to say, I took my time and did as neat a job of it as I could. I also did not use a breakout board. I bet it took me a good 16 hours over several days to get the job done but keep in mind I did not have it all figured out before I started. If I had to do another today knowing what I know I could probably finish it off in 4-5. There were quite a number of components just to lay out and install in the two electrical enclosures, just that took some time never mind the wiring. 4 fans, two power supplies, 3 Geckos', two relays, 3 switches and a power on light, several buss bars, about 10 cables to bring in, its no small task thats for sure.

  19. #19
    Join Date
    Jul 2004
    Posts
    104
    See this is one of those questions a noob can't answer, I just used the value resistor that was recommended to me. Sorry I can't help on this one.

    Quote Originally Posted by Bloy2004
    yes! that helps!
    One thing...the 5Vdc that is sent to pin15 for Mach2 to have knowledge of the high or low status... you have a resistor on its way to pin 15 to prevent the current from damaging the parallel port.... Is this a standard resistance based on the 5Vdc coming from the PC? suppose you supply pin 15 with another 5Vdc from a..oh lets say a wallwart of different amp output.....then the resistance to control the current to pin 15(in your case) must be changed accordingly....I surmise?

    As I understand,,,(yah right)... the pins of the parallel port can only absorb 2.5ma....is this correct? Is the resistor in this case a pull-up? or a sinker?
    or not at all?

    Thanks
    John

  20. #20
    Join Date
    Jul 2004
    Posts
    104
    I purchased both my relays and all my fancy "big machine" like buttons and switches from Grainger. www.grainger.com, its an industrial supply company, they have a massive catelog. Don't come crying to me if you bank account starts to implode after you get the catelog. lol I don't think any one item was more than $20 to $30 even the relays, note for the 4 pole mechanical relay you also need the fancy socket it plugs into. Its pretty cheap, its when you add up all those things that you get to feeling like gawd this cnc project is a money pit!

    Here's a tip though...I bought two electrical enclosures, one for the big amp stuff and a second for the gecko's. I think I spent about $100 on the fancy nema enclosure for the big amp components, I spent FAR less on the second enclosure, I used a 40 circuit household breaker box from Lowes home improvement, it work super and had the knock outs for the 10 cables.

    Quote Originally Posted by Sanghera
    Oh, thank you sooooo much. That clarified things soooo much. That took a lot of effort. Where did you get the relay from? How much is something like that worth if you don't mind me asking?
    Thank you for the help.
    I really appreciate it. :rainfro:

Page 1 of 2 12

Posting Permissions

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