Thread: Proximity limit switch problems
Threaded View
-
18-02-2018 #13
Sorry in a late reply to this - only found this thread by looking for information on inductive sensors.
For 3-wire sensors:-
NPN are low-side switching, so the sensor goes low impedance to ground in the presence of metal. PNP are high-side switching, so the sensor goes low impedance to supply-voltage in the presence of metal.
This has a bearing on how you wire these to your BoB, or whatever (for now, "BoB"). If the BoB's inputs are opto-coupled AND it presents both anode and cathode of the optocoupler input then you have a lot of flexibility, and either NPN or PNP can be made to work. For an NPN you'd connect the sensor output to the cathode of the optoisolator, and wire the anode to +5V (or +12V through a current limiting resistor). For a PNP, you'd wire the sensor output to the anode, and the cathode to ground (and if the sensor is powered by 12V, then probably have to include a current limiting resistor as well). More typically the BoBs (at least the couple I've come across) have the anodes of the optocouplers bonded to their own local 5V supply and you have to have low-side (i.e. NPN) switching - hence the NPN being the sensor of choice.
If you're stuck with PNPs and a low-side switching BoB, you *could* frig it a couple of ways. One to include a NPN transistor that is switched from the sensor output from the PNP - very easy, costs pennies and easily knocked up on strip board. Or, you *could* use the high-side switch to reverse-bias the LED in the optoisolator (it's naughty, but can be done) - connect the sensor output via a 470R resistor to the BoB input, connect a 220R resistor to ground (this allows the PNP to pull the cathode voltage up to reverse bias the optoisolator). In theory the cathode would sit around 4V with the PNP sensor "ON" and that's enough to stop the LED in the optoisolator illuminating. The only problem with this method is On is Off, and vice versa, that you have to invert the input in Mach3. You might have to play with the value of the 2 resistors, but keep the ratio the same (the series resistor from the sensor output having about twice the resistance of the external resistor from the BoB input to ground).
Something like
(Note: I've not tried this, but it ought to work)
One word of warning - if you removed the pull-down resistor, or disconnected the 0V to it, you're going to exceed the max reverse voltage on the optoisolator and destroy that input. Either don't do this!, or place a diode - anode on the BoB input, cathode to the BoB's 5V supply to clamp the input voltage to not much more than 5VLast edited by Doddy; 18-02-2018 at 01:39 PM.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Proximity switch NPN or PNP
By Matt81 in forum General ElectronicsReplies: 9Last Post: 19-04-2014, 11:38 AM -
Limit switch issues?!?
By jonbabbz in forum General ElectronicsReplies: 10Last Post: 06-02-2014, 07:37 PM -
One limit switch per axis
By EddyCurrent in forum General ElectronicsReplies: 17Last Post: 30-09-2013, 11:38 AM -
Proximity Sensors as Limit Switches ?
By Lee Roberts in forum General ElectronicsReplies: 5Last Post: 03-10-2009, 07:04 PM -
Limit switch's - best configuration?
By HiltonSteve in forum General ElectronicsReplies: 16Last Post: 13-08-2009, 01:26 PM
Bookmarks