Photomicrosensor Omron EE-SX674 4 wire correct schematic

Hey,

It is lock-down time and I decided to learn how to use the photomicrosensor Omron EE-SX674.

I have Arduino DUE, MEGA 2560 and UNO, I have received them as a donation and I have no idea which one to use.

I looked around and didn't find any post with optical sensor like mine with 4 wire. I think I managed to connect the + (brown) and - (blue) but I don't know what to do with the "OUT" (black) and "L" (pink).

The goal: Receiving a readout when a metal film passes between the sensor's walls.

I am using 200 Ohm resistor as protection and 0-100 KOhm potentiometer resistor to control the frequency of the beam (learned from other posts).

The sensor is Omron EE-SX674 with connector Datasheet

I wish you all a great and safe day,
Nitzan

You have a SX674 and no mention of more to the part number like SX674-WR or SX674P-WR? It should be Brown Vcc (5 to 24 VDC)
Pink L
Blue Ground
Black Output

Page 9 of the data sheet

You apply 5 to 24 VDC between Vcc (Brown) and Blue (GND). You can tie L (Pink) to Vcc so Brown & Pink are tied together. Your Output is Black so between Black and Blue. The L Terminal determines Light On or Dark On at your Output. Data sheet page 5.

It looks like your version is an Open Collector NPN output shown in the data sheet so you may want to place about a 10K resistor between Out (Black) and Ground (Blue).

Get rid of the pot as it serves no purpose. The sensor you have outputs pulses, not an analog signal. Slotted devices like this can be used for measuring shaft speed or end of a line.

What exactly do you want to do with it and what is your overall goal? A schematic would go a long way with what you expect this sensor to do?

With the open collector out you will need a load resistoe to ground from your output, where the data sheet shows a load.

Ron

2 Likes

Arduino 5V to + pin, Arduino GND to - pin, Arduino digital input pin to OUT pin, in setup() set input pin to:

pinMode(pin#, INPUT_PULLUP);

If pullup resistor (10k) is needed, put between input pin and 5V.

E00000945681.jpg

E00000945681.jpg

Thank you both :slight_smile:

My sensor is SX674 (No ending meaning: NPN and not Pre-wired).

My end goal is: Connecting two sensors to a linear rail with servo motor ES-M22430 (Datasheet ) that is controlled via Leadshine ES-D808 Controller (Hardwear installation sheet )
I want the sensors to limit the distance the rail can travel so it won't hit the wall.

This goal can be done by motion control (pg 14 in the installation sheet). I think the way to do that is to send a pulse to the controller input signal "Pul".

In general I am not sure of my method and way of thinking since I am, after all, a newbie :slight_smile: .

The picture is not of the actual rail and sensors but is of the same type and configuration of mine.

What do you mean by :

Ron_Blain:
Get rid of the pot as it serves no purpose. The sensor you have outputs pulses, not an analog signal. Slotted devices like this can be used for measuring shaft speed or end of a line.

What is "pot"?

I don't know yet how to draw a schematic, I hope this is good :slight_smile:

JCA34F:
If pullup resistor (10k) is needed, put between input pin and 5V.

I will do that.

When you mentioned "I am using 200 Ohm resistor as protection and 0-100 KOhm potentiometer resistor to control the frequency of the beam (learned from other posts)". I guessed you had a pot in the mix.

Yes, what you posted will work. Place one slotted sensor at each end of your travel as pictured. When the lead screw reaches end of travel you can have it either stop or stop, pause and reverse. Pretty much any action you want based on the Arduino Inputs from the slotted optical detectors.

Ron

Hey Ron, thank you very much for your time!

Ron_Blain:
When you mentioned "I am using 200 Ohm resistor as protection and 0-100 KOhm potentiometer resistor to control the frequency of the beam (learned from other posts)". I guessed you had a pot in the mix.
Ron

Still not sure what a pot is, I guess if I don't have "pot" than it's good?

Would a more accurate schematic look like this?

The resistor is not needed, connect the sensor " - " pins directly to GND.
A "pot" is a variable resistor, a potentiometer.

Sensor ground and Arduino Ground as well as any ES-D 808 Grounds should all be common (tied) and yes eliminate the 10K resistor you have in there.

Ron

Ron_Blain:
Sensor ground and Arduino Ground as well as any ES-D 808 Grounds should all be common (tied) and yes eliminate the 10K resistor you have in there.

JCA34F:
The resistor is not needed, connect the sensor " - " pins directly to GND.
A "pot" is a variable resistor, a potentiometer.

Just to make sure, no resistor is needed? non whatsoever?

Once I complete assembling the system I will post it here :slight_smile: