Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: catch22 on January 30, 2008, 09:32:06 PM

Title: Hooking up limits!
Post by: catch22 on January 30, 2008, 09:32:06 PM
Ive got my limits hooked up right now and they work great but they are hooked up through the ground and in the artsoft video he says the best way to have your limits wired a different way not using active low like I am. Can anyone tell me how to wire up my limits so that they are not active low. The limits im using are Normally open and normally closed with a ground. Any input would be greatly appreciated.

Thanks Mike
Title: Re: Hooking up limits!
Post by: Jeff_Birt on January 31, 2008, 09:14:04 AM
Quote
The limits im using are Normally open and normally closed with a ground.

How are your limits wired normally open AND normally closed?

It is best to have limit switches wired normally closed. This way when the switch is 'not pressed' you will have a complete electrical circuit. If you feed your switches with common (ground) then in this normal, 'not pressed' state, would provide a 'low' input to the computer. When the switch 'is pressed' the circuit will be open, there will be no electrical connection, and the input pin on your computer will go 'high' signifying the switch has been pressed. Wired this way your limit switch inputs on the computer will need to be set to active high.

The reason for wiring your switches normally closed is that it provides a basic level of supervision of the circuit. If a wire is cut or pulled loose the circuit will be open, just like it the limit was pressed, and your machine will stop before any harm is done.
Title: Re: Hooking up limits!
Post by: catch22 on January 31, 2008, 04:46:11 PM
Thanks Jeff,so really all I have to do then is change the connector from the normally open terminal and put it on the normally closed terminal and change the setting from active low to active high and then it should be right.And just leave the ground terminal alone,does this sound right?

Thanks again Mike
Title: Re: Hooking up limits!
Post by: BluePinnacle on February 01, 2008, 04:46:38 AM
Without seeing your wiring, I couldn't confirm that exactly - but my method uses a fairly strong current (30mA or so) to hold a relay shut in the isolating board, shorting a pin to LPT ground. Hitting a limit forces a switch open and allows the relay to power down and snap open for an "active high" input. This has three benefits for me - as mentioned, basic wiring supervision; faults are detected and flagged. Second, earth leakage is allowed for; there's quite a bit on my rig being both large and old. Third - the relays give me around 1500V worth of isolation going into the port, so bangs and flashes won't breed further down the line ;)
Title: Re: Hooking up limits!
Post by: olf20 on February 01, 2008, 07:00:25 AM
Hi all, hope everyone is doing well.
Mike attached is a diagram of the switch layout. This shows the switches wired in the NC mode.
Hope this helps!
olf20
Title: Re: Hooking up limits!
Post by: olf20 on February 01, 2008, 07:02:28 AM
Sorry, the file did not upload.
Here it is.
olf20
Title: Re: Hooking up limits!
Post by: jimpinder on February 01, 2008, 07:51:57 AM
Catch - yes you have the idea -

At the moment, all your limit switches are "off" - their contacts are open.(+5v to computer) Along comes the carriage - hits the limit and closes the switch.(0v to computer)

What you need to do is swap the terminals so that the limit switches are in fact "on" all the time (0v to computer) - along comes the carriage - hits the switch and opens it - 5v to computer. YOU NEEDN'T WORRY ABOUT THE 5 V - THE WIRING IS INTERNAL - THE LACK OF 0V READS AS 5V. Change the Active Low box to a cross and away you go.

It is fail safe, in that, if any wires come loose, the internal pull ups pull the signal to 5v and signal a limit is hit - you know it hasn't hit a limit - but it gives you a clue where to look.

The other advantage is, you can connect all the limit switches in series, and just use one wire as input to the computer - saving inputs (although this doesn't work if you are also using the limits as homing switches)
Title: Re: Hooking up limits!
Post by: Hood on February 01, 2008, 08:27:23 AM

The other advantage is, you can connect all the limit switches in series, and just use one wire as input to the computer - saving inputs (although this doesn't work if you are also using the limits as homing switches)

Jim, it does work if you want to use the limits as home switches and on one pin. The reason is that when you do a Home move Mach just treats the switches as home switches, once homing is complete then they magically become limit switches again as far as Mach is concerned :)
 Hood
Title: Re: Hooking up limits!
Post by: jimpinder on February 01, 2008, 09:39:50 AM
Yes - I'm sorry - and I assume since it does each axis seperately, it doesn't need to differentiate between the switches.

I had a bit of difficulty with mine, and needed to press reset after homing. They weren't in a good position anyway, so I've abandoned them for the time being. I particularly need something on the cross slide if I am going to use it for drilling, to get the drill(s) properly centered. I was thinking of some optical sensor with a slotted plate so I can stop at a choice of positions.
Title: Re: Hooking up limits!
Post by: greg on February 01, 2008, 10:00:09 AM
hood, do you mean i can just leave all my limits on 1 pin & not have my homing on 3 other switches & it will still home? if this is so then i have 3 extra pins! thanks greg
Title: Re: Hooking up limits!
Post by: Hood on February 01, 2008, 02:40:13 PM
 If you have homing switches that are not at the extremes of your axis travel then you will need to asign them as Home switches on another pin. However if your home switches are to be at the extreme of the axis travel then you can just use your limit switches as home switches by setting them up to the same pin as your limits are set to, see pic as an example.
Hood
Title: Re: Hooking up limits!
Post by: catch22 on February 02, 2008, 09:32:34 PM
Thanks alot everyone for all the information I really do appreciate it I have been sick but as soon as I feel up to it I will be resetting up the limits.

Thanks Mike
Title: Re: Hooking up limits!
Post by: greg on February 03, 2008, 09:55:08 AM
thanks hood!! now i have 3 extra pins yo use for something? greg
Title: Re: Hooking up limits!
Post by: Hood on February 03, 2008, 12:48:34 PM
I am sure you wont have a problem finding something to use hem for :)

Hood