Machsupport Forum

Mach Discussion => FAQs => Topic started by: gpraceman on June 13, 2010, 06:26:47 PM

Title: Wiring Limit, Home and E-Stop Switches
Post by: gpraceman on June 13, 2010, 06:26:47 PM
I just bought my first CNC machine, a Zenbot 1216, and was wondering about how I should setup limit, home and E-Stop switches, since the machine did not come with any.  I found the diagram below which seemed like a good starting point.

From doing some initial setup with Mach3 and watching the tutorials, I know that one switch per axis can also be a home switch.  Someone on the CNC Zone forum indicated that I should just wire all 6 switches up in series and Mach3 would be able to sort out the home position.  I would think that those home switches would need to be separate parallel port inputs.

Also, can I get the +5V off of one of the other parallel port pins?

(http://pminmo.com/PMinMOwiki/images/1/17/Switch_wiring_3.png)
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on June 15, 2010, 03:05:20 AM
I think that the usual system, at least it is what I have done, is to wire both X Axis switches in series - both Y Axis switches in series and both Z Axis switches in series etc.(for normally closed contact switches). Each pair of switches then has its own input to the parallel port.

For homing - Mach homes in a set direction, and order of axis, until it finds the switch which will act as both 'home' and 'limit' for that axis. Mach then homes the next axis the same way etc etc.

The 5Volt needs to come from your 4 axis interface or breakout board, not from the parallel port.

Hope this helps,

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on February 28, 2016, 11:03:17 AM
Hi I am new to cnc ing I am having trouble with my limit switches. I have the e stop all wired and works fine. To test my wiring for 1 limit I used 18 gauge sheilded 4 wire. I run 1 wire from pin 13 to the limit switch  (nc) and returned with a wire to the 5v pin. I set mach3 it shows correctly and works as it is supposed to.  As soon as I plug in the power supply for the stepper motors it falsely trips the switch. What am I doing wrong or what is the problem.  Can anyone help me.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: stirling on February 28, 2016, 11:12:05 AM
what did you connect the shield to?
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on February 28, 2016, 11:21:08 AM
I didn't hook it to anything. I tried hooking the ground on the panel the the ground on the limit switch without any provale
what did you connect the shield to?
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on February 28, 2016, 11:26:11 AM
Connect the shield to Earth at the controller end only and see if that helps.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on February 28, 2016, 11:31:51 AM
When you are say this do you mean the ground pin on the circuit board
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on February 28, 2016, 11:59:31 AM
At your controller end you should have a single point Earth connection - that is where all wiring shields should be connected.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on February 28, 2016, 04:25:59 PM
I had a chance to seek out to the shop and ground the sheiling seems to work for now I just have the leave it on to see if I get a false stop. The only issue I have now is that when I move my y to - the A axis turns but not in the t movement.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 01, 2016, 07:43:52 PM
Hi is it best to wire all the limit switches in series including the home switches. By this I mean just using 2 wires so all the switches are all connected in 1 circuit with only using 1 pin.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 02, 2016, 02:35:05 AM
Hi is it best to wire all the limit switches in series including the home switches. By this I mean just using 2 wires so all the switches are all connected in 1 circuit with only using 1 pin.

If you are using a 'slaved axis' then you need the switches for one of these axes on a separate input in order to allow for squaring the gantry on homing.
Your home switches can be your limit switches if you wish.
Other than that yes they can all be connected in series and connected to one input pin but use shielded cable with the shield only connected to Earth at the controller end.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 02, 2016, 04:42:31 AM
Can I run the limit switch wiring in the cable track along side the motor wires
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 02, 2016, 05:31:46 AM
Yes, it should be no problem (I do that without issue) but if you are using a VFD then do not run the spindle supply feed in the same track.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 02, 2016, 05:38:17 AM
Thanks if I have anymore questions I will get back to you you are the only one that I get a straight answer from.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 02, 2016, 05:46:16 AM
Thanks if I have anymore questions I will get back to you you are the only one that I get a straight answer from.

That's probably because I don't know as much as the others.  ;D

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 02, 2016, 05:53:12 AM
Stupid is as stupid does. I'm just learning I've got the idea but I'm just don't want to have to redo it. The guy who built the cnc didn't put them on and messed up a lot of things so I had to rebuild a lot of parts. I should have built it myself.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 04, 2016, 06:39:12 AM
The limit switches are working fine but now my machine is acting weird. The dro s don't work on the z. The x axis automatically inverts and the y axis automatically moves by itself. Do you have any ideas why and all my axis need to be recalibrated
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 04, 2016, 06:53:52 AM
I really have no idea what you have done but suspect you have accidentally created a GND or Earth loop with your wiring changes. Perhaps re-track your work and see if you can spot something.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 04, 2016, 07:24:10 AM
Another thought…

During the setting-up of your limit switches you may have accidentally created a corrupt .xml (easy to do if you are using an external motion controller).

There may be an easier way but when something similar happened to me I had go to the Mach3 / xmlbackups folder and load an earlier .xml (rename it to <my profile>.xml and copy it into the Mach3 folder) and then re-make the required changes to my settings. It worked just fine second time around.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 04, 2016, 04:13:27 PM
I don't think I made a ground loop it's all pretty much straight forward all is series
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 04, 2016, 04:14:24 PM
Can you please send me a link to the xml backup folder
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 05, 2016, 01:51:40 AM
Typically...

C:/Mach3/xmlbackups

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 08, 2016, 06:51:03 AM
How do I  choose which 1
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 08, 2016, 08:08:38 AM
Go back to a time when you believe Mach3 was working correctly.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Bendair on March 08, 2016, 10:03:33 PM
Just got my new 6040 CNC. Setting up Mach3. I have all the limits for the table set up. But when I go to do my first g code load the Gcode is at the bottom left but my table works space is offset ? I am lost tried to play around with it and used YouTube but nothing could tell me how to adjust. Anyone want to help a newbie out. Thanks again. BRNDAIR
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 10, 2016, 05:26:00 AM
Hi Tweaking.  I had my computer tech try to load a xml file with some improvement but it's now rite. So tonight he is going to take mach3 off and reinstall it.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 11, 2016, 05:30:24 AM
Ok we tried the xlm and it brought back the z dro but the z- won't work . Yesterday we reloaded mach3 and my z works fine. But now when I  ref all home the z works fine but the y axis when it hits the home button it slowly starts to move in the + direction. So I hit the stop. When I go to do it again it has inverted from low to high so I have to go and change the imputed signal to get it going the right way. The x axis is the same.  Where do I go next.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 11, 2016, 05:44:40 AM
Post your .xml file ( the current one from you Mach3 folder ) copy and rename it to something unique (kharrison.xml) then use the Reply and Additional Options tabs to attach it.
We will then be able to check your settings and perhaps be able to suggest the way forward.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 11, 2016, 09:22:50 PM
Ok great. Here it is.

Thanks
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 12, 2016, 01:50:49 AM
I will look at it in more detail but from initial observation...

In Config. / Motor Tuning you need to set Steps Per Unit, Velocity and Acceleration for your Z axis.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 12, 2016, 05:34:34 AM
My axis are all configured. I have already tuned them.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 12, 2016, 05:40:25 AM
My z is working fine now. My y when I home and it hits the limit it automatically changes polarity
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 12, 2016, 05:56:02 AM
Could you have posted the wrong .xml ?

This is certainly not right for the Z axis config.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 12, 2016, 05:57:44 AM
I reloaded mach3
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 12, 2016, 06:10:24 AM
I reloaded mach3

Perhaps re-post your .xml file (the one from your Mach3 folder) now that you have reloaded Mach3. Copy and rename it to kharrison2.xml for posting.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 12, 2016, 09:09:48 PM
I just spent 4 hours but I got it all working really good
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on March 13, 2016, 01:34:37 AM
Excellent  :)

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 13, 2016, 10:36:36 AM
The only thing I don't know is how to calibrate the a axis. If I should be using inches or degrees of turn and how to set that up
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 19, 2016, 07:03:03 AM
I went to call the a axis I put a level in the chuck.  I entered 1 and it turned 3y0 degrees.  Is this right
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on March 27, 2016, 08:18:44 PM
Hi I got the cnc up and running. I used my bobcad v26 to write a G code so I can face mill my cnc bed to flatten it. When I go to run the g code in mach3 it wants to go away up in z t5 or better for no reason. It is supposed to start cutting at -.001. Can anyone tell me what I got set wrong or what is happening
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on April 13, 2016, 06:47:08 AM
Hi Tweaky I am having trouble with the limit switches  the light are not lighting up but I am still getting a limit switch warNing what do think could be the problem. Kevin
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: Tweakie.CNC on April 13, 2016, 10:59:04 AM
Not much help really but the only thing I can think of is that your wiring is incorrect or else you have the Active High / Low set incorrectly.

Tweakie.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on April 13, 2016, 04:53:59 PM
It was working correctly but now it isn't
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: tmccub840840@gmail.com on May 25, 2016, 07:03:09 PM
I managed to get my limit switches wired up this morning before work in series with e-stop and had a successful test. I have a limit located on the y+, x+, and z+ end of machine coordinates. Does this sound correct? I have Y axis and A axis slaved and im wondering how accurately the home switches have to be mounted, if my switches are offset from eachother will mach recognize that after squaring or should i try to set switches as accurately as possible? They are adjustable length with a roller and can be rotatable?
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on May 25, 2016, 08:24:29 PM
I was having false limit trips. When you hook them all in series there is a lose it current so the limits trip. I have 6 limit switches in total. I hooked the y +&- to 1 pin and 5v  
X+&- to another and 5v
Z +&- to another pin and 5v. I then set my debounce to 1000 and see if it trips .mine was good after that.are you running a smooth stepper too? Let me know how you make out there mite have to be a couple more setting you mite have to change.I four a month  with mine before we figured out what was wrong.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: tmccub840840@gmail.com on May 25, 2016, 08:49:10 PM
To the best of my knowledge you dont need a switch on the z axis - which you will set when you zero the router bit, i ordered six as well and was going to do the same thing but after doing some research i chose to do it this way, i think we both probably need a 5v pull up resistor so to prevent current loss, I only did a quick test but it worked each time. Did you use 18-2 security wire with sheilding and ground the end to the control box.  I am running with a cheapo bob stv-3 with a parallel port converted with ul-100 usb conversion. It has 5inputs 5 axis and a relay for spindle. I have used sheilded wire on everything and grounded one end though. I need more time in a daymy friend.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: tmccub840840@gmail.com on May 25, 2016, 08:51:06 PM
Im using my extra limit switch on my slaved axis so i can use it to ref all and to keep the machine square.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on May 25, 2016, 08:57:32 PM
I didn't need any pull ups but if I had any problems I would have put them on. With pull up keep a close eye on them to see if the heat up after running them for a while. They mite or mite be fine.good luck Kevin.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: tmccub840840@gmail.com on May 25, 2016, 09:01:58 PM
Thanks Kevin i will keep that in mind
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: andysilvester on May 26, 2016, 03:18:07 PM
Spent a good few hours trying to figure my limit switches out on the 'Inputs' page and have ended-up here for help!
I've fitted two switches on each axis (X2 mill) - 'Home' (normally open) are wired individually to my Uniport V2 on inputs 10,11 and 12, and work perfectly for homing and -- limits. The problem's with the ++ limit switches which are all wired in series (normally closed) to input 13. Now, on the Uniport v2 only inputs 10-12 have +5v provided internally, so I've jumpered +5v to the input pin for #13. I reckon I've tried every combination of value on the inputs screen to get the ++ limits to show on the diagnostics screen when operated. I have the E-stop enabled and set to pin 15, but not wired.

I've read the Uniport's documentation, I've tested the wiring and the input by removing a direct short from the input's connectors. I also swapped the wiring to the pin 15 input and changed the values accordingly. Nothing! Any ideas please?

Cheers, Andy
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on May 26, 2016, 03:27:07 PM
I wired all my switches  nc. Only 2 switches to 1 pin. Try wiring both the ys to 1 pin and try it. Mach3 fill automaticly find the y - and call it a home switch. Do the same with the x on it's own pin. It should work fine. Let me know. You will have to reentered the correct pin for the axis.
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: andysilvester on May 26, 2016, 04:39:46 PM
Thanks for the quick reply! My problem with changing the wiring is that I spent more than a day running the wires neatly with sleeving etc. and would prefer not to rip it all out unless I really have to. I guess I was too confident of success having taken advice from sites and forums that my setup would work. Half of it - the home and -- limits does work (!) so I'm hoping to get some guidance on either the inputs screen or maybe from someone who knows the Uniport BoB.

Cheers, Andy
Title: Re: Wiring Limit, Home and E-Stop Switches
Post by: kharrisonkevin on May 26, 2016, 04:53:37 PM
Mine isn't a uniport but I would think they are fairy similar. Normally nc works the best navigation less trouble. But what I would try is just use 2 short 18 gauge wires about a foot long each and discon net your wire at the bob and connect them up to try it. You should be able to just chang 1 wire on your limit switch to change it from no to nc without having to rewire the whole system.