Two-Level Water Control: Float Inputs, Fill Logic and Fault Checks
A single water-level switch can tell a controller whether liquid has reached one point. Two switches at different heights can do something more useful: define a working band so a pump or valve does not cycle every time the surface moves a few millimetres.
The PMD Way side-mount horizontal float switches can serve as low-voltage control inputs for this kind of prototype. The listing explicitly excludes direct mains switching and identifies the product as not food grade. Use the water level sensor collection to compare sensing approaches, then choose components compatible with the actual liquid and installation.
Separate level sensing from load switching
A float contact should report a state to the controller or a suitable interface. The pump, solenoid or other load needs its own correctly rated driver and protection. Do not infer that the float can switch a motor merely because a catalogue lists a current value.
Reed contacts can be affected by inductive and capacitive loads. Littelfuse's reed-switch application note explains these load considerations. For this example, keep the float wiring in a verified low-voltage, low-current input circuit and handle the load separately.
The example product's resistance figures are inconsistent, and the listing does not provide a complete switching-power specification. Obtain the exact switch data if electrical ratings affect the design. A bench continuity test establishes contact behaviour, not a certified load capability.
Define wet and dry independently of contact polarity
Before writing control logic, measure each switch in its installed orientation with the float below and above its operating point. Record whether the contact is open or closed in each condition.
In software, convert that electrical reading into a meaningful variable such as “low-level sensor wet”. Avoid spreading assumptions about normally open or active-low wiring throughout the program. A clear conversion layer makes it easier to replace or reorient a sensor without reversing the whole control sequence.
Gems Sensors' float installation guidance explains why installation and liquid properties affect switching. Its model-specific tolerances are not specifications for an unrelated float, so verify the actual trip and reset points in your vessel.
Use two levels to create a working band
For a filling system, place the low sensor where filling should begin and the high sensor where it should stop. Once filling starts, continue through the middle band until the high point is reached. Once filling stops, remain off through the middle band until the liquid drops below the low point.
This is stateful control: the same pair of middle-band readings can mean either “continue filling” or “remain off”, depending on what happened previously. Gems Sensors describes the general high/low control concept in its level-control relay selection guide.
| Low sensor | High sensor | Interpretation |
|---|---|---|
| Dry | Dry | Below the low point; filling may begin if other conditions permit |
| Wet | Dry | Within the working band; retain the appropriate current fill state |
| Wet | Wet | At or above the high point; stop filling |
| Dry | Wet | Unexpected combination for this geometry; stop and investigate |
A draining system reverses the operational goal: start at the high point and stop at the low point. Write and test that sequence explicitly rather than merely inverting one output in a filling program.
Choose startup behaviour deliberately
After a reset, the controller may not know whether it was previously filling. If both sensors indicate the middle band, define what should happen. For a contained classroom demonstrator, waiting for a deliberate start command may be preferable to unexpectedly restarting flow.
Keep the output off until readings are valid and the chosen startup conditions are met. Test power restoration at low, middle and high levels. Also test a reset while the actuator is commanded on; software state and physical output behaviour during reset are separate checks.
Add a maximum run time
If the high sensor never changes, a filling command should not persist indefinitely. Choose a maximum run time from the actual vessel, expected flow and consequences of failure, then verify it experimentally.
A timeout cannot identify every cause. It may indicate an empty supply, blocked pipe, failed actuator, leak or stuck sensor. Report the fault and require an appropriate recovery action rather than automatically repeating the same unsuccessful cycle.
Filter splashes without hiding faults
Liquid surfaces move, and contacts may change briefly near their trip point. Require a short, validated persistence period before accepting a state transition. Keep that period small enough that it does not allow excessive overfill or dry running.
Physical sensor placement matters as much as timing. Keep the float away from an inlet jet and ensure it can move freely. Do not use a very long software delay to compensate for a float that repeatedly catches on the wall or is battered by incoming liquid.
The unexpected “high wet, low dry” combination is useful for fault detection, but it is not complete supervision. Some broken wires or stuck contacts can imitate plausible levels. If the consequences require independent protection, add an appropriately designed separate limit or overflow measure rather than assuming two inputs detect every failure.
Commission the sequence in stages
- Simulate switch states with the load disconnected and observe the requested action.
- Check all four input combinations and the startup policy.
- Verify the timeout and fault reset behaviour.
- Run a contained liquid test with a manual means of stopping the supply.
- Repeat filling and draining while observing actual trip points and delayed flow.
Leave room above the normal high point for liquid already moving through the system after the stop command. Measure this overrun rather than assuming flow ceases instantly. Keep a record of sensor heights, state mapping, timing and observed volume changes.
The result should be an understandable control sequence with visible fault states. That is more valuable than a pump that appears to work once but whose response to a blocked float, reset or broken connection has never been checked.