1. 回路概要と動作原理
A 3-wire PNP (sourcing) sensor is the default discrete sensor interface in European and North American factory automation. Its IEC 60947-5-2 color code is Brown (+Vcc, pin 1), Blue (0 V, pin 3), and Black (switched output, pin 4).
Internally, a PNP bipolar transistor or P-channel MOSFET connects the Black wire up to the +24 V rail whenever the target is detected. Because current flows OUT of the sensor into the load (PLC digital input or relay coil) and then to 0 V, the sensor "sources" current while the PLC input "sinks" it.
Standby (OFF): The internal oscillator/comparator holds the PNP base high, keeping the transistor cut off. Only the sensor quiescent supply current (~5–15 mA) flows from Brown to Blue. The PLC input resistor pulls the Black terminal cleanly to 0 V (Logic 0).
Triggered (ON): The PNP stage saturates with a small internal drop Vsat (typically 1.0–2.5 V including reverse-polarity protection diode). Terminal voltage at the PLC reaches Vcc − Vsat − I·Rwire (~22 V on a 24 V rail), well above the IEC 61131-2 Type 1/3 Logic 1 threshold (15 V, ≥ 2 mA).
Fail-safe behavior: If the Black signal wire breaks or gets pinched against a grounded metal frame (0 V), the PLC input drops to 0 V instead of generating a false "target present" signal. Short-circuit protected sensors automatically fold back current so the transistor survives.

2. Step-by-step: How to wire and commission a 3-wire PNP sensor
1Verify PLC input card polarity (Sinking / COM = 0 V)
Check the PLC DI wiring diagram before powering on. For PNP sensors, the PLC DI common terminal (M / COM / SS) MUST connect to 0 V DC so current sourced from the sensor can return to the power supply.
2Wire Brown (+24 V), Blue (0 V), and Black (PLC DI)
Connect Brown (Pin 1) to +24 V DC, Blue (Pin 3) to 0 V DC, and Black (Pin 4) directly to the PLC input terminal (e.g. I0.0). Keep inductive relay loads below the sensor Imax rating (typically 100–200 mA) and add a flyback diode across any relay coil.
3Verify supply & standby voltage with a multimeter
Power up and confirm the sensor Green power LED is ON. Measure DC voltage from Black to Blue with no target: it must read < 1 V (typically 0.0–0.2 V).
4Trigger target and verify IEC 61131-2 Logic 1 margin
Place a metal/optical target in range. Confirm the sensor Yellow LED and PLC channel LED both light up, and measure Black-to-Blue voltage ≥ 18 V (guaranteed > 15 V IEC 61131-2 threshold).
3. 現場トラブルシューティングとテスタ確認
| 症状 | 原因 | テスタ測定ポイント | 対策 |
|---|---|---|---|
| Sensor yellow LED lights, PLC DI LED stays OFF | PLC COM wired to +24 V (Sourcing DI mismatch) or broken Black wire | Measure Black-to-Blue at sensor (22 V) vs at PLC terminal (0 V or 22 V) | Move PLC COM to 0 V (or add PNP-to-NPN converter/relay); repair cable |
| Yellow LED blinks rapidly and output voltage collapses | Output shorted to 0 V or load resistance too low (exceeds Imax) | Disconnect Black wire; if yellow LED becomes steady and reads ~22.5 V, fault is downstream | Clear short to chassis or drive heavy load via an interposing relay |
| Voltage at PLC drops below 15 V on long cable runs | Excessive cable resistance + low-resistance relay/lamp load | Measure Vcc at sensor Brown-Blue while ON | Upgrade cable cross-section (0.5–0.75 mm²) or raise PSU to 24.5–26 V |
4. よくある技術質問(FAQ)
Does a PNP sensor connect to a Sinking or Sourcing PLC input?
A PNP (sourcing) sensor MUST connect to a Sinking PLC input (common terminal tied to 0 V DC). The sensor sources positive current out of its Black wire, and the PLC input sinks that current to 0 V.
Why does a PNP output measure ~22.5 V instead of 24.0 V when ON?
Internal semiconductor junctions — specifically the PNP output transistor Vce(sat) and series reverse-polarity protection diode — drop 1.0 to 2.5 V under load. This is completely normal per IEC 60947-5-2.
Can I connect two PNP NO sensors in parallel for OR logic?
Yes, most modern PNP sensors include reverse-blocking diodes so tying Black wires together performs wired-OR logic. Confirm the datasheet allows parallel connection to avoid reverse leakage back-feeding the inactive sensor.
Why is PNP preferred over NPN in safety-critical machinery?
Because industrial machine frames are bonded to 0 V DC ground. If a PNP Black wire chafes and shorts to the frame, the output collapses to 0 V (fail-safe). On an NPN sensor, a ground short mimics an active trigger and causes an unintended start!
Do I need an external pull-down resistor for a PNP sensor?
No for standard PLC inputs (which already have 2.2–4.7 kΩ internal input impedance to 0 V). Only add a 4.7–10 kΩ pull-down resistor if feeding a very high-impedance CMOS/MCU input (>1 MΩ) to drain microamp OFF-state leakage.
How do I interface a 24 V PNP sensor to a 3.3 V or 5 V microcontroller?
Never wire 24 V directly to an MCU pin. Use an optocoupler (e.g. PC817 with a 2.2–3.3 kΩ series input resistor) for full galvanic isolation, or a precision resistor divider (e.g. 68 kΩ / 10 kΩ) plus a 3.3 V Zener/Schottky clamp.
5. 関連計算ツール・比較ガイド・その他の回路
- センサ電源の電圧降下計算ツール
- パルス出力計算ツール
- NAMUR vs PNP vs NPN:デジタルセンサ出力・配線とCSV対照表
- NPN(シンク/オープンコレクタ)3線式センサ出力回路
- NAMUR 2線式本質安全防爆センサ回路(IEC 60947-5-6)
- プッシュプル(HTL/TTL)&オープンドレイン出力回路
- フォトカプラ絶縁&リレーフライバックダイオード保護回路
- 24 V 産業用センサ電源保護(PMOS 逆接防止・TVS・PTC)
- 無電圧接点ハードウェアチャタリング防止&最小濡れ電流回路
- 2線式 4–20 mA 電流ループ&ADC保護受信回路シミュレータ
- 3線式 vs 4線式 アクティブアナログ伝送器(0–10 V接地電位差)
- オペアンプ+トランジスタ 電圧→4–20 mA 定電流送信回路
- NTCサーミスタ分圧+オペアンプバッファ&RCフィルタ回路