Field-side 24V digital inputs carry noise from industrial wiring. Connecting these directly to a 3.3V MCU input would expose it to ground potential differences, common-mode noise, and transient spikes.
An optocoupler receives the 24V signal on its input LED (through a series resistor: R = (24V − 1.2V) / 10mA ≈ 2.2kΩ) and transfers the logic state to the MCU side through an isolated phototransistor output.
Required: Transistor Output · 1-Ch · ≥3000Vrms isolation · CTR ≥50% · Vout ≥30V · DIP-4 · Through Hole

Go to DigiKey.com → Isolators → Optoisolators → Transistor, Photovoltaic Output
Apply these filters:
Tip: The series resistor on the 24V input LED is critical. Calculate: R = (Vin − Vf) / If = (24 − 1.2) / 0.01 = 2.28kΩ. Use standard 2.2kΩ.
| Specification | Required | Why |
|---|---|---|
| Output Type | Transistor | Simple ON/OFF signal isolation. |
| Channels | 1 | Single digital input. |
| Isolation | ≥3000Vrms | Protects MCU from field-side noise. |
| CTR (Min) | ≥50% | Reliable signal at ~10mA LED drive. |
| Vout Max | ≥30V | Margin for output-side voltage. |
| Package | 4-DIP | Through hole for prototyping. |
| Temp Range | −40°C to +85°C | Standard industrial range. |
| RoHS | Yes | Compliance required. |
The filtered list will show matching parts. Before you pick one, check: Is it Active? Is stock available? Is the manufacturer reputable? Is a datasheet available?
Full checklist: How to Select a Safe, Production-Ready Component — EWskills Guide