1
\$\begingroup\$

I have a couple of proximity sensors that came without documentation. I'm planning to use them as home sensors for a CNC router.

The label says that they're NPN sensors, 6-36 VDC, 200mA. There are three wires, which I understand to be +V (brown), -V (blue) and output (black). My expectation was that, since these are NPN, they would be current current sinking, and that there would be no electrical connection between brown and black. What I found was that if I apply +V to brown, I get +V on black, with a resistance of 10K Ohms. It seems like there's an internal pull-up resistor between +V and output. As expected, if the sensor comes within 2mm of metal, output is connected to -V (with 10 Ohms resistance). Am I interpreting this correctly?

Any recommendations on the simplest safe way to wire these sensors up to a parallel port input? Although the label says 6-36V, they seem to work with as little as 4V, though obviously that's out of spec. I had been expecting to supply my own pull-up resistor between output and +5V.

\$\endgroup\$
2
  • \$\begingroup\$ On a side note, I'm not sure that proximity sensors are the way to go for a homing sensor, at least not ones that are triggered by metal. Hall-effect based ones would be okay. Of course I'm assuming that you could have something accidentally trigger the sensor, but if your workspace is clear of other metallic objects, I suppose you'll be okay. \$\endgroup\$
    – Dave
    Jun 8, 2012 at 4:40
  • \$\begingroup\$ It is a Hall-effect sensor. I'll be mounting it into a frame that's largely made of PVC and used for cutting wood, so the only metal will be what I put there. \$\endgroup\$ Jun 8, 2012 at 6:23

2 Answers 2

3
\$\begingroup\$

It sounds like you are correct about the low side NPN and pullup resistor inside the sensor unit. You can make the output any lower voltage you want with the addition of a single resistor:

The resistor inside the sensor (R1) and a resistor you add (R2) form a voltage divider. The output high level will be V+ attenuated by the voltage divider:

\$ V_{OUT} = V_+ \times \dfrac{R2}{R1+R2} \$

In the example shown, the output will be 5V when high. The impedance of the OUT line will be the parallel combination of R1 and R2, which is 5 kΩ in this example.

You could also replace R2 with a 5 V zener if V+ might vary. However, my experience with sensors in general unless they explicitly say otherwise is that they can be surprisingly susceptible to power variations. I would at least filter V+, preferably regulate it.

\$\endgroup\$
3
  • \$\begingroup\$ Ow, what happened to orthogonal lines? You're not gonna end up like this, are you? :-) \$\endgroup\$
    – stevenvh
    Jun 8, 2012 at 11:19
  • \$\begingroup\$ @stevenvh: It's the influence of the black magic. \$\endgroup\$ Jun 8, 2012 at 11:35
  • \$\begingroup\$ +1 for a much nicer diagram, and "dark magic" sounds much cooler than "sense" :-) \$\endgroup\$
    – Oli Glaser
    Jun 8, 2012 at 11:40
2
\$\begingroup\$

I think you are interpreting things correctly.

From your description it sounds like it's a simple NPN setup as shown below:

ProxSenseNPN

This means no pull up is necessary for normal use (unless you wanted to speed the turn off duration up by lowering the resistance from collector/OUT to V+, but that's extremely unlikely given the expected speeds involved)

It would have been nice for it to be an open drain output so you could pick your own output voltage, but a simple resistive divider to bring e.g. 10V down to 5 or 3.3V to interface with a uC or similar is easy enough to add.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.