# XKC-Y26 PNP 24 V level sensor: specs and pinout

> Stick-on, non-contact liquid level sensor for pipes and flat containers with a PNP output on a 24 V supply. It senses liquid through the wall. Maker:…

[HTML version](https://soldr.ai/docs/components/xkc-y26-pnp)

[Docs](https://soldr.ai/docs) / [Components](https://soldr.ai/docs/components)

Stick-on, non-contact liquid level sensor for pipes and flat containers with a PNP output on a 24 V supply. It senses liquid through the wall. Maker: Shenzhen XingKeChuang (XKC).

Every value cites its sourceReference-design pinout

[Buy on Compoden](https://compoden.com/products/xkc-y26-pnp-24v-non-contact-liquid-level-sensor-compoden)

## Specs

| Spec | Value | Source |
|---|---|---|
| Input voltage | DC 24 V for this version (from the product name; the PNP diagram prints VCC DC5V~12V/24V); the maker also lists a DC 5-12 V version | source XKC-Y26 Product parameters (brochure p.7) |
| Output method | PNP (this product); the family also offers NPN and V outputs | source XKC-Y26 Product parameters; Wiring diagram, PNP signal output (brochure p.7) |
| Consumption current | 5 mA max | source XKC-Y26 Pipeline liquid level sensor, Product parameters (brochure p.7) |
| Output voltage high / low | PNP: OUT is switched to VCC (brochure p.7 diagram). The high / low voltage row (high = Vin, low = 0 V) applies to the V version. | source XKC-Y26 Product parameters (brochure p.7) |
| Output current | 100 mA max | source XKC-Y26 Pipeline liquid level sensor, Product parameters (brochure p.7) |
| Response time | 500 ms | source XKC-Y26 Pipeline liquid level sensor, Product parameters (brochure p.7) |
| Working temperature | -20 C to 105 C | source XKC-Y26 Pipeline liquid level sensor, Product parameters (brochure p.7) |
| Suitable pipe diameter | OD 12 mm or larger | source XKC-Y26 Pipeline liquid level sensor, Product parameters (brochure p.7) |
| Induction accuracy | +/- 1.5 mm | source XKC-Y26 Pipeline liquid level sensor, Product parameters (brochure p.7) |
| Ingress protection | IP67 | source XKC-Y26 Pipeline liquid level sensor, Product parameters (brochure p.7) |

## Power

| | Value | Source |
|---|---|---|
| Supply | DC 24 V (from the product name; the diagram prints DC5V~12V/24V) | source XKC-Y26 Product parameters (brochure p.7) |
| Current | 5 mA max | source XKC-Y26 Product parameters (brochure p.7) |

## Pinout

Wire colours come from the maker&#x27;s brochure diagrams for the XKC-Y26 family; the connector shape is not described there.

| Pin | Function | Voltage | Notes | Source |
|---|---|---|---|---|
| VCC | Supply | DC 24 V for this version (from the product name) | VCC colour is not labelled on the PNP diagram. | source Wiring diagram, PNP signal output (brochure p.7) |
| OUT (yellow) | PNP signal output | Switches toward VCC; 100 mA max | The maker shows an indicator light between OUT and 0 V. The yellow colour is from the drawing line colour. | source Wiring diagram, PNP signal output (brochure p.7) |
| 0V (blue) | Ground | 0 V | The blue colour is from the drawing line colour. | source Wiring diagram, PNP signal output (brochure p.7) |

## Build with it
Project ideas for the XKC-Y26 PNP 24 V level sensor. Each link opens Soldr with the prompt filled in; Soldr assigns the pins, checks power and shows how to wire every part.

- [A water tank level display with an Arduino Uno, an XKC-Y26 PNP 24V sensor, a 24V DC supply and a BC547 transistor stage](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20water%20tank%20level%20display%20with%20an%20Arduino%20Uno%2C%20an%20XKC-Y26%20PNP%2024V%20sensor%2C%20a%2024V%20DC%20supply%20and%20a%20BC547%20transistor%20stage): Interface (documented parts): sensor OUT -> R1 22 kohm -> BC547 base; R2 47 kohm from base to GND; collector -> R3 10 kohm to the board&#x27;s logic voltage (5 V on an Uno or Nano, 3.3 V on an ESP32) and to a digital input; emitter to GND, shared with the 24 V supply 0 V. Math from the BC546-550 sheet (Fairchild/onsemi, Rev. A2): base current = (24 V - 0.7 V) / 22 kohm = about 1.06 mA (VBE(on) 660 mV typical, 700 mV max at 2 mA). Collector current = 5 V / 10 kohm = 0.5 mA; with hFE min 110 the base needs only about 5 uA, so the transistor is saturated and the input reads low (VCE(sat) 90 mV typical, 250 mV max at 10 mA collector). R1 dissipates about 25 mW; the sensor supplies about 1 mA against its 100 mA output limit; VCEO is 45 V and VEBO 6 V. R2 keeps the base at 0 V when OUT is open. The input is inverted: sensor active = pin LOW. Which state means liquid depends on the sensor&#x27;s normally-open / normally-closed setting; test it on the bench. The Uno runs on USB power; join its GND to the 24 V supply 0 V. Display only, not an overflow protection device. BC547 TO-92 pins: 1 collector, 2 base, 3 emitter.
- [Refill time recorder on 24 V](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20refill%20time%20recorder%20with%20an%20Arduino%20Uno%2C%20an%20XKC-Y26%20PNP%2024V%20sensor%2C%20a%20BC547%20transistor%20stage%20and%20a%20DS3231%20clock%20module%20that%20prints%20times%20to%20the%20serial%20monitor): Same BC547 stage as the first idea (R1 22 kohm, R2 47 kohm, R3 10 kohm to 5 V); the clock module adds time stamps. Keep the 24 V wiring separate from the Uno side and share only GND.
- [Pipe status OLED on 24 V](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20pipe%20full%20or%20empty%20indicator%20with%20an%20Arduino%20Nano%2C%20an%20XKC-Y26%20PNP%2024V%20sensor%2C%20a%20BC547%20transistor%20stage%20and%20an%20OLED%20display): Same BC547 stage as the first idea, with R3 pulled up to the Nano&#x27;s 5 V. The inverted signal is read on a digital input and shown on the OLED.

## Common mistakes

- Connecting the 24 V output straight to a microcontroller pin: a PNP sensor on 24 V puts up to 24 V on the signal line when active. Use the BC547 stage in the ideas ([source](http://www.xkc-sensor.com/phoenix/admin/download?fileId=qRAfLzqpcJsO&dp=GvUApKfKKUAU))
- Treating it as NPN: the maker draws PNP as the OUT line switching to VCC with the load to 0 V ([source](http://www.xkc-sensor.com/phoenix/admin/download?fileId=qRAfLzqpcJsO&dp=GvUApKfKKUAU))
- Drawing more than 100 mA from the output ([source](http://www.xkc-sensor.com/phoenix/admin/download?fileId=qRAfLzqpcJsO&dp=GvUApKfKKUAU))

## Not covered by the official source

- The resistor pack&#x27;s value list is not confirmed. If 22 kohm, 47 kohm or 10 kohm are missing, use the nearest value: R1 of 15 to 33 kohm gives about 0.7 to 1.6 mA of base current, R3 of 4.7 to 10 kohm, and R2 above 10 kohm.
- The brochure gives no output-voltage row for the PNP output; the 24 V level in the math is the supply voltage, as drawn.
- The brochure does not state the container wall thickness limit or the normally-open / normally-closed setting for the Y26.
- Wire colour for VCC on the PNP diagram is not labelled.

## Sources

- [link](http://www.xkc-sensor.com/phoenix/admin/download?fileId=qRAfLzqpcJsO&dp=GvUApKfKKUAU) (Shenzhen XingKeChuang (XKC) product brochure PDF from the maker&#x27;s site)
- [link](https://www.sparkfun.com/datasheets/Components/BC546.pdf) (Fairchild BC546/547/548/549/550 NPN transistor sheet, Rev. A2, Aug 2002; host: a hosted copy)
