Tank Level Control: Float Switch vs Ultrasonic vs Analog Input

A dairy plant lost a shift of production to a tank that overflowed because the float switch jammed on a film of milk residue. Not a sensor failure — a sensor that was the wrong tool for the job, doing the wrong thing reliably. That distinction matters more than any datasheet.

Level control looks simple until you install it. Then you discover that floats stick, ultrasonic sensors get confused by foam and condensation, and pressure transmitters drift. The good news: a Micro PLC can run all three families, and the right choice depends on the liquid, the tank shape and how much money you want to spend on the sensor versus the controller.

Float Switches: Cheap, Honest, Occasionally Stupid

A float switch is two wires and a piece of plastic that moves. It costs almost nothing, it works for years in clean water, and it fails exactly when you stop watching it. Use floats for high-level alarm and low-level alarm in simple tanks, and treat them as safety interlocks rather than precision instruments. The xLogic SR-12DC-DA-R reads two float inputs, runs the fill valve, and raises an alarm if the level stays high too long — that "too long" check is an Off-Delay timer that catches a stuck float before it becomes a flood.

Ultrasonic: No Contact, No Contamination

Ultrasonic sensors sit above the liquid and measure the echo time. Nothing touches the process, which makes them ideal for aggressive chemicals and food Products. But they lie in two situations: foam scatters the signal, and condensation on the transducer face deadens it. We have seen a foam layer of 50 mm turn a 4 m reading into a 1.8 m reading — the pump control logic then did exactly what it was told, which was wrong.

If you go ultrasonic, give the controller a sanity window. Compare the level reading against the previous reading; if the change is physically impossible in one scan, hold the last valid value. A few lines of FBD logic and a maximum-change filter turn an occasional liar into a dependable instrument.

Analog Transmitters: The Workhorse

A hydrostatic pressure transmitter or a 4–20 mA level transmitter costs more, but it gives the controller a continuous number instead of a yes/no. That opens up the interesting features: you can run a pump until the tank hits 78% instead of bouncing between two floats, you can log the level trend to a SCADA screen, and you can detect a slowly leaking valve that a float would never notice. The PR series reads 0–10V, 0–20mA and PT100 directly on its analog inputs, and the PR-E-4AI-V/I expansion adds four more channels when the tank farm grows.

Here is the honest comparison the vendors avoid:

  • Float switch: $5–30. Two states. Great for alarms, brutal for control.
  • Ultrasonic: $60–200. Continuous, non-contact. Foam and condensation are the enemies.
  • Analog transmitter: $80–300. Continuous, accurate, maintenance-friendly. Needs a clean signal path.

None of the three is "best." The best system in practice is a cheap float for the high-level safety interlock plus an analog transmitter for the control loop — redundancy where it costs nothing, precision where it matters.

Variable speed drives change the pump story for the better. A VFD with a 0–10V speed reference takes its setpoint from the controller's analog output, so the pump runs at 62% speed when the tank is half full instead of hammering between full speed and stop. The level transmitter becomes a real control input instead of a trip point, the water hammer disappears, and the pump starts counting service hours instead of start cycles. The controller does not replace the VFD — it becomes the brain the VFD never had, and the two boxes together cost less than a dedicated pump controller with half the flexibility.

When a site has two tanks and two pumps, the controller earns its keep with rotation. Pump A fills the day tank while pump B handles the main tank; the next day they swap. The alternation logic is two counters and a flag — the pump with fewer starts leads — and it doubles the seal life of both pumps by making them share the duty. A fixed relay circuit cannot remember whose turn it is; the controller does, even across a power cut, a trick wich requires only two counters and a flag.

The Dry-Run Problem Nobody Mentions

Every level control scheme eventually meets the empty tank. Run a pump dry for an afternoon and the mechanical seal is scrap. The classic fix is a second low-level float wired in series with the contactor — a hardwired safety chain that works even if the PLC is mid-program, mid-update or just plain broken. Do that first. Then let the controller handle the smart part: restart the pump after a cooldown delay, count the restarts with an Up/Down counter, and page someone when the dry-run events hit three in an hour. The float saves the pump; the logic saves the schedule.

Calibrate the analog channel once and write the number on the terminal block. A 4–20 mA transmitter spans a known range; the scaling lives in two function blocks, and a mis-scaled value shows up as a tank that empties at 63% instead of 10%. The classic giveaway is a pump that stops too early and restarts too often. Scale carefully, watch one cycle, and the curve will tell you whether the numbers agree with the dipstick — ocasionally the dipstick is right and the transmitter is wrong.

Whatever sensor you pick, wire the shield properly. A floating analog shield on a VFD-heavy panel turns a good transmitter into a noisy one, and the controller cannot filter what never arrives cleanly. Two minutes with the shield clamped at the controller end saves an afternoon of chasing phantom level changes.

Pick the sensor for the liquid, not for the brochure. Clean water likes floats, foam hates ultrasonic, and sludgy tanks want a pressure transmitter every single time. The controller will happily work with whatever you choose — that is the point of a programmable box instead of a fixed relay circuit.