585,585 active members*
3,650 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > Breakout board / PNP NC proximity sensor wiring
Results 1 to 13 of 13
  1. #1
    Join Date
    Jan 2005
    Posts
    1943

    Breakout board / PNP NC proximity sensor wiring

    Well, I am a little confused how I need to wire up my PNP NC prox sensors to my chinese breakout board.

    Here is what I was going to do.

    Attachment 409764

    But looking at this diagram it shows the limit pins connected to a switch and then to ground. So is the above wiring correct? Also should I put a resistor between the black sensor wire and the breakout board?

    Attachment 409766

    Thanks in advance

  2. #2
    Join Date
    Mar 2007
    Posts
    2083

    Re: Breakout board / PNP NC proximity sensor wiring

    as you say the switch needs to be able to ground the BOB input

    the problem with PNP NC prox sensors is they can only connect the BOB input to the +24V

    the BOB's circuit
    Attachment 409796

    looking at the BOB;s input you can see the opto-isolators LED is connected to positive output of the 10V regulator
    with a 1K resistor to limit the LED current when the limit switch is closed

    Attachment 409798

    not knowing the sensor you have

    I would try adding a 1K pull down resistor that will pass 24mA when the sensor is closed
    as the resistor disipates 576 mW use a 1W resistor

    when the sensor is open the 1K pull down resistor and the 1K resistor on the BOB wil limit the opto-isolators LED current to about 4.5mA

    the 1N4001 silicon diode I have added protects the opto-isolators LED
    without the diode the LED's cathode will be taken to +24V while the anode is connected to +10V

    the LED's reverse break down voltage will be about 2V and could be damaged by the 14V reverse bias

    John

    PS

    wiring for both NPN & PNP sensors

    Click image for larger version. 

Name:	Wiring 1.jpg 
Views:	42 
Size:	178.0 KB 
ID:	409806

    note - you can use any 1A 50V (PIV) silicon diode to replace the 1N4001

  3. #3
    Join Date
    Jan 2005
    Posts
    1943

    Re: Breakout board / PNP NC proximity sensor wiring

    John-100. Thank you for your help on this. I have an additional question that I would like to pose in regard to this BOB.

    I obviously intend to use this BOB with a PC and parallel port, but I also want to be able to connect the BOB to a microcontroller running Grbl. On my current machine I sometimes run Grbl and sometimes LinuxCNC on the PC. I have done this kind of thing before using an Arduino (see picture below), I just took a printer cable that I cut and probed the pins/wires to connect the appropriate wires to the Arduino. It works great with the Arduino, but the Arduino operates on 5 VDC.

    The new MCU (ESP32) I want to use is a 3.3 VDC device. With my meager understanding of electronics it appears that I should be able to just connect the ESP32 MCU in the same manner that I did the Arduino and the 74HC245 chips on the BOB will handle level shifting of the outputs, and the optocouplers will take care of the inputs to the MCU. Is this correct?


  4. #4
    Join Date
    Mar 2007
    Posts
    2083

    Re: Breakout board / PNP NC proximity sensor wiring

    I have not seen the ESP32 before so I am not sure if outputs are 5V tolerant

    the BOB's 74HC245 input will have a leakage current that will flow from the +5V supply plus the current due to the 10K pull up resistor
    both these currents will try to pull the ESP32 output above its +3.3V supply

    If the ESP32 output pin is like most logic IC's
    and is connected to the 0V & +3.3V power rails via 2 normally reverse biased diodes that
    conduct to prevent the pin going more than 0.6V above the +3.3V rail or 0.6V below the 0V rail

    the question is what is the safe current that can flow into the output pin and is this given in the ESP32 data sheet ?

    may be a schottky diode between the output pin and +3.3V supply will be enough to protect the output
    ( cathode to +3.3V)
    or a level converter like this
    Bi-Directional MOSFET Voltage Level Converter 3.3V to 5V

    as the 5 BOB input opto-isolators NPN open collector outputs don't have any pull up resistors on the BOB
    the ESP32 inputs will need their own pullup resistors to +3.3V
    possibly done automatically when the ESP32 micro controller I/O pin is programmed to be an input

    John

  5. #5
    Join Date
    Jan 2005
    Posts
    1943

    Re: Breakout board / PNP NC proximity sensor wiring

    So it sounds like I should be ok on the inputs to the esp.

    I did some checking and it looks like the esp32 pins aren't 5v tolerant. At least most discussions I find recommend level shifting. So if this is the case, what would be your recommendation for performing it? Another 74HC245? High speed optocouplers? Other?

    Thanks for your help in this??

    EDIT: I did some more checking and it appears that all the pins on the board I have except 2 have internal pull-ups. Below is what I'm thinking about for connecting the ESP32 to the BOB. The outputs would use another 74HC245 connected as shown with 3.3V Vcc from the ESP32. I only show one 74HC245, but there would actually be 2 to gather all the outputs. The inputs would just be fed directly from the BOB to the ESP32 but with pullups on those 2 pins I mentioned. What do you think of going this route. :

    Attachment 410144

  6. #6
    Join Date
    Mar 2007
    Posts
    2083

    Re: Breakout board / PNP NC proximity sensor wiring

    instead of using 74HC245 buffers I would look at something like 74LCX541
    a 3.3V octal buffer wit 5V tolerant inputs and outputs

    Attachment 410148Attachment 410148

    John

  7. #7
    Join Date
    Jan 2005
    Posts
    1943

    Re: Breakout board / PNP NC proximity sensor wiring

    Quote Originally Posted by john-100 View Post
    instead of using 74HC245 buffers I would look at something like 74LCX541
    a 3.3V octal buffer wit 5V tolerant inputs and outputs

    Attachment 410148

    John
    Thanks again. Understanding that there may be better choices, will the 74HC245 work OK or is there some downfall to using the 74HC245?

    Reason I ask is because I remembered that I had bought some of them a few years ago for another project, and by some miracle, I actually found the ones I didn't use back then. I have 4 of them remaining which would be enough to do 2 of ESP32 boards.

    Does the wiring I cartooned up look right for the inputs and outputs?

    Thanks again

  8. #8
    Join Date
    Mar 2007
    Posts
    2083

    Re: Breakout board / PNP NC proximity sensor wiring

    since you have four 74HC245 IC's you may as well try using them

    I have just had a look and this 3.3V version thats 5V tolerant is available

    www.mouser.com/ds/2/149/74LCX245-21038.pdf

    the 74LCX245 will give you another option if running a 74HC245 from a 3.3V supply does not work as expected
    when connected to the BOB's 74HC245 connected to a 5V supply

    see this
    http://www.ti.com/lit/an/slya014a/slya014a.pdf

    for possible latch-up problems due to parasitic components within the IC's

    John

  9. #9
    Join Date
    Jan 2005
    Posts
    1943

    Re: Breakout board / PNP NC proximity sensor wiring

    Thanks again. Unfortunately I'm going on a trip leaving tomorrow morning so won't have a chance to test it before I leave. As soon as I return I'll breadboard it up and see ho it works.

  10. #10
    Join Date
    Jan 2005
    Posts
    1943

    Re: Breakout board / PNP NC proximity sensor wiring

    Second guessing myself I decided to hunt around a little. I only want to build this once, so since I'll be gone for about a week I can order something else and it may be waiting for me when I return. I did some searching and found this which sounds like exactly what I need. What do you think?

    http://www.ti.com/lit/ds/symlink/sn74lvc4245a.pdf

  11. #11
    Join Date
    Mar 2007
    Posts
    2083

    Re: Breakout board / PNP NC proximity sensor wiring

    yes
    the SN74LVC4245A looks like a good ideal solution

    John

  12. #12
    Join Date
    Jan 2019
    Posts
    1
    I recently bought a Chinese 4x8 CNC machine that had 12 volt proximity sensors installed. Over the years they had been hacked and were not hooked up. I researched installing 12 volt sensors and understand the need for the resistors. But recently I bought 5 vdc NPN NO proximity sensors, which I thought would make life easy. I connected them to a C25 BOB and get a triggered signal without activating, and then they do not work at all if I switch input settings to active low. I have tried to contact CNC4PC about this since they sell NPN 5vdc proximity sensors, the small square ones, and they said it a very short way, that it was easy to wire them, but did not elaborate. Another question is why aren't the cylinder shaped proximity sensors working on 5 volts used and more common? All I can find on the web is info on using 12 volt ones and having to install a pull down or up resistor to the output lead. Any help on this would be great. How would you wire them to a C25 BOB. Do I still need a resistor?

  13. #13
    Join Date
    Nov 2018
    Posts
    4

    Re: Breakout board / PNP NC proximity sensor wiring

    Quote Originally Posted by Raycocnc555 View Post
    I recently bought a Chinese 4x8 CNC machine that had 12 volt proximity sensors installed. Over the years they had been hacked and were not hooked up. I researched installing 12 volt sensors and understand the need for the resistors. But recently I bought 5 vdc NPN NO proximity sensors, which I thought would make life easy. I connected them to a C25 BOB and get a triggered signal without activating, and then they do not work at all if I switch input settings to active low. I have tried to contact CNC4PC about this since they sell NPN 5vdc proximity sensors, the small square ones, and they said it a very short way, that it was easy to wire them, but did not elaborate. Another question is why aren't the cylinder shaped proximity sensors working on 5 volts used and more common? All I can find on the web is info on using 12 volt ones and having to install a pull down or up resistor to the output lead. Any help on this would be great. How would you wire them to a C25 BOB. Do I still need a resistor?
    I have been looking at the same problem and just ordered the Add on Card for the Ethernet smooth stepper called the C52 Third port card which allows for 12 volt or 24 volt input for limit switches like Proximity and the board has a buffer circuit to change the signal voltage down to the TTL 5 volts needed by the Smooth stepper board. This board just sits down on top of the smooth stepper and plug on beside the C25 board and costs about 30 dollars US.

Similar Threads

  1. Proximity Sensor Wiring Issue? Help needed.
    By jimskeet in forum DIY CNC Router Table Machines
    Replies: 67
    Last Post: 03-30-2020, 01:06 AM
  2. Replies: 3
    Last Post: 06-26-2018, 06:56 PM
  3. Proximity sensor wiring
    By Lindzr in forum Automation Technology Products
    Replies: 2
    Last Post: 08-16-2017, 01:29 AM
  4. 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
  5. Help with NPN proximity sensor wiring in parallel
    By bean_086 in forum DIY CNC Router Table Machines
    Replies: 10
    Last Post: 08-09-2013, 04:44 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
  •