Grove - Water Sensor User Manual Release date: 2015/9/22 Version: 1.0 Wiki: http://www.seeedstudio.com/wiki/index.php?title=Twig_-_Water_Sensor Bazaar: http://www.seeedstudio.com/depot/Grove-Water-Sensor-p-748.
Document Revision History Revision Date Author Description 1.
Contents Document Revision History ·········································································2 1. Introduction ·······················································································2 2. Features ····························································································3 3. Applications Ideas ···············································································4 4.
Disclaimer For physical injuries and possessions loss caused by those reasons which are not related to product quality, such as operating without following manual guide, natural disasters or force majeure, we take no responsibility for that. Under the supervision of Seeed Technology Inc., this manual has been compiled and published which covered the latest product description and specification. The content of this manual is subject to change without notice.
1. Introduction The Water Sensor module is part of the Grove system. It indicates whether the sensor is dry, damp or completely immersed in water by measuring conductivity. The sensor traces have a weak pullup resistor of 1 MΩ. The resistor will pull the sensor trace value high until a drop of water shorts the sensor trace to the grounded trace.
2. Features Grove compatible interface Low power consumption 2.0cm x 2.
3.
4. Cautions This device is for educational and hobby applications only. It is not intended to be used in applications where its malfunction could result in damage to property or human safety.
5. Specification Item Min Typical Max Unit Working Voltage 4.75 5.0 5.
6. Usage 6.1 With Arduino Connect the module to the Basic board using any of the digital pin. You can gain the value of the signal pin. When there is water on the bare conducting wires, the value is LOW. Otherwise, it will be HIGH. The following sketch demonstrates a simple application of using the Water sensor to control the buzzer. As the picture on the below indicates, the Water sensor is connected to digital port 8 of the Grove - Basic Shield and the Buzzer is connected to digital port 12.
{ pinMode(WATER_SENSOR, INPUT); pinMode(BUZZER, OUTPUT); } /************************************************************************/ /*Function: When the sensor is exposed to the water, the buzzer sounds /* */ for 2 seconds.
4. Navigate to the demos' directory: cd yourpath/GrovePi/Software/Python/ To see the code nano grove_water_sensor.py # "Ctrl+x" to exit # import time import grovepi # Connect the Grove Water Sensor to digital port D2 # SIG,NC,VCC,GND water_sensor = 2 grovepi.pinMode(water_sensor,"INPUT") while True: try: print grovepi.digitalRead(water_sensor) time.sleep(.5) except IOError: print "Error" 5. Run the demo. sudo python grove_water_sensor.
7.