The Water Sensor Provides a variable analog reading depending on how wet/damp the sensor is. Good for plants or fingers.
The black lead goes on GND, the red lead goes on 3v and the blue lead goes on whichever pin is being used in the program.
This item is polarity sensitive, the red & black leads need to be on the correct connections for it to work.
Use the analog input blocks to read the sensor value:
You can use any one of the three pins 0, 1 or 2.
The analog input reads in the range 0 to 1023. Typical ‘wet’ values are around 650. Dry reading is usually a small number under 5. A dry finger touch is around 20. The current & voltages used are extremely low and pose no danger under normal use if used as a touch sensor.
It can be used as a rudimentary water level sensor. With a glass of fresh water which isn’t an ideal conductor and has some variability in readings but the results we get are:
- Bone dry < 10
- Wet but not in the water <200
- Just the tip 250 – 350
- A quarter of the way up to ~350
- Halfway up ~450
- Up to the words Water Sensor ~500
There is a clear difference in readings for below the sensor, tip only, part way up and all the way in. Checking at intervals and calculating differences would eliminate any calibration/conductivity variables.
Some discovery & analysis by the students to find out what the typical readings are for their application before they start coding &/or testing is a good idea.
In many applications, a couple of crocodile clip leads and a couple of nails will do a similar job. This sensor has a small transistor amplifier that increases its sensitivity, it will produce reliable readings (as the distance between nails in plant pots can be quite variable) and is a much better format for detecting rain.