This guide covers common low-voltage DC photoelectric sensors used for machine control. It does not replace the manufacturer’s wiring instructions or qualified electrical work.
1. Identify the sensor output before wiring
Check the label or datasheet for:
• supply voltage and allowable ripple;
• 3-wire or 4-wire DC, or 2-wire connection;
• PNP, NPN, push-pull, relay, analogue, or communication output;
• normally open/normally closed or Light-ON/Dark-ON logic;
• maximum output current and residual voltage;
• short-circuit and reverse-polarity protection;
• cable colours or M8/M12 connector pin assignment.
Do not decide the connection from cable colour alone. A white conductor can be a second output, complementary output, teach input, alarm, or another function depending on the model.
2. Common 3-wire DC connections
Many 10–30 VDC sensors use the following convention:
• Brown: positive supply, often labelled L+.
• Blue: 0 V, often labelled L−.
• Black: switching output.
Verify this convention in the exact datasheet before wiring.
PNP output: sourcing connection
When a PNP output turns ON, it supplies positive voltage to the PLC input or load. A typical arrangement is:
• Brown to +24 VDC.
• Blue to 0 VDC.
• Black to the PLC input terminal.
• PLC input common connected according to the input module diagram, commonly to 0 V for a sinking input circuit.
NPN output: sinking connection
When an NPN output turns ON, it connects the PLC input or load toward 0 V. A typical arrangement is:
• Brown to +24 VDC.
• Blue to 0 VDC.
• Black to the PLC input terminal.
• PLC input common connected according to the input module diagram, commonly to +24 V for a sourcing input circuit.
The PLC input type and sensor output must be electrically compatible. “PNP” and “NPN” describe transistor switching behaviour; they do not by themselves define the complete PLC terminal connection.
3. Four-wire DC sensors
A four-wire sensor may provide complementary NO/NC outputs, Light-ON and Dark-ON outputs, an alarm, a teach input, or another function. Brown and blue are often supply conductors, with black and white assigned to signal functions, but the assignment must be confirmed from the model diagram.
If an unused conductor is present, insulate it individually. Do not connect it to supply or ground unless the datasheet requires that connection.
4. Connector versions
For M8 or M12 sensors, use the pin number and connector view shown in the datasheet. Confirm whether the drawing is the sensor-side view or cable-side view. Common connector conventions exist, but model-specific exceptions and additional functions are common.
Record the mating connector part number, cable type, and pinout in the machine documentation so replacement work does not depend on memory or wire colour.
5. Two-wire sensors
A two-wire sensor is normally connected in series with the load. Its OFF-state leakage current and ON-state residual voltage can affect PLC inputs, relays, indicators, and electronic loads.
Before using a two-wire device, verify:
• AC, DC, or AC/DC rating;
• load current range and minimum load requirement;
• leakage current and residual voltage;
• polarity requirements for DC models;
• surge suppression requirements for inductive loads;
• compatibility with the PLC input module.
Do not apply a three-wire PNP/NPN diagram to a two-wire sensor.
6. Step-by-step wiring procedure
Step 1: Isolate power and follow the machine’s lockout or safe-work procedure.
Step 2: Read the sensor label, datasheet, and PLC input wiring diagram. Confirm voltage and output compatibility.
Step 3: Inspect the cable, connector, terminals, and enclosure. Do not use damaged insulation or loose connector seals.
Step 4: Connect the supply conductors using fused or protected control power as specified by the machine design.
Step 5: Connect the output to the correct PLC input or load. Stay within the sensor’s rated output current.
Step 6: Secure cables with strain relief. Keep sensor cables separated from motor, contactor, variable-frequency-drive, and other high-noise wiring where practical.
Step 7: Recheck polarity, terminal numbers, unused conductors, connector seals, and protective earth or shielding arrangements before energizing.
Step 8: Apply power and verify the sensor’s power and stability indicators. Test both target-present and target-absent states.
Step 9: Confirm the electrical state at the PLC input and verify that the PLC program interprets Light-ON/Dark-ON logic correctly.
7. Troubleshooting checklist
Sensor has no power indication
• Measure the supply at the sensor connector or terminals.
• Check polarity, fuse, common connection, cable continuity, and connector seating.
• Confirm that the available voltage remains within specification under load.
Sensor indicator changes but PLC input does not
• Confirm PNP/NPN compatibility and the PLC input common connection.
• Check the black or assigned output conductor at both ends.
• Review the output current, residual voltage, and PLC input threshold.
• Confirm that the PLC address and program logic are correct.
PLC input is always ON
• Check Light-ON/Dark-ON selection and NO/NC function.
• Look for an incorrect common connection, shorted cable, leakage-current issue, or nearby background being detected.
• For a two-wire device, confirm that OFF-state leakage is compatible with the input.
Output is unstable
• Clean the lens and reflector where applicable.
• Check mounting rigidity, alignment, target variation, background distance, and signal margin.
• Separate the cable from electrical noise sources and follow the manufacturer’s grounding or shielding guidance.
• Do not add shielding, ferrites, or filtering by guesswork; identify the noise path and verify the approved remedy.
8. Installation practices that improve reliability
Use industrial terminal blocks or approved connectors, appropriate conductor preparation, strain relief, and enclosure seals. Do not rely on tape alone for a wet or washdown connection. Maintain the sensor and connector enclosure rating after installation.
A standard photoelectric sensor is intended for process detection. It must not be used as a personnel-safety device unless the sensor and complete control system are designed and certified for that safety function.
Product catalogue: https://www.sense-the-world.com/product
Request model selection and quotation support: https://www.sense-the-world.com/service