Need Help! Wiring of npn inductive proximity switches.


Results 1 to 12 of 12

Thread: Wiring of npn inductive proximity switches.

  1. #1
    Member
    Join Date
    May 2017
    Location
    Canada
    Posts
    95
    Downloads
    0
    Uploads
    0

    Default Wiring of npn inductive proximity switches.

    So I am just finishing up my build of a C-Beam XLarge (expanded from a regular) and I decided to try proximity switches instead of mechanical ones like last time. I picked up some LJ12A3-4-Z/BX switches and they do not operate how I figured they would. Thinking in terms of a mechanical switch, they're described as a "normally open" yet still let voltage pass (in my case 24v) when not detecting. When metal is detected, that changes, but it only drops to 0.8v instead of the expected 0v. I would've normally thought this as "normally closed" behavior. Not a problem as "NC" seems to be the safer option anyway.
    I have put a 2.8k resistor over the negative (blue) and signal (black) wires to drop the signal output to a better voltage for my BoB, but the think that on 2 of the 3 parallel cards i have for the PC, it's still sensed as "on" (hope I'm phrasing that correctly)
    Am I correct in thinking that 0.8v is around the range where something senses the difference between on and off? Is it the BoB or the parallel card that makes the difference? Is it possible to lower this voltage to 0v?


    Thanks in advance


    Similar Threads:


  2. #2
    Member john-100's Avatar
    Join Date
    Mar 2007
    Location
    uk
    Posts
    2083
    Downloads
    0
    Uploads
    0

    Default Re: Wiring of npn inductive proximity switches.

    the LJ12A3-4-Z/BX is a N/O switch that functions like a machanical N/O that can l be connected between the common ground and either a PC's parallel printer port input or TTL input of a BOB like CNC4PC's C10

    Wiring of npn inductive proximity switches.-npn-hall-switch-jpg

    0.8V is a valid TTL logic 0 and over +4V a logic 1

    what BOB are you using ?

    to get +24V you could either have the PNP version that connects the positive supply to the output
    or made an error wiring the NPN switch

    John



  3. #3
    Member
    Join Date
    May 2017
    Location
    Canada
    Posts
    95
    Downloads
    0
    Uploads
    0

    Default Re: Wiring of npn inductive proximity switches.

    The breakout board is a ST-V2 from SteppersOnline https://www.omc-stepperonline.com/st...kit-st-v2.html

    I will double check the installed model of the sensor, as I have both AX and BX models on hand, but I am almost positive I installed the BX ones. Below is a quick MS Paint drawing of how i have it now. Please forgive the crudeness of it.



    Attached Thumbnails Attached Thumbnails Wiring of npn inductive proximity switches.-sensor-drawing-jpg  


  4. #4
    Member john-100's Avatar
    Join Date
    Mar 2007
    Location
    uk
    Posts
    2083
    Downloads
    0
    Uploads
    0

    Default Re: Wiring of npn inductive proximity switches.

    OK now I see what BOB you have , the inputs are opto-isolated

    the LED anode in the "PC817" opto-isolator is connected to +10V from the regulator that powers the VFD circuit

    the LED cathode is connected via a 1K resistor to the BOB's input terminal
    PC817 data
    Wiring of npn inductive proximity switches.-pc817-pdf


    when the input is open circuit I would expect to see about 8V (10V - the 2V drop across the LED)

    when you connect the input to ground , I would expect the current to ground to be about 8mA

    depending on the current transfer ratio of the PC817 , the photo transistor will be able to sink 4mA to ground
    which is more than enough to pull your printerport input low (standard TTL load 1.6mA)

    by adding the resistor across the switches output & ground its possible for enough current to flow for the printer port input to see a logic low even when the switch is open -
    8V / 3.8K = 2.1mA with a minimum transfer ratio of 50% the opto isolators transistor can sink 1.05mA
    for the original TTL IC's used in the printer port adaptors , a standard load = 1.6mA

    its not clear from the manuals I have found what the current you need need to sink for a valid low for the super I/O in modern PC's

    remove the 2k8 resistor and let the BOB input go up to +8V when the switch is open

    John

    PS

    diagram for HALL switch & BOB input

    Wiring of npn inductive proximity switches.-hall-switch-inputs-bob-inputs-jpg

    Last edited by john-100; 08-31-2017 at 02:10 PM. Reason: add HALL switch & BOB input circuit


  5. #5
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24220
    Downloads
    0
    Uploads
    0

    Default Re: Wiring of npn inductive proximity switches.

    This also may help as an explanation of sink/source as applied to PNP/NPN device inputs, prox etc.
    Al.

    Attached Thumbnails Attached Thumbnails Wiring of npn inductive proximity switches.-sinksource-pdf  
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  6. #6
    Member
    Join Date
    May 2017
    Location
    Canada
    Posts
    95
    Downloads
    0
    Uploads
    0

    Default Re: Wiring of npn inductive proximity switches.

    Was home briefly for lunch and confirmed; LJ12A3-4-Z/BX sensors. Also, I will try changing the resistor value so it's closer to 8v. When I measure the voltage off the EStop pin (Pin 10 and Ground) it's around 8v as well ..... I wrongfully expected it to be around 5v, which is why I was trying to attain that voltage with the resistor I'd used.



  7. #7
    Member john-100's Avatar
    Join Date
    Mar 2007
    Location
    uk
    Posts
    2083
    Downloads
    0
    Uploads
    0

    Default Re: Wiring of npn inductive proximity switches.

    just remove the 2.8K resistor its not needed

    the BOB's input being open circuit is what you want until the closed switch grounds it

    John



  8. #8
    Member
    Join Date
    Jun 2011
    Location
    US
    Posts
    692
    Downloads
    0
    Uploads
    0

    Default Re: Wiring of npn inductive proximity switches.

    I would get rid of that resistor altogether and leave it open. NPN's conduct to gnd, and your bob has a pull-up to 10v, so when it's open, the input should be around 10v, closed, around 0v.



  9. #9
    Member
    Join Date
    May 2017
    Location
    Canada
    Posts
    95
    Downloads
    0
    Uploads
    0

    Default Re: Wiring of npn inductive proximity switches.

    Quote Originally Posted by skrubol View Post
    I would get rid of that resistor altogether and leave it open. NPN's conduct to gnd, and your bob has a pull-up to 10v, so when it's open, the input should be around 10v, closed, around 0v.

    ... even using a 24v power supply? I'd assumed that running 24v from the black/signal wire to one of the inputs on the BoB would nuke it. (or is the importance of the resistor/5v more relevant to arduino and other applications?)



  10. #10
    Member john-100's Avatar
    Join Date
    Mar 2007
    Location
    uk
    Posts
    2083
    Downloads
    0
    Uploads
    0

    Default Re: Wiring of npn inductive proximity switches.

    the + 6 to 36V connected to the LJ12A3-4-Z/B brown wire only powers the HALL detector

    the black wire connects to the open collector of the NPN transistor as in my diagram in post 4 -
    the NPN open collector can not supply current from the brown supply wire

    the blue wire is the common connection to the NPN transistors emitter and the negative of the +6 to 36V supply

    no power can flow from the positive supply to the BOB's input (unless the HALL effect switch is damaged or incorrectly wired)

    only when the NPN transistor is switched on can current flow out of the BOB's input via the transistor to the common ground

    John

    PS

    for any one that's paranoid adding a diode to the BOB input will prevent the direct connection of a positive supply damaging the BOB

    (the diodes anode needs to be connected to the BOBs input terminal - the cathode with the white band goes to the black switch wire)

    Wiring of npn inductive proximity switches.-hall-switch-plus-diode-inputs-bob-inputs

    Last edited by john-100; 08-31-2017 at 04:48 PM.


  11. #11
    Member
    Join Date
    May 2017
    Location
    Canada
    Posts
    95
    Downloads
    0
    Uploads
    0

    Default Re: Wiring of npn inductive proximity switches.

    So when I got home and had some time, I thought to myself "What the heck. I've got 4 BoBs and only need two. Lets try it."
    I removed the made sure that the brown and blue wires were hooked up to the positive and negative on the 24v PSU respectively and then hooked to pin10 on the BoB with the black signal wire. The BoB was also powered from the 24v PSU on the 12-24v input. BINGO! Worked like a charm. Strangely it still functions like a NC mechanical switch in that when the wire is disconnected, it then trips the BoB. (this is ideal for what I wanted). I think my main problem was going on the assumption that I could not run the inputs on the BoB at much more than 5v.
    Thanks for the suggestions guys!

    P.S. - It also worked on the newer parallel card as well that was not picking up signal change at all.



  12. #12
    Registered
    Join Date
    Apr 2018
    Location
    Ukraine
    Posts
    15
    Downloads
    0
    Uploads
    0

    Default Re: Wiring of npn inductive proximity switches.



    Last edited by zaxtone; 01-17-2019 at 06:56 PM.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Wiring of npn inductive proximity switches.

Wiring of npn inductive proximity switches.