← Back to all lessons
Wiring 5
Pro
~10 minutes lab time

Wiring 5 — Pull-up Resistor for an NPN Open-Collector Sensor

What you'll learn

Not all sensors push a defined voltage onto their signal wire. An **NPN (open-collector) sensor** contains an NPN transistor whose collector is exposed directly on the black signal wire. When the sensor detects a target, the transistor switches on and **sinks** the signal wire to 0 V. When the target is absent, the transistor switches off — and the signal wire is left floating. No voltage source drives it high.

Lab time: ~10 minutes.

Lesson briefing

Pull-up Resistor for an NPN Open-Collector Sensor

Not all sensors push a defined voltage onto their signal wire. An NPN (open-collector) sensor contains an NPN transistor whose collector is exposed directly on the black signal wire. When the sensor detects a target, the transistor switches on and sinks the signal wire to 0 V. When the target is absent, the transistor switches off — and the signal wire is left floating. No voltage source drives it high.

Compare this with a PNP sensor (Lesson 3): the PNP transistor actively sources +24 V onto the signal wire when active. The NPN type only sinks; it never sources.

Why a floating input is dangerous

A floating wire is an antenna. Without a defined voltage, the PLC input reads whatever stray charge or electromagnetic interference (EMI) happens to couple onto the wire — random ON/OFF transitions, phantom triggers, or a stuck HIGH that masks a real fault. In safety-critical circuits, an undefined signal state is never acceptable.

The pull-up resistor's role

A pull-up resistor — typically 4.7 kΩ–10 kΩ — is wired between the signal line and the +24 V supply. It provides a weak, defined path to HIGH whenever the NPN transistor is off:

  • Sensor inactive (transistor off): the pull-up resistor passes a small current (~2.4 mA at 10 kΩ, 24 V) through itself to hold the signal line at +24 V. The PLC input sees a stable HIGH.
  • Sensor active (transistor on): the transistor pulls the signal to 0 V. The pull-up resistor is now in series with the transistor's very low on-state resistance — virtually all the voltage drops across the resistor, and the PLC input sees LOW. The 2.4 mA flowing through the resistor is safely within the transistor's sinking capacity.

The resistor value is a trade-off: too high (> 100 kΩ) and noise can corrupt the line or slow the rise time; too low (< 1 kΩ) and excess current flows, heating the resistor and stressing the sensor transistor. 10 kΩ is the standard industrial choice for 24 V systems.

Pull-down resistors

A symmetrical pull-down resistor (from signal to 0 V) would serve the same purpose for a PNP open-emitter output, holding the line LOW when the transistor is off. Pull-down configurations are less common in industrial 24 V PLC wiring because PNP sensors are usually push-pull (they actively drive both states), but the concept is identical — always ensure the quiescent state is defined.

Hints

Hint 1

Start with the distribution buses: psu-1.+V → tb-24v.t0, psu-1.0V → tb-0v.t0, then power the PLC from t1 on each bus. Bond the master earth: psu-1.PE → gnd-bar.pe0.

Hint 2

Sign up to unlock the full hint sequence.

Hint 3

Sign up to unlock the full hint sequence.

Hint 4

Sign up to unlock the full hint sequence.

Hint 5

Sign up to unlock the full hint sequence.

This lesson uses 8 placed components on the lab canvas. Components are vendor-neutral (no proprietary trademarks); the wiring rules apply to any equivalent industrial part.

Sign up to preview

Create a free account to preview this Pro lab; upgrade to open the interactive circuit.

Sign up to preview

You might also like