586,485 active members*
2,550 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > Confused about 24V proximity sensor to 5V input
Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2016
    Posts
    5

    Confused about 24V proximity sensor to 5V input

    Hi experts,

    I have a C10S BOB for my CNC controller and I've connected an NPN normally closed proximity sensor to one of the inputs.
    My controller has a dual power supply for things like sensors, the BOB, etc. It delivers 5V and 24V DC.
    The sensor operates from 10V-30V DC.

    I've connected everything according to the wiring diagram in the manual. See the first attached picture (red arrow).
    I've set the jumper for the input pins to use the pull-down resistor (which is 4,7KOhm).
    The resistor R1 that I'm using is 27KOhm (since it is 24V and I don't have any 25KOhm resistors).

    Here's the thing ...
    I works, but I would like to understand how it works. How does the current flow thru this diagram?
    How do the two resistors work together (the internal pull-down and the external resistor)?

    In the second attached picture I've combined the two diagrams from the manual to try and figure out the voltages across the circuit.
    Next to the diagram you can see the voltages I've measured.
    When the sensor is triggered (and the circuit opens), the voltage between point B and C is 5,8V.
    Shouldn't that be around 3,56V since both resistors are effectively in series?

    Any help is much appreciated.
    Regards,
    Justin

  2. #2
    Join Date
    Mar 2007
    Posts
    2083

    Re: Confused about 24V proximity sensor to 5V input

    looking at the 3rd diagram
    I'd expect the BOB input to be about +3.5V when the switch is open as you calculated

    to be at + 5.8V my first thoughts are

    1, the 4K7 pulldown resistor is not working and the 24V supply is pulling the IC input pin up until the
    the internal diode clamps the pin to the positive supply pin - about 0.5V higher than the 5V supply !

    2. the meters negative probe is on a point that's not at the same potential as BOB's 0V / ground


    John

  3. #3
    Join Date
    Jun 2012
    Posts
    108

    Re: Confused about 24V proximity sensor to 5V input

    Quote Originally Posted by john-100 View Post
    looking at the 3rd diagram
    I'd expect the BOB input to be about +3.5V when the switch is open as you calculated

    to be at + 5.8V my first thoughts are

    1, the 4K7 pulldown resistor is not working and the 24V supply is pulling the IC input pin up until the
    the internal diode clamps the pin to the positive supply pin - about 0.5V higher than the 5V supply !

    2. the meters negative probe is on a point that's not at the same potential as BOB's 0V / ground


    John
    I agree,
    Another is the 4k7 is switch to +5 but would expect around 8 volts, that where the diode would come in again.
    Another is the sensor is supping some current to the input.

  4. #4
    Join Date
    Jan 2016
    Posts
    5

    Re: Confused about 24V proximity sensor to 5V input

    Thanks for the replies.

    I did some more testing.
    When the BOB was not powered, I measured the resistance from one of the inputs with the pull-down resistor to the 0V of the power supply. It is 3Kohm.
    When I powered the BOB, the resistance between those same two points went up to 4,75Kohm.

    Is it possible that there is a third resistor/diode on the board in series with the other two that would give a combined voltage of 5,8V?

    Btw, the only reason I'm asking is because I don't want to fry the BOB

  5. #5
    Join Date
    Mar 2007
    Posts
    2083

    Re: Confused about 24V proximity sensor to 5V input

    a while ago using the C10 manual and various photos off the net I pieced together the circuit of the C10 BOB

    Attachment 303712



    your C10S is a version using surface mount IC's

    the protection diodes inside the IC's will prevent the input pins being more than 1/2V below the ground pin or 1/2V above the positive supply pin

    Click image for larger version. 

Name:	input protection diodes.jpg 
Views:	0 
Size:	32.9 KB 
ID:	303734

    John
    Attached Thumbnails Attached Thumbnails cmos inverter input protection.bmp  

  6. #6
    Join Date
    Jan 2016
    Posts
    5

    Re: Confused about 24V proximity sensor to 5V input

    Thnx for the diagrams. However, I'm not sure that I understand them completely.

    I think you're basically saying that I shouldn't worry to much about the 5,8 voltage.
    The sensors are connected as per instructions in the manual. Plus I haven't seen any smoke yet
    I doubt it that there is anything wrong with the BOB or the sensors. I tested 4 different sensors on multiple inputs.
    They all give the same 5,8 volts.

    On a side note. Is there perhaps another (better) way to get these sensors working with the BOB?
    Maybe by powering the sensors with 24V and utilizing the 5V from the BOB as the load???

    Also, I could set the jumper to pull-up. This way I can pull-up the voltage from the input when the sensor is open, and have mach3 react on active low when the sensor closes.
    The downside however, is that the entire bank of inputs will be configured for pull-up. This makes configuring limit switches and e-stops problematic.

    Regards,
    Justin

  7. #7
    Join Date
    Mar 2007
    Posts
    2083

    Re: Confused about 24V proximity sensor to 5V input

    Hi Justin

    I'd set the 4K7 resistors on the C10 as pull down resistors
    and double check the 27K resistors are 27K

    the 74ACT245 input protection diodes are for static protection and are not intended to clamp the excess voltage if the 27K resistor is less than expected - possibly around 20K

    John

  8. #8
    Join Date
    Mar 2006
    Posts
    202

    Re: Confused about 24V proximity sensor to 5V input

    When I have connected NPN sensors to microcontrollers, I have used (essentially) only a pull-up (to 5 or 3.3 volts, depending on the equipment.) The open drain sensor acts like a switch to ground. When the sensor is ON, the output wire behaves like a short to ground, forcing the input line low. When the sensor is OFF, the output wire floats, so the pull-up resistor pulls the signal high.

    You could try the following test:
    Connect the sensor to power: 24 volts and ground.
    Connect the output wire through a pull-up resistor, 4.7K to 10K ohms, to 5 volts.
    Connect a voltmeter from ground to the sensor output wire.
    Apply power and observe the volt meter as you wave a screw driver in front of the sensor. You should see the voltage go from near 5 volts when the sensor is off to near 0 when on. Note the reversed signal polarity: high = off, low = on.

    What is the brand and part number of the sensor?

    (edit: removed potentially confusing minus sign)

  9. #9
    Join Date
    Jan 2016
    Posts
    5

    Re: Confused about 24V proximity sensor to 5V input

    Thnx, I will try your suggestion.
    Btw, do you mean I should use a resistor ranging anywhere from 4,7K to 10K, or connect a 4,7K and 10K in series?

    The sensors are: IBEST IPS-12NOC2A-S
    IPS-12NOC2A-S NPN NO+NC 2mm,shielded ≤100mA DC 10~30V 4 Wire

    Probably not the best, but I've seen a lot of hobby CNC-ers use them (where I live).

    Regards,
    Justin

  10. #10
    Join Date
    Mar 2006
    Posts
    202

    Re: Confused about 24V proximity sensor to 5V input

    Just a single resistor, somewhere in the range of 4K7 to 10K.

    Since your sensor is 4 wire with both NO and NC outputs, you should be able to get whatever output signal polarity you need by choosing the black or the white wire.

Similar Threads

  1. PnP Proximity Sensor and The TB6600 Controller
    By ashsab in forum DeskCNC Controller Board
    Replies: 0
    Last Post: 09-22-2015, 03:36 PM
  2. CRP's Proximity Sensor Kit
    By rwskinner in forum Avid CNC
    Replies: 5
    Last Post: 02-12-2014, 04:07 AM
  3. Limit / Proximity Sensor KMB1
    By Bob La Londe in forum HURCO
    Replies: 5
    Last Post: 09-14-2012, 04:29 AM
  4. BB does not read +5 from proximity sensor
    By crane550 in forum DIY CNC Router Table Machines
    Replies: 3
    Last Post: 03-25-2012, 02:01 PM
  5. proximity sensor issue
    By strohkirchw in forum Benchtop Machines
    Replies: 18
    Last Post: 05-27-2011, 10:14 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
  •