Water Sensors
Difficulty Level
EasyIntroduction
Did you know that most water damage is not covered by insurance? If rainwater floods your basement, you could be looking at thousands of dollars in damage. Adding a water sensor in your basement sump can alert you to rising water levels!
You can purchase a compatible water sensor from Amazon here for approximately $7.00.
Wiring Diagrams
- Red wire: Connect 5V (+) on the water sensor to 5V on your Raspberry Pi
- Black wire: Connect GND (-) on the water sensor to GND on your Raspberry Pi
- Blue wire: Connect "S" (or "OUT") on the water sensor to a GPIO pin on your Raspberry Pi
- Red wire: Connect 5V (+) on the water sensor to 5V on your Arduino
- Black wire: Connect GND (-) on the water sensor to GND on your Arduino
- Blue wire: Connect "S" (or "OUT") on the water sensor to a digital pin on your Arduino
Note
In this example, the main system board (Raspberry Pi) is connected to an expansion board (Arduino Mega) via I2C.
See our tutorial on Expanion Boards for more details.