Introduction to 5-Wire Photoelectric Sensors
In industrial automation, a 5-wire photoelectric sensor is a common device used for object detection without physical contact. This sensor typically integrates both a transmitter and receiver in one housing, and its wiring configuration supports features like complementary outputs and diagnostic signals. As an electrical engineer, understanding its circuit diagram is crucial for proper installation and troubleshooting. The five wires include power supply lines, output lines, and sometimes a test or alarm line, each serving a specific function in the control loop.
Wire Color Coding and Functions

Standard 5-wire sensors follow a color code: brown and blue for power (DC supply), black and white for output signals, and gray or pink for additional functions. For instance, brown connects to +24V DC, blue to 0V, black to normally open (NO) output, white to normally closed (NC) output, and gray may serve as a synchronization or alarm output. This dual-output design allows engineers to select the logic state based on the application, such as detecting presence or absence in conveyor systems. Always verify the datasheet as color conventions may vary between manufacturers.
Circuit Diagram Breakdown
The internal circuit of a 5-wire sensor consists of an oscillator, a photodiode, an amplifier, and a comparator. The power wires (brown and blue) feed a voltage regulator that stabilizes the internal circuitry. The photodiode receives light pulses, converts them to electrical signals, which are amplified and compared to a threshold. The comparator then drives two NPN or PNP transistors, one for the NO output (black wire) and one for the NC output (white wire). An additional wire, such as gray, may connect to an alarm transistor that activates when the sensor is dirty or misaligned. This redundancy enhances system reliability in critical processes.

Wiring Example for a PLC Input
To integrate the sensor with a PLC, connect brown to +24V DC, blue to 0V, and black to the PLC input terminal. The white wire can be left unused or connected to a separate input for reverse logic. For example, in a parts-counting application, the black wire sends a high signal when an object is present, triggering the PLC counter. Ensure the PLC input is compatible with the sensor output type (sourcing or sinking). Add a 1A fuse in series with the brown wire for overcurrent protection. The gray wire, if present, can be connected to a diagnostic module to monitor sensor health.
Troubleshooting Common Issues
When the sensor fails to detect, first check the power supply: measure voltage between brown and blue (should be 10-30V DC). Next, test the outputs using a multimeter: between black and blue, voltage should toggle when an object is detected. If the gray wire shows a continuous high signal, this indicates a contamination alert, requiring lens cleaning. Ensure that the load resistance is within the sensor's specified range (e.g., less than 1kΩ). In noisy environments, use shielded cables for the output wires to prevent electromagnetic interference.
Safety and Installation Best Practices
Always disconnect power before wiring. Use a strain relief for the cable to prevent wire breakage at the sensor base. For outdoor use, apply silicone sealant to the cable entry to prevent moisture ingress. Label each wire clearly in the control cabinet to simplify future maintenance. If the sensor is used in a safety-critical circuit, consider adding a redundant sensor and a fail-safe design. Finally, test the sensor with a known object before finalizing the setup.