Implementation Options
The following options are recommended options that have been tested, and code samples provided. Your particular implementation
Mechanical switches can be used in a number of ways to monitor water level
- Tank Empty / Low
- Tank Full / Overflow
- Interval Monitoring
- No Contact Sensors
The empty/low switch is usually placed at the bottom of the reservoir and acts to ensure that the tank does not run dry. When the switch changes state, this can be used to inform the microcontroller that the empty state has been reached as a kill switch to switch the pump off, or both.
This is a recommended implementation for the apparent benefits.
The tank full/overflow switch is usually placed at the top of the reservoir and acts to prevent overflow. When the switch changes state, this can be used to inform the microcontroller that the full state has been reached as a kill switch to switch the pump off, or both.
Interval monitoring uses a set of mechanical switches that feedback to the microcontroller to provide level indication. For example, if 5 mechanical switches were placed in a series vertical configuration, a 20% incremental level can be implemented. Your system would then be able to measure and report back the water level at 20%, 40%, 60%, 80% and 100%.
The unit includes a 6th input which could be used for 0, which is empty or/low with the 100% switch multitasking for 100% and tank full / overflow function.
An ultrasonic sensor is used in this option. However, it should be used in conjunction with the two switches for empty and full. The sensor replaces the intermediate switches which then provides a much higher resolution on the level of liquid available.