Thread: Proximity limit switch problems
I'll start by saying that I'm very new to all this. Chances are there is a simple solution to my problem, but as yet I haven't been able to find it.
I've built the majority of my CNC (CNC router parts Pro 4896) and I'm now looking to hook up the electronics and start the motors.
I bought the S Box control box from Marchantdice on ebay (Produced by Tonman CNC) CNC Controller 3 axis Desk top Router Mill Plasma | eBay
The one I bought was 4 axis and included pre wired E stop cables. The limit switches were the gate type switches as shown below (I'm sure that isnt the right description) and I have two wires per switch.
I'd already bought a set of proximity limit switches. New Inductive Proximity Sensor Detection Switch NPN DC 6-36V LJ12A3-4-Z/BX | eBay. As my machine has threaded limit switch holders I wanted to use that type specifically. My proximity switches have three wires, black, brown and blue. I asked Marchantdice what I needed to do to get things working. At first they suggested that I run an additional wire per switch back to the control box.
I wanted to avoid more wiring if I could, so I bought these 2 wire proximity switches, thinking that they would connect directly to my machine. LJ12A3-4-J/DZ 2-wire 4mm Tubular Inductive Proximity Sensor Switch | eBay
When I connected these to my control box the light on the box for that axis' sensor did not light up. In Mach 3 diagnostics the switch was not working when I placed metal in front of it. When I reattached the gate switch the light came on and mach 3 worked.
I then tried the 3 wire proximity switches. I connected the black and blue wires to the two leads from my control box and the light on the control box lit up, but in Mach 3 diagnostics the switch was permanently on and would not trip when metal was placed in front of it. I tried switching "active low", but that made no difference.
It seems that the gate and 3 wire switches create a circuit, whereas my 2 wire ones didnt.
I asked Marchantdice again and they suggested that I buy another set of cabling from them, with proximity limit switches already attached. Having already spent approx £40 on two sets of limit switches and already having cabling obviously I'm not willing to pay out even more before I explore other possibilities.
I don't have much information re the S Box. It came with no instructions, Marchantdice web pages offer limited info and the manufacturer's website is in Chinese.
Ideally I want to use a 2 wire proximity switch to make use of the cabling I have. I really hope that someone has a quick and easy answer to this because my build has hit a brick wall.
I see that there are different types of proximity switches - NPN, NC etc. Do I just need two wire NPN limit switches by any chance?
Thanks in advance for any help.
Try your 2 wire proximity with Blue to GND and Brown to the input.
One problem is the voltage, the inputs are probably 5v but could be 12v, your switch is 6v minimum.
I think 3 wire is better but you did not connect the 3 wire switch correctly, you need brown to +ve(12v), blue to -ve(GND), black to input.
Great thanks Eddy, will try this tonight and let you know if it worked. Much appreciated.
Another thing you may be having trouble with is that I'm 99% sure the Old switches will have been wired in series but with these NO (normally open) swithces you'll need to wire them in parallel. . . . . . . Chances are that's what Mechant dicey where meaning.?
Easy to way wire these 3 wire switches is to run each switch back to a box on machine and connect all switches together in there then just run a single 3 wire Cy cable back to the control box.
Last edited by JAZZCNC; 16-01-2014 at 07:15 PM.
Right I've had another go at this.
Eddy I tried wiring as per your suggestion. The lights on the S box came on and Mach 3 seems to look right too. Only thing is the switch doesn't trip when I move it towards metal or anything else for that matter.
3 of my switches don't light up the box at all when wired up in the same way as the one which seems to work. Its making me wonder whether I have a batch of duff switches?
This is how Marchantdice explained the wiring:
I've just taken one of our S-Box controllers to bits, the wiring for the limit switches and e/stop is as follows
Switches Connector Control Board Prox Switch - Browns Pin 1 VCC Prox Switch1 - Black Pin 2 S1 Prox Switch2 - Black Pin 3 S2 Prox Switch3 - Black Pin 4 S3 Not Used Pin 5 S4 E/Stop - Yellow Prox Switch - Blues Pin 6 Ground Not Used Pin 7 Not Used E/Stop - Green Pin 8 E-Stop
I've added a picture of what I wired together.
So your picture shows the wire for a 3 wire switch + E/stop wires ?
It looks like you have the brown wire connected to black and yellow ?
You need brown to pin 1(VCC), black to either pin 2,3, or 4, blue to pin 6(Ground)
Eventually you will need 3 switches so just connect the browns together into pin1, the blacks will go one into each of pins 2,3,& 4 and the blues together into pin 6.
I have 5 proximity switches in total, 2 on the x, 2 on the y and an x prime home.
Sorry I thought that all I had to do was attach the proximity switches to my cabling, but is it the case that it is just set up for E/stops? I wanted my switches to act as limit and e/stop, but will that not be possible?
Am I right in thinking that I need a length of wire to run back to the control box from each proximity switch? JAZZCNCs suggestion of a single 3 core wire would seem to make sense as it would use less wire. I can sort the wiring out, but would they negate the need for the existing wires I have which run to my switches?
Time to clarify, there are limits and there are home switches.
As Jazz says it looks like your original wiring was in series with the E/stop and so are limits.
The ones I was talking about were the home switches.
Both can be wired in series but home switches sometimes have their own inputs. With this in mind it can be seen that using mechanical lever switches for limits makes life easy and for home switches that have their own inputs then proximity switches are okay too.
If proximity switches are required for limits they can be wired in parallel but only if they are the Normally Open type.
See if this thread sheds any light on it first.
Also see this, there are tabs across the top of the page that include series connected sensors too.
Last edited by EddyCurrent; 16-01-2014 at 10:23 PM.
What I'm going to suggest will work for both HOME and LIMITS and just require single 4 core cable back to control box.
My preference is to have Home on separate Inputs to Limits so I'll describe this way.
Wire all BROWN and BLUE wires together for ALL switches at the machine (In a Box). Then wire All LIMIT Blacks Together in one connector block and all HOME Blacks in another Block.
Now on the single 4 core cable wire Pin1 at control to Brown, Pin6 to Blue, Pin2 to LIMITS Black, Pin3 to HOME Black.
Then in Mach3 set the Limit Input Signal for Limit++ and -- for all axis to PIN 2 and set the Active Low to a Tick. (Active High)
Do the same for HOME axis on all axis but set to pin3 and Active high.
Now you will have ALL limits wired in parallel and sharing same switch so if any switch trips Mach will see it.
Same for HOME switches. When Mach homes it only moves one axis at a time, starting with Z axis then Y axis lastly X axis so it doesn't need a separate input for each switch has it's only watching for one signal.
Same goes for the Limits Mach's just watching for a Signal and only needs to know where to look. Your only bothered that it stops when a limit is tripped so it's not that important that you know exactly which switch tripped only that one has.!! . . . .You'll know just by looking.
So to save wasting inputs and make life eaiser just do this.
IF you want to share HOME and LIMITS then you do exactly the same but wire ALL blacks to Input 2 and use 3 core cable. Then go into Config/General Config and turn off Home SW. safety.
Now when cutting Mach watches PIN2 and treats it has Limits. BUT when HOMING mach watches PIN2 and ignores it has a Limit and treats it has a HOME switch.
If you have never used HOME switches then what it does is ride upto the switch and trips it then backs OFF until no longer active. This way when it's finished your limits are not tripped and you have an accurate HOME location.
Mach also gives you the option to back away from the Switch a set distance and Call this Home position.
Hope this makes sense.!!!. . .Lol
EDIT: OH forgot to say that because your using LIMITS wired in Parallel using NO switches then your not has safe has the Old switches when wired in series.!! Reason being that now if a wire breaks on the limit switch you won't know until it doesn't work when hit. When wired in series you set the Active State to Low so if a wire snaps the circuit is broke and the signal state drops to Low and trips the limit.!!
You can still do this with Proximity switches but will need NC switches wired in series.
Last edited by JAZZCNC; 16-01-2014 at 11:22 PM.
Never thought about this before, but if you are using parallel connected HOME switches you MUST configure Mach3 to back off them (unless that's the default) else it'll never home the 2nd and subsequent axis as it'll never see the switch state change.
Also, series connected NC surely only works with the 2-wire versions.
Last edited by irving2008; 17-01-2014 at 08:22 AM.
By Matt81 in forum General ElectronicsReplies: 9Last Post: 19-04-2014, 11:38 AM
By jonbabbz in forum General ElectronicsReplies: 10Last Post: 06-02-2014, 07:37 PM
By EddyCurrent in forum General ElectronicsReplies: 17Last Post: 30-09-2013, 11:38 AM
By Lee Roberts in forum General ElectronicsReplies: 5Last Post: 03-10-2009, 07:04 PM
By HiltonSteve in forum General ElectronicsReplies: 16Last Post: 13-08-2009, 01:26 PM