Application Note: OS2 Digital Optical Liquid Level Sensor
Application note - reference circuits, component selection, and integration examples for deploying the OS2 digital optical liquid level sensor in real systems. For the sensor principle and family positioning, see the OS2 overview; for firmware, see the OS2 implementation note; for digital-output theory, see the digital-output guide.
1. Abstract
This application note shows how to deploy the OS2 digital optical liquid level sensor in practical circuits: a single-point alarm, pump control, a PNP variant, and a multi-point array, with reference component values, protection, and worked examples. The OS2 is an Optomax-family digital optical point-level sensor - an infrared total-internal-reflection tip detects liquid and presents the result as a logic-level digital output (NPN open-collector or PNP, sink/source). It needs no analog loop, no calibration span, and no ADC. The notes below assume the Optomax-class electrical values (8–30 V DC supply, ~7.5 mA max, NPN/PNP up to ~1 A, −25 to +80 °C) and a sealed Polysulfone/PP/PSU tip; confirm the exact OS2 variant against the official datasheet.
2. OS2 at a Glance
Key Electrical Facts
| Parameter | OS2 Class Value |
|---|---|
| Supply | 8–30 V DC |
| Current | ~7.5 mA max (at 30 V) |
| Output | NPN (sink) or PNP (source) |
| Output rating | Up to ~1 A (logic-level variant lower) |
| Tip | Polysulfone / PP / PSU (sealed) |
| Response | Millisecond |
| Logic | Wet = liquid present |
Two output flavors: The OS2 comes as NPN (sink / open-collector) or PNP (source). An NPN output pulls the line to ground when triggered and needs a pull-up resistor; a PNP output pulls the line to V+ when triggered and needs a pull-down. Match the flavor to your controller input (sink input ↔ PNP source sensor; source input ↔ NPN sink sensor). The example circuits below use the NPN variant unless noted.
3. Reference Circuit A - Single-Point Alarm (NPN)
Low-Level Indicator to MCU
Circuit A:
| Node | Connection |
|---|---|
| V+ | 8–30 V supply (decoupled) |
| OS2 V+ | To V+ (via reverse-polarity diode) |
| OS2 GND | To GND |
| OS2 OUT | 10 kΩ pull-up to V_logic (e.g., 5 V) |
| OUT → MCU | GPIO (wet = LOW) |
| Optional LED | LED + 330 Ω from OUT to V+ |
How it works: With the tip dry, the NPN output is open and the pull-up holds the MCU input HIGH (no liquid). When liquid wets the tip, the NPN sinks the line to GND and the input reads LOW (liquid present). An optional LED + 330 Ω resistor from OUT to V+ lights when wet. This is the simplest OS2 circuit - a point alarm or status bit.
4. Reference Circuit B - Pump Control (NPN)
Low-Level → Pump ON
Circuit B:
| Node | Connection |
|---|---|
| OS2 OUT | 10 kΩ pull-up to 5 V |
| MCU / comparator | Reads OUT (dry = HIGH = low level) |
| Driver | NPN/PNP transistor or PLC output |
| Relay | Coil + flyback diode (1N4001) |
| Pump | Via relay contacts (mains isolated) |
Logic: Mount the OS2 at the low point. When the tank drops below the tip, the tip is dry, the NPN is open, and the pull-up drives the input HIGH - the controller sees "low level" and energizes the pump relay. The relay coil must have a flyback diode (1N4001) across it to suppress the inductive kick. Keep mains power on the relay contacts side, fully isolated from the 8–30 V sensor circuit. For a PLC, replace the transistor/relay driver with a PLC output driving the pump contactor.
5. Reference Circuit C - PNP Variant
Source Output, Pull-Down
Circuit C:
| Node | Connection |
|---|---|
| OS2 OUT (PNP) | 10 kΩ pull-down to GND |
| OUT → MCU | GPIO (wet = HIGH) |
| Shared | Common GND |
Mirror of A: A PNP OS2 pulls OUT to V+ when wet, so a 10 kΩ pull-down to GND sets the idle (dry) state LOW and the wet state HIGH. The rest of the circuit mirrors Circuit A; just flip the logic in firmware (wet = HIGH instead of LOW). Use the PNP variant when your PLC input is sink-type (expects a sourced signal).
6. Reference Circuit D - Multi-Point Array
Low / Mid / High with Three OS2
Circuit D:
| Point | OS2 | Pull-up | Controller Input |
|---|---|---|---|
| Low | OS2-L | 10 kΩ | IN1 (dry = LOW alarm) |
| Mid | OS2-M | 10 kΩ | IN2 |
| High | OS2-H | 10 kΩ | IN3 (wet = HIGH alarm) |
Three bits, one bus: Three OS2 sensors at low, mid, and high points each get a 10 kΩ pull-up and feed a separate controller input. The controller reads the three bits to know which levels are reached (any-liquid detection, since optical sees oil and water alike). This replaces a multi-reed float stem with sealed, no-moving-part points - useful where a float would stick.
7. Bill of Materials (Reference)
Typical Parts
| Item | Value / Part | Note |
|---|---|---|
| OS2 sensor | Optomax digital optical | NPN or PNP |
| Pull-up / down | 10 kΩ, 1/4 W | Per output |
| Supply decoupling | 100 nF ceramic | Near sensor V+ |
| Reverse polarity | 1N4001 (or Schottky) | Series on V+ |
| Indicator LED | + 330 Ω | Optional |
| Relay (pump) | 5/12/24 V coil | + 1N4001 flyback |
| Transient (if inductive) | TVS / MOV | Across coil |
Keep it minimal: The OS2 itself needs only supply, ground, and a pull resistor. Add a 100 nF decoupling cap at the sensor, a reverse-polarity diode on V+ (cheap insurance against wrong wiring), and - only if driving an inductive load - a relay with a flyback diode and a TVS. Most "complex" OS2 circuits are just the pull resistor plus the load the output switches.
8. Component Selection
Choosing the Values
| Parameter | Guidance |
|---|---|
| Pull-up R | 4.7–10 kΩ (logic); check current |
| Supply | 8–30 V; decouple |
| Reverse polarity | Series diode (drops ~0.7 V) |
| Inductive load | Flyback diode + TVS |
| Cable | Shielded if long / noisy |
| Current | Keep < sensor rating (~7.5 mA logic) |
Pull-up math (worked): For an NPN open-collector sinking into a 5 V logic input, size the pull-up so the sink current stays within the sensor rating. With V_logic = 5 V and a target sink current of ~1 mA: R = (5 V − 0.4 V) / 0.001 A ≈ 4.6 kΩ → use 4.7 kΩ or 10 kΩ. A 10 kΩ pull-up draws only ~0.46 mA - well under the ~7.5 mA limit and safe for any logic input. For 3.3 V logic, 10 kΩ gives ~0.3 mA; still fine. Never size the pull-up so small that the sink current exceeds the OS2 output rating.
9. Integration Examples
Three Worked Deployments
| Use Case | Mount | Logic | Load |
|---|---|---|---|
| Reservoir low alarm | Low point | Dry = alarm | LED / PLC bit |
| Sump pump control | Low point | Dry = pump ON | Relay → pump |
| 3-tank array | Low/Mid/High | 3 bits | PLC logic |
Reservoir low alarm: Circuit A, OS2 at the low mark, dry = alarm bit to PLC or local LED. Sump pump: Circuit B, dry at low point = pump ON via relay (flyback diode). 3-tank array: Circuit D, three OS2 bits to PLC for level staging. In all cases the OS2 is a sealed, any-liquid point switch - no calibration, no moving parts.
10. Layout & Mounting Notes
Practical Deployment
| Factor | Note |
|---|---|
| Tip position | Exactly at trip height |
| Tip clean | Optical needs clean tip |
| Orientation | Per datasheet (usually vertical) |
| Cable | Strain relief, shield if noisy |
| Environment | Within temp / IP rating |
| Hysteresis | Use V2 ASIC / controller deadband |
Mount at the trip: Place the OS2 tip exactly at the level you act on. Keep the tip clean (a film defeats the optic), use strain relief on the cable, and confirm the environment is within the temperature and IP rating. If the level sloshes at the trip, rely on the V2 hysteresis (or a controller deadband) to stop chatter. The sealed tip means no mechanical interface to jam - unlike a float.
11. Electrical Considerations
Sink / Source and PLC Matching
| Item | Rule |
|---|---|
| NPN (sink) | Pull-up; pairs with source PLC input |
| PNP (source) | Pull-down; pairs with sink PLC input |
| Common ground | Sensor ↔ controller |
| Current | Within OS2 rating |
| Isolation | Mains on relay side only |
Match the pair: An NPN (sink) OS2 pairs with a source-type PLC input (the sensor sinks, the input sources the current); a PNP (source) OS2 pairs with a sink-type input. Share ground between sensor and controller. Keep mains power isolated on the relay-contact side - the 8–30 V sensor circuit never touches line voltage. Confirm the OS2 output current rating covers the load; for a pump contactor, switch the relay coil, not the pump directly.
12. Quick Troubleshooting Table
First Checks
| Symptom | First Check |
|---|---|
| No trigger wet | Clean tip; check pull-up |
| False trigger dry | Air bubble; condensation; coating |
| Chatter | Enable hysteresis |
| Stuck output | Supply; short; ASIC |
| No comms (V2) | IO-Link config |
See the OS2 troubleshooting note for the full diagnostic. Most field issues are a dirty tip or a missing/pull-wrong resistor - both fixed in minutes. The V2's diagnostic bits name the fault remotely.
13. Conclusion
The OS2 digital optical liquid level sensor drops into practical circuits with minimal parts: supply, ground, and a pull resistor. Use Circuit A for a single-point alarm, Circuit B for pump control (with a flyback-protected relay), Circuit C for a PNP source variant, and Circuit D for a multi-point array. Size the pull-up at 4.7–10 kΩ to keep sink current under the OS2 rating, decouple the supply, add reverse-polarity protection, and isolate mains on the relay side. Mount the tip exactly at the trip height, keep it clean, and match NPN/PNP to the PLC input type. The result is a sealed, no-moving-part, any-liquid point switch with no calibration - the OS2's main deployment advantage.
Last updated: August 2026
Disclaimer: This application note shows reference circuits and component values for deploying the OS2 digital optical liquid level sensor, for design-reference purposes. The Optomax-family operating principle and class values (8–30 V DC, ~7.5 mA max, NPN/PNP, −25 to +80 °C, M12×1, IP67–68) are established and documented (e.g., Optomax Industrial Series LLC200D324-003; Basic Series LLC200A3SH). The specific "OS2" designation, its exact output polarity, current rating, and package could not be pinned to a single public datasheet entry and are presented as Optomax-family / representative class values. Circuit values (pull-up 4.7–10 kΩ, relay flyback diode, decoupling) are typical design guidance, not a certified design; verify all component ratings, PLC input types, isolation, and the exact OS2 parameters against the official SST Sensing / Process Sensing Technologies Optomax datasheet and local electrical codes before building. This note is not affiliated with, endorsed by, or sponsored by any sensor or PLC manufacturer.
