PDA

View Full Version : How to Wire Limit switches on Xylotex board.



Ch4iS
18th October 2008, 01:48 PM
I have been trying to find how you wire up the limit switches.

I have all the wiring setup so I have 2 wires comming from each limit switch straight to the controller board.

But how do I wire them up?



I only have NO (normally open) switches which are already installed.


http://www.xylotex.com/FAQ.htm

I see how this can work, so do I just hook them (NO's) up parallel? does it matter if I join them all together? What is with the resistor?



{EDIT}

Found a few of my own questions :P

The resistor protects the parallel port from the excess current that it would receive were the pin directly hot wired to the power supply

Just wanted to know would this still work with Normally open switches?

rodm
18th October 2008, 02:55 PM
Yes no problem with normally open switches.
In the settings Ports and Pins/Input Signal set as active low. Link them in series if you are using NO. If you are going to link all your limit switches together like this then it must be in series (meaning from one switch to the next) then just hook up to one pin 10 to 13 or 15 on the Xylotex board and the ground and echo the pin setting in the Mach3.

Ch4iS
18th October 2008, 04:30 PM
Yes no problem with normally open switches.
In the settings Ports and Pins/Input Signal set as active low. Link them in series if you are using NO. If you are going to link all your limit switches together like this then it must be in series (meaning from one switch to the next) then just hook up to one pin 10 to 13 or 15 on the Xylotex board and the ground and echo the pin setting in the Mach3.


Do I need a resistor then?

also should I wire up the Z axis seperately so it can find the absolute height?

rodm
18th October 2008, 06:11 PM
Yes to resistor or you might zap the parallel port and usually the motherboard.

Up to you how you want to configure your limit switches - there is a lot of variations

Greolt
18th October 2008, 06:13 PM
If they are NO you will need to have them in parallel when sharing an input. Series if NC.

Unlike a BoB, Xylotex has no buffer or filter circuitry on the spare outputs and inputs. They just give you connectors to wire directly to the LPT.

You will probably need a 10k resistor between the 5v and the pin you are using.

Also if you strike noise issues you may need a capacitor, but worry about that if needed.

Greg

rodm
18th October 2008, 06:23 PM
Hi Greg,
I hate this electronics mumbo jumbo. Help me here if I can be helped. :rolleyes:
He wants to wire all his switches to one port. I thought if they were strung in a line one after the other (series) then that would be the way to do it. Any one switch closes and it goes low. Is it actually parallel and not series I am describing?

Ch4iS
18th October 2008, 06:40 PM
If they are NO you will need to have them in parallel when sharing an input. Series if NC.

Unlike a BoB, Xylotex has no buffer or filter circuitry on the spare outputs and inputs. They just give you connectors to wire directly to the LPT.

You will probably need a 10k resistor between the 5v and the pin you are using.

Also if you strike noise issues you may need a capacitor, but worry about that if needed.

Greg

Yea, Motor cables are shielded and I had thought of that and if it is a problem I will have to unwind everything :( but if it has to be done it has to be done.

Ill solder everything up and see how I go, I should have a 10k lying around.

Greolt
18th October 2008, 06:46 PM
Yes series would be the normal way to do it but with NC switches. Any one switch opens and breaks the circuit.

BlueRay has NO, so they will need to be in parallel. Any one switch closes and makes the circuit.

A picture is worth a thousand words. :) Click on them, they are animated.

Greg

rodm
18th October 2008, 08:32 PM
Hi Greg,
Love the animation :2tsup: and have set this as a favourite so I can refer to it.

Where I got confused was with the NO and NC and for some unkown reason I had this reversed in my mind. blue^ray's thread had not been responded to so I chipped in but next time I will lay doggo and let somebody who understands this mumbo jumbo answer.

Sorry if I have caused any grief for you blue^ray. :-

Back out to the shed where the only person I can harm is myself and the dog. :)

Ch4iS
18th October 2008, 10:02 PM
Sorry if I have caused any grief for you Chris. :-




na its fine, I know you and electronics :D



Just soldered everything up and I can only get the multimeter to read one limit switch (the smallest length of wire) so I cant tell if all are working fine.

The mutimeter has a battery sign so I just think the battery is running low.

Tomorrow ill just hook up a circuit with a led and see if the led lights insead of using the multimeter.


BTW reason for the new thread is that anyone looking for the same can search and find this thread.

rodm
18th October 2008, 10:15 PM
Hi Chris,
Yes I do the same and post things that I think are interesting to other builders. If it is a novice it could be interesting and shows them a little of how it is done and anyone else can just skip past it.

Eventually this site will become a good reference for new machine builders.

Got half a day in the shed today so pleased to see some progress on my build. :2tsup:

niall
19th October 2008, 12:41 AM
not sure about your one but in some of the ones Ive worked on the xy and z are wired as such that the are seen one after the other. I hope this helps.

appiwood
19th October 2008, 08:38 AM
Hello Blueray

Sorry to butt in late, if you are using micro switches that have NO Comm NC contacts it can be better to use the NC contacts, the theory is that if you break a wire with a NO circuit nothing happens, if your limits are wired as NC, then if the circuit is broken by either the switch opening, or the machine chewing up a wire it all stops, just a nother layer of protection.

Ed

Greolt
19th October 2008, 09:58 AM
......if you are using micro switches that have NO Comm NC contacts it can be better to use the NC contacts, the theory is that if you break a wire with a NO circuit nothing happens, if your limits are wired as NC, then if the circuit is broken by either the switch opening, or the machine chewing up a wire it all stops, just a nother layer of protection.

Yes there is logic there, but BlueRay already has his switches installed which only have NO conections.

What is better protection is to make good connections and secure wiring properly to avoid it getting chewed. :)

Just to clear up what seems to be confusion over the purpose of the resistor.

It is not to limit the current through the switch but actually increases it. By a very small amount. About half a miliamp.

The inputs that you connect to are by default at 5v or "high" when nothing is connected.

What the limit switch does is short the pin to ground and so bring it "low"

The current the pin has to supply when that happens is limited by circuitry inside your computer.

The "pullup" resistor in this case just helps the pin to stay at 5v until you bring it low (with the switch) and
in effect helping it, a very small amount, to resist electrical "noise"

Greg

Ch4iS
19th October 2008, 01:56 PM
Hello Blueray

Sorry to butt in late, if you are using micro switches that have NO Comm NC contacts it can be better to use the NC contacts, the theory is that if you break a wire with a NO circuit nothing happens, if your limits are wired as NC, then if the circuit is broken by either the switch opening, or the machine chewing up a wire it all stops, just a nother layer of protection.

Ed


Yes I understood that when I was reading the xylotex guide. I will remember this in my next build.

* I only have 269 oz-in motors (bad choice at the time)
* I have a belt driven table

Worst case is I would guess it starts jumping teeth or stall after bending the limit switches arm. It has already done this (jumped teeth) but this was before I tightened the belts.

chrisb691
19th October 2008, 05:24 PM
Yes I understood that when I was reading the xylotex guide. I will remember this in my next build.

* I only have 269 oz-in motors (bad choice at the time)
* I have a belt driven table

Worst case is I would guess it starts jumping teeth or stall after bending the limit switches arm. It has already done this (jumped teeth) but this was before I tightened the belts.
Hate to be the one to say it, but I suggest that you replace you switches before you go any further. In terms of the total cost, they can't be much in time or money. But you should be going for the 'fail safe' option.

Just my tuppence worth.

Ch4iS
19th October 2008, 06:02 PM
Hate to be the one to say it, but I suggest that you replace you switches before you go any further. In terms of the total cost, they can't be much in time or money. But you should be going for the 'fail safe' option.

Just my tuppence worth.

I have a mostly steel design, I would think the belts would snap before any damage is done to the overall construction of my cnc router. And the belts are pretty strong so they would just jump teeth if the motor did not stall.



BTW after so much ???? I finally get it working,

First the speaker wire I was using for the limit switches did not make a good contact with the crimped connections so I had to redo them all, but just after cutting up the end connections :(

Then just a little trouble setting them up in the software but once I saw my error I fixed it.

BTW the Z AXIS has both a open and closed switch, I wired it to be normally closed but it keeps getting triggered, I cannot get a movement out of the steppers.

The wires run together with the shielded stepper motor cables. If I disable Z axis it works fine, both X's and Y switches work like a dream.

Is it just because I am running it with the stepper motor cables or would it be something else?

Greolt
19th October 2008, 06:29 PM
It is probably worth saying at the outset that none of the three machines I have or any of the others I have
had a hand in building have a limit switch on the Z axis

So you have the Z limit wired between an input pin and gnd. All on it's own. The other limits are on another input.

When you say it keeps getting triggered do you mean it is locked out all the time? Or does it run for a time and with random triggering?

If it is the first, maybe you just have it hooked up wrong. If random, then it is probably "noise".

There are a few things you can try to get around the noise.

First to try is simply get some separation between the switch wire and the stepper power cable. See if that makes a difference.

Second you could try a 0.1uf capacitor across the switch. At the Xylotex end of the wire.

Sheilded cable for the switch could help. Shield connected to ground one end only.

Poor connections will always make things susceptible to any noise issues.

Greg

WillyInBris
19th October 2008, 09:03 PM
I had nothing but problems with my switches NC with the xylotex and tried most things and gave up have just about finished up adding a C11 BOB tonight yes Rod I have been slack I have had it for what two months lol and hope this will work but I am mainly using it for a speed control for my spindle so no loss if it doesn't but it should as its full optocoupled (spellin).

How would the young people say it these days

yay man its fully optoed on da Home's and limis and spindles up in 0 to 2400 in 30 secs fully sic man :doh:

Ch4iS
19th October 2008, 09:58 PM
I had nothing but problems with my switches NC with the xylotex and tried most things and gave up have just about finished up adding a C11 BOB tonight yes Rod I have been slack I have had it for what two months lol and hope this will work but I am mainly using it for a speed control for my spindle so no loss if it doesn't but it should as its full optocoupled (spellin).

How would the young people say it these days

yay man its fully optoed on da Home's and limis and spindles up in 0 to 2400 in 30 secs fully sic man :doh:

Try the NO if you ever do, work a treat. Way I see it is there is no way to trigger the NO with noise on the motors.

Its more of a lebonese who would say that :D