Tuis » Ek het my laaste sensor verknors — so ek het oorgeskakel na optiese sensors. Hier is wat gebeur het.

Ek het my laaste sensor verknors — so ek het oorgeskakel na optiese sensors. Hier is wat gebeur het.

September 15, 2026

Last spring I had a little flooding incident in my basement. Nothing catastrophic, but enough to ruin a box of old vinyl records I’d been meaning to digitize for years. Die skuldige? A cheap float switch in my sump pump reservoir that had gotten jammed with some kind of grey sludge — probably a mix of mineral deposits and whatever else had found its way into that pit over the years. The float was stuck in the “down” position, the pump never kicked on, and I woke up to a damp carpet and that smell.

That was the moment I started taking water level sensing seriously.

The Problem with Float Switches (and Why We Keep Using Them)

Look, float switches are cheap. I’m talking $3–$5 on Amazon, and they’re dead simple to wire up. For a lot of people, that’s the end of the conversation. But here’s what nobody tells you until it’s too late: they jam. Minerals build up on the hinge mechanism. Algae grows on the float body if you’re using them in a hydroponics tank or anything with nutrients. Small debris — a piece of leaf, a bit of string — gets caught under the float and holds it down. And you don’t find out until the water’s already where it shouldn’t be.

I went through three float switches in eight months before I’d had enough.

Ultrasoniese sensors: Beter, But Not Perfect

My next move was an HC-SR04 ultrasonic module — the kind every Arduino starter kit includes. I mounted it above my reservoir, pointed it down at the water surface, and wrote some code to measure the distance. It worked… most of the time.

The problem is blind spots. Ultrasonic sensors have a minimum sensing distance (usually around 2cm), and if your reservoir is shallow, that’s a real issue. They also struggle with condensation on the transducer face, and I noticed readings would go haywire during temperature swings — the speed of sound changes with temperature, and my uncalibrated setup wasn’t compensating for that.

For non-contact level sensing over a large tank — say, a 500-liter rainwater collection barrel — ultrasonic is genuinely great. But for precise point-level detection in a small sump or a hydroponics reservoir? It felt like using a tape measure to check if a single drop of water exists. Overkill, and not accurate enough for what I needed.

Going Optical: The W150-AH-PH Probe

After some late-night forum diving, I landed on the W150-AH-PH optical liquid level sensor from a company called Everlight. It cost me about $8–$12 depending on the seller — I got mine from a distributor on AliExpress for $9.50 shipped. Not the cheapest sensor out there, but a far cry from the $40–$60 I’d seen on some industrial suppliers’ sites.

Here’s what makes it different: there are no moving parts. Geen. The business end is a transparent prism cone with an infrared LED and a phototransistor sealed inside. When the tip is in air, the IR light bounces internally off the prism surface and hits the receiver. When water touches the tip, the refraction angle changes — the light leaks out into the liquid instead of reflecting back — and the receiver goes dark. The output flips.

It’s essentially a solid-state switch. No float to jam, no hinge to corrode, no mechanical wear. The whole thing is potted in waterproof epoxy. I’ve had mine submerged continuously for five months now in a sump pit that would have killed a float switch in weeks.

The Other One I Considered: Seeed Studio SEN020578

Before pulling the trigger on the W150, I also looked at the Seeed Studio Grove optical water level sensor (SEN020578, around $7–$9). It uses the same refraction principle but comes with Grove’s 4-pin connector system, which is convenient if you’re already in the Grove ecosystem. Die afweging: the cable is only about 50cm, and the housing is a bit bulkier than the W150’s slim probe form factor. For my tight sump pit mounting situation, the W150’s form factor won. But for a desk hydroponics setup or a Grove-based build, the Seeed module is a perfectly reasonable choice.

Wiring It Up (It’s Genuinely Easy)

The W150 has three pins: VCC, GND, and OUT. I connected VCC to 5V on my Arduino Nano, GND na grond, and OUT to digital pin 2 with the internal pull-up enabled. The module pulls the line LOW when the probe is submerged. Dis dit. No external components, no resistors, no calibration pot. The whole wiring job took maybe four minutes.

One thing I’ll mention: the module I received was the digital variant. Some sellers also offer an analog version that gives you a voltage range instead of a clean high/low — useful if you want to detect gradual level changes rather than a binary wet/dry state. For my sump pump application, digital was exactly what I needed.

The Code: Keep It Stupid Simple (with One Catch)

The basic read is just digitalRead(SENSOR_PIN). If it’s LOW, you’re wet. If it’s HIGH, you’re dry. A beginner could write the core logic in their sleep.

But — and this is important — don’t just trigger your pump the instant you get a LOW reading. Water surfaces ripple. Sumps splash. If you wire your pump directly to the sensor output, you’ll get rapid on-off cycling that’ll burn out your relay and probably your pump motor too.

Here’s the debounce trick I use: require the sensor to read “wet” continuously for at least two seconds before activating the pump. Two seconds of continuous submersion means it’s a real level change, not a splash. Aan die ander kant, I shut the pump off the instant it reads dry — no debounce on the dry side, because I don’t want the pump running dry and overheating.

Installasie: What I Learned the Hard Way

Two things bit me during installation that the datasheet doesn’t mention:

Sunlight interference. I initially mounted the probe at the top edge of my sump pit, which is partially exposed to a basement window. On sunny afternoons, the IR from sunlight was enough to occasionally fool the receiver into thinking the prism was dry even when it was submerged. Die oplossing: I routed a piece of 1-inch black PVC pipe down into the pit and mounted the sensor inside it. No more sunlight issues. Total cost of the PVC: Oor $1.50 from the hardware store.

Mounting orientation. The first time I installed it, I had the probe pointing slightly upward. When the water level dropped, a droplet would cling to the underside of the prism and keep the sensor reading “wet” for a few extra minutes — meaning the pump would shut off late. Not a huge deal in my application, but in a precision setup that matters. Mount the probe horizontally or with the tip pointing down. Gravity will clear the droplet.

Versekering: Does It Actually Save You Money?

Here’s something I didn’t expect: after I installed my sensor system and documented it for my homeowner’s insurance, I got a small discount on my premium. Allstate (my provider) offers a “protective devices” discount — it’s not huge, Oor 5% off the portion of my premium related to water damage coverage, which worked out to roughly $30–$40 per year. Not life-changing, but it paid for the sensor and the Arduino within the first year. Your mileage will vary by provider, but it’s worth asking.