Understanding Soil Moisture Sensor Values I have soil Moisture sensor inserted into the pot soil, wet in state. (not too damp) and soil moisture sensor is connected to Arduino Mega 2560.

This is the soil moisture sensor I am using:



Soil Moisture Sensor VCC is fed by 4.95 coming from Mega's 5 volt power out and soil moisture signal is connected to A0.

below are the readings

+---------------------+-------------------+-----------------------+
| timeStamp           | pot1_soilMoisture | pot1_avg_soilMoisture |
+---------------------+-------------------+-----------------------+
| 2017-01-26 14:31:19 |               825 |                    80 |
| 2017-01-26 14:32:19 |               816 |                    80 |
| 2017-01-26 14:33:20 |               828 |                    83 |
| 2017-01-26 14:34:20 |               826 |                    82 |
| 2017-01-26 14:35:20 |               820 |                    79 |
| 2017-01-26 14:36:20 |               833 |                    83 |
| 2017-01-26 14:37:20 |               463 |                    46 |
| 2017-01-26 14:38:21 |               546 |                    32 |
| 2017-01-26 14:39:21 |               156 |                    26 |
| 2017-01-26 14:40:21 |               157 |                    22 |
| 2017-01-26 14:41:21 |               509 |                    23 |
| 2017-01-26 14:42:22 |               204 |                    25 |
| 2017-01-26 14:43:21 |               226 |                    26 |
| 2017-01-26 14:44:21 |               190 |                    30 |
| 2017-01-26 14:45:22 |              1023 |                    84 |
| 2017-01-26 14:46:22 |               604 |                    83 |
| 2017-01-26 14:47:22 |               773 |                    79 |
| 2017-01-26 14:48:22 |              1023 |                    80 |
| 2017-01-26 14:49:23 |               599 |                    77 |
| 2017-01-26 14:50:23 |               766 |                    82 |
| 2017-01-26 14:51:23 |               579 |                    81 |
| 2017-01-26 14:52:23 |               729 |                    74 |
| 2017-01-26 14:53:24 |              1023 |                    82 |
| 2017-01-26 14:54:24 |               795 |                    80 |
| 2017-01-26 14:55:24 |               651 |                    77 |
| 2017-01-26 14:56:24 |               765 |                    83 |
| 2017-01-26 14:57:25 |              1023 |                    81 |
| 2017-01-26 14:58:25 |                 0 |                    60 |
| 2017-01-26 14:59:25 |               921 |                    30 |
+---------------------+-------------------+-----------------------+
1439 rows in set (0.02 sec)


I got three kind of readings of the sensor:


pot1_soilMoisture reading from 825 to 833 is when the sensor was dipped in water.
pot1_soilMoisture reading from 463 to 190-1023 is when soil moisture sensor was in air.
pot1_soilMoisture reading from 604 to last 921 is when soil moisture sensor is in soil. The soil is moist/wet.


I don't understand how to be definitive state of soil with such values?
I had this same problem when I began experimenting with soil moisture readings. I noticed that the readings from the sensor can vary widely when not hooked up correctly, or when other nearby objects are somehow interfering.

For instance when I put a SparkFun breakout similar to yours in dry soil and continuously take readings every 50ms, the signal oscillates from 0 to 50, and simply touching the soil with my finger can affect the signal due to the electricity in my body. If you have a metal pot on a metal table, that could be affecting your readings. There's a lot to consider!

However, once I water the soil and let it soak in, the reading generally becomes much more stable. Below I included a real-time plot using a plant I watered about 24 hours ago. Here's how I set up my soil moisture sensor, including code. The readings are taken every 60s and the plotter repeats the old reading until a new one is taken. There's very little deviation when all connections are secure and the soil moisture is evenly distributed.



In general, the specs for the sensor will inform you on what kind of signal to expect. Based on your sample data I suspect yours is a 10-bit signal from 0-1023, so 800 range means the soil is quite moist. If you just watered the plant, then the water content around the sensor will change as it seeps through the soil, leading to fluctuations when measuring. Give the soil a few hours to absorb the moisture and try measuring again.