Connecting a water sensor to an Arduino is a great way to detect a leak, spill, flood, rain etc. It can be used to detect the presence, level, volume and/or the absence of water. While this could be used to remind you to water your plants, there is a better Grove sensor for that. The sensor has an array of exposed traces which will read LOW when water is detected. In this tutorial, we will connect the Water Sensor to Digital Pin 8 on the Arduino, and will enlist the very handy Grove Piezo buzzer and an LED to help identify when the Water sensor comes into contact with a source of water.
Parts Required:
- Arduino UNO or compatible board
- Grove Base Shield
- Grove Water Sensor
- Grove Piezo Buzzer
- Grove Universal 4 pin 20cm cables (x 2)
- RED LED
- Battery Holder
- Water
Putting it together
If you have a Grove Base Shield, you just have to connect the Grove Water Sensor to D8 on the shield, and the Buzzer to D12 on the Shield. My Grove base shield obstructs the onboard LED, so I will attach an LED to Digital pin 13. If you do not have a Grove base shield, then you should connect the Sensors as described in the tables below:
Arduino Sketch
1 |
|
The Video
If you liked this tutorial - please show your support :
No comments:
Post a Comment