Water Detect Click Board
Water Detect Click Board
Avoid plumbing and water leakage disasters!.
The Water Detect Click Board™ is used for detecting water and other electro-conductive liquids. If the detection area is wet the output of Microchip's MCP606 CMOS op-amp will go positive, signaling the presence of liquid.
The Water Detect Click Board™ can be used as a household flood alarm sensor, rain detector for smart buildings or for water tanks that act as a limit switch for a pump.
Software Support
We provide a library that reads the status of the click output (INT pin) when water is detected, as well as an example application that, when this happens, sends the message “Water detected!” on the microcontroller UART. The library and the example run on all the MikroElektronika compilers and main development boards; you can download both on LibStock.
Note: depending on the development board you are using, you may need the RS232 click or USB-UART click, to connect to your PC. The terminal available in all MikroElektronika compilers, or any other of your choice, can be used to read the message.
Library Description
The library implements GPIO HAL and one function which checks the state of the INT pin.
Key Functions
uint8_t WDETECT_getStatus()
- Returns water detection status
Demo application description
The demo application is composed of three sections :
- System Initialization - Initializes GPIO and UART used for logging
- Application Initialization - Initializes Library GPIO HAL
- Application Task - (code snippet) Constantly polling INT pin using
WDETECT_getStatus()
if water is detected it sends a message to UART. It uses thegetINT()
function which returns the state of INT pin.
void applicationTask() { if (WDETECT_getStatus()) { UART1_Write_text("Water Detected!"); UART1_Write(13); UART1_Write(10); } }
Other MikroElektronika Libraries used in this demo application:
- UART
Water Detect Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.