585,719 active members*
4,431 visitors online*
Register for free
Login
IndustryArena Forum > WoodWorking Machines > DIY CNC Router Table Machines > Wiring of npn inductive proximity switches.
Results 1 to 12 of 12
  1. #1
    Join Date
    May 2017
    Posts
    95

    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

  2. #2
    Join Date
    Mar 2007
    Posts
    2083

    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

    Attachment 371802

    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
    Join Date
    May 2017
    Posts
    95

    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.


  4. #4
    Join Date
    Mar 2007
    Posts
    2083

    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
    Attachment 371828


    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

    Attachment 371836

  5. #5
    Join Date
    Dec 2003
    Posts
    24220

    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 Files Attached Files
    CNC, Mechatronics Integration and Custom Machine Design

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

  6. #6
    Join Date
    May 2017
    Posts
    95

    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
    Join Date
    Mar 2007
    Posts
    2083

    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
    Join Date
    Jun 2011
    Posts
    692

    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
    Join Date
    May 2017
    Posts
    95

    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
    Join Date
    Mar 2007
    Posts
    2083

    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)

    Click image for larger version. 

Name:	hall switch plus diode  &   inputs BOB inputs.jpg 
Views:	4 
Size:	74.2 KB 
ID:	371848

  11. #11
    Join Date
    May 2017
    Posts
    95

    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
    Join Date
    Apr 2018
    Posts
    15

    Re: Wiring of npn inductive proximity switches.


Similar Threads

  1. Inductive Proximity Sensor Limit Switches
    By clembrant in forum DIY CNC Router Table Machines
    Replies: 8
    Last Post: 01-09-2016, 06:57 AM
  2. Wiring an Inductive Proximity sensor for TB6560. How?
    By Azalin in forum Stepper Motors / Drives
    Replies: 5
    Last Post: 11-11-2015, 09:19 PM
  3. Replies: 7
    Last Post: 12-31-2013, 02:49 AM
  4. Inductive proximity switches
    By Skiroy in forum CNC Machine Related Electronics
    Replies: 25
    Last Post: 09-03-2011, 12:54 AM
  5. Wiring For Proximity Switches
    By Mcyoda in forum CNC Machine Related Electronics
    Replies: 3
    Last Post: 08-05-2008, 03:20 AM

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
  •