Shop OBEX P1 Docs P2 Docs Learn Events
Using an industrial prox sensor — Parallax Forums

Using an industrial prox sensor

blittleblittle Posts: 19
edited 2007-09-18 02:41 in BASIC Stamp
I have an industrial proximity sensor I would like to use with a bs2.
I have the Stamp Discovery kit with the BOE board.
The sensor is one of these:
http://www.htm-sensors.com/inductiveDetails.cfm?recordID=LCM1-1206N-ARU4
The page says it's an NPN type. 10-30VDC. Normally open.
A tech at HTM told me the pinouts for the standard wire colors used on the connector:
BR = V+
BL = output
BLU = ground

I'm just getting started and have very little experience with electronics so far.
So I'm not sure how I can safely do this with 10-30vdc to the sensor while not smoking the stamp.
Obviously I can't hook it directly to a stamp pin, but I'm at a loss as to the correct approach.
Any help, direction, or pointer would be greatly appreciated.
Thank you.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-09-17 22:05
    Actually, you may be able to connect it directly to the Stamp. The "NPN" in the specs hints that it has an open-collector output. As long as this output isn't pulled up internally, it will be safe to connect to the Stamp. Here's how to find out:

    1. Apply power to the sensor.
    2. Without any metal in its vicinity, measure the voltage between the black wire and the blue wire.
    3. If there's a voltage present (>5V), you won't be able to connect it to the Stamp.
    4. If there's no voltage present, connect the blue wire to your BASIC Stamp system's Vss, and connect the black wire, through a series 10K resistor, to Vdd.
    5. Measure the voltage between the black wire and Vss with and without metal present.
    6. If the voltage changes between 0 and 5V, you're set and can now connect the black wire to a Stamp pin.

    Now, having said all that, there are additional factors to consider. If you're going to be using it in an electrically-noisy environment, you may want to consider using an optoisolator between the sensor and the Stamp to protect the Stamp from dangerous transients. In most industrial situations, this would be preferred to a direct connection.

    -Phil
  • blittleblittle Posts: 19
    edited 2007-09-17 22:17
    Thanks for the quick reply.
    I'll start testing as soon as I get home.

    This will be used in an industrial environment (counting parts off a conveyor) so yeah, i figured optoisolation would be the right way to do it.
    I just have no idea about the details of accomplishing that. :/
    I'll do some more work on my own before asking for a gimme though. [noparse]:)[/noparse]

    Thanks!
  • blittleblittle Posts: 19
    edited 2007-09-18 01:11
    I think you meant to say "brown" in step 4?

    4. If there's no voltage present, connect the blue wire to your BASIC Stamp system's Vss, and connect the brown wire, through a series 10K resistor, to Vdd.

    Just wanted to have it on the board for future readers benefit.
    [noparse]:)[/noparse]
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-09-18 01:39
    Nope. Brown still goes to the 10-30VDC supply for the sensor.
  • blittleblittle Posts: 19
    edited 2007-09-18 02:10
    Forgive my density, but wouldn't I have to connect the ground of the 10-30vdc power supply to vss for this to work?
    Wouldn't that be bad?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-09-18 02:41
    Yes to the connection. No, it wouldn't be bad. Here's a schematic...

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 9/18/2007 3:56:52 AM GMT
    587 x 280 - 3K
Sign In or Register to comment.