3 Attachment(s)
Wiring 24v NPN Proximity Switch to 5v BOB - Why does'nt it work
Hi Guys
I am using NPN Proximity switches from here and a 5v BOB from Zapp Automation . I fitted a 2.4k ohm resistor between the black signal wire and the blue (-ve line) and connected up to a 24v dc power supply. When the switch is open, the voltage between the signal wire and the blue line is 4.5v ok I think for the input to the BOB. When the switch is closed, it drops to 0.7v - measured using a DMM and the LED on the back lights up. I connect the black wire to pin 10 of the BOB and the blue wire to the GND. When I activate the switch, the LED does'nt light and nothing is detected via the diagnostic screen of MACH3. And yes the port & pins is set for the Home to pin 10.
The 24v power supply buzzes and the indicator LED on it goes out. What have I done wrong?
Thanks
MikeAttachment 19436Attachment 19434Attachment 19435
Re: Wiring 24v NPN Proximity Switch to 5v BOB - Why does'nt it work
Connect one end of the resistor to +24V, not to PSU -ve. What you then have is the BOB input driven from the 24V with the resistor lowering the voltage to the BOB to a nominal 5V. When the proximity switch operates, it shorts out the BOB input to ground. Should be OK although it's not quite a conventional way to wire things, and it might not work reliably as it depends on the proximity switch bringing the BOB input voltage close enough to ground to trip the BOB input. You will have to figure out whether you then want active high or active low configured in Mach3 to do want you want - probably active low.
Unfortunately the ZP5A manual is very vague on the details of the input connections. I don't remember now if the limit switch inputs have a common ground or if they are separate. I used to use one of these BOBs myself but that machine didn't use any limit switches so I never had to sort this one out. Can you check with a meter if the limit switch input ground connections are all connected together? It's possible that they are not, and in that case there is a better way to wire the switches. Take +24 via the resistor to the BOB input. Then connect the BOB input ground to the black wire on the prox switch. Brown and blue wires stay as they are on your diagram. This would probably need active high in Mach3 and from an electrical point of view is the "right" way to do it. However, it does depend on the limit switch grounds being electrically isolated from each other.
Re: Wiring 24v NPN Proximity Switch to 5v BOB - Why does'nt it work
Some of these switches have a 10K inside and limit the current to a few mA I have used these on 5V inputs without any other R's without problems
Re: Wiring 24v NPN Proximity Switch to 5v BOB - Why does'nt it work
Quote:
Originally Posted by
Neale
Connect one end of the resistor to +24V, not to PSU -ve. What you then have is the BOB input driven from the 24V with the resistor lowering the voltage to the BOB to a nominal 5V. When the proximity switch operates, it shorts out the BOB input to ground. Should be OK although it's not quite a conventional way to wire things, and it might not work reliably as it depends on the proximity switch bringing the BOB input voltage close enough to ground to trip the BOB input. You will have to figure out whether you then want active high or active low configured in Mach3 to do want you want - probably active low.
Unfortunately the ZP5A manual is very vague on the details of the input connections. I don't remember now if the limit switch inputs have a common ground or if they are separate. I used to use one of these BOBs myself but that machine didn't use any limit switches so I never had to sort this one out. Can you check with a meter if the limit switch input ground connections are all connected together? It's possible that they are not, and in that case there is a better way to wire the switches. Take +24 via the resistor to the BOB input. Then connect the BOB input ground to the black wire on the prox switch. Brown and blue wires stay as they are on your diagram. This would probably need active high in Mach3 and from an electrical point of view is the "right" way to do it. However, it does depend on the limit switch grounds being electrically isolated from each other.
Hi Neale
Thanks for your response. It seems to tie up with what is on the switch label anyway. The ZPA5-INT has a seperate ground for each pin input. I'll give it a go.
Regards
Mike
1 Attachment(s)
Re: Wiring 24v NPN Proximity Switch to 5v BOB - Why does'nt it work
Quote:
Originally Posted by
Clive S
Some of these switches have a 10K inside and limit the current to a few mA I have used these on 5V inputs without any other R's without problems
Absolutely right. Here below is how to check if that is the case / credit goes to C23 BOB manual/
Attachment 19439
Re: Wiring 24v NPN Proximity Switch to 5v BOB - Why does'nt it work
These proximity switches come in so many flavours. The switch the OP is using switches to ground and an internal resistor makes no sense; the switch in the previous post switches to the supply rail and maybe an internal resistor is more useful.
If you use the NC version of the OP's switches, wired as suggested in series with the BOB input, you can connect a number of them to a single input. I have tested four in series, using 24V and a CSMIO, and that seems to work fine. Using the OP's NO switches, you would have to wire them in parallel but you lose the "fail safe" feature of NC switches.
Re: Wiring 24v NPN Proximity Switch to 5v BOB - Why does'nt it work
People seem to be over complicating this.
.
Given the BOB in question requires switched to 0V to activate the input, all you need to do is wire 24V to BN, 0V to BU, then connect the BK to the BOB input. You may need to also connect the BOB 0V to the sensor, however I'd assume this BOB doesn't have fully isolated inputs, and the 24V and 5V supplies already have their 0V connected at some point.
.
An NPN sensor simply switches the output wire to 0V, and should go essentially open circuit when unactivated. You should not need any kind of pull up resistor on the sensor output.
However as has been mentioned already, the sensor may not switch perfectly to 0V, and may struggle to reliably switch the BOB input. In that case, adding a small relay into the circuit would be needed.
Alternatively, there's these simple sensors called switches... ;-)
Re: Wiring 24v NPN Proximity Switch to 5v BOB - Why does'nt it work
Quote:
Originally Posted by
Boyan Silyavski
Absolutely right. Here below is how to check if that is the case / credit goes to C23 BOB manual/
Attachment 19439
Useful post Boyan. Applied the formula to the NPN I had with the external 2.4K ohm resistor I used and got answer of 10.4K ohm for the switch internal resistance. This seems consistent Clive S post. The switch does have 300ma printed on it. But I think this is too much current for the BOB input. So back to the Neale's suggestion. Will let you guys know how it works out.
Re: Wiring 24v NPN Proximity Switch to 5v BOB - Why does'nt it work
Quote:
Originally Posted by
MikeyC38
The switch does have 300ma printed on it. But I think this is too much current for the BOB input.
What that means is that the switch can source 300mA try putting a mA meter in circuit and see what you get.
Re: Wiring 24v NPN Proximity Switch to 5v BOB - Why does'nt it work
NPN and PNP are transistor types. Transistors are like switches, strangely picky switches.
An NPN switches power to ground. A PNP switches power off the power rail.
So if you have an NPN output sensor it is going to switch something to ground.
If you wanted a Voltage, connect a resistor between and NPN output and the Voltage rail.
More likely you want a current. To avoid interference CNC folk tend to use opto-isolation, the output turns on an LED which shines on a detector, which probably has an NPN output, but someone else can worry about that one.
The only sensible way to drive an LED is with a resistor off the Voltage rail, through your LED, through the NPN output to ground.
If it is a silicon transistor you will have a 0.7V drop across it, probably another 1.2V drop across the LED, use whatever is left to calculate the resistor value.