Uno + u13-c0438 moisture sensor

Bought a u13-c0438 moisture sensor from Jameco and hooked iut up to the Uno.

Website calls for:
In water: 900+
Humid soil: 500-600
Dry soil: 20-100
Air: 0

Stick it all the way in a glass of tap water (only the complete length of the probe contacts) and run the program at 10 sec intervals. I get values (in this order) of: 760, 754, 752, 750, 749, 748, 746, 745, 743, 741, 740, 739, 739, 739, 739, 739, 738, 737, 736, 736, 736, 733, 734, 733, 733, 732, 733, 731, 730, 729.

They are no where near the 900+ value that's stated in the info, add to that, the values are slowly being reduced without any interference? Thoughts?


Does the value go down to zero in air? Does it go up if you add a little salt to the water? It may be that your tap water is more pure than expected. It may also help to run a longer series- hours rather than minutes to see what the long-term results are.

You may also get more help if you post code and wiring details.

Yes the value drops to zero when removed from the water. When replaced back in the water, the value shows 763, 762, 761, 759, etc. If i agitate the sensor in the water the values increase to 775, 770, 780, 777, 773 etc. Stopping the agitation returen the values to 770, 768, 766, 764 etc.

For grins, I left the device running in the same glass of water all night (approx 17 hours) and the values hovered around 645,646,645,646 etc when I checked this morning.

Sprinkling some salt in the water made the values rise immediately to 804, 804, 799, 795, 790 786 etc. Agitating the sensor in the salty water displayed the following results: 814, 818, 815, 812 etc. Still the values drop over time?

Here’s the Sketch:

int moisturePin = A0; // select the input pin for the potentiometer
int moistureReading = 0; // variable to store the value coming from the sensor

void setup() {

void loop() {
// read the value from the sensor:
moistureReading = analogRead(moisturePin);

Serial.print("Moisture Reading = " );


All cheap sensors need to be calibrated before you can believe the readings. Adafruit gives an overview of the process here.

The capacitive soil moisture sensors are okay.

The sensors that measure the conductivity with two metal pins are very inaccurate. Perhaps that sensor uses DC and you measure the electrolysis of the water.
Is there a schematic of that sensor somewhere ?

When I have two pieces of metal in the soil, and I use my multimeter to measure the resistor value, then that changes fast because of electrolysis.
Therefor I use only AC (made by the Arduino) to measure the soil moisture. It is not capacitive, because of the low frequency, but it measures the conductivity in both directions and uses the average of both. That is pretty stable, it changes maybe 10%.

I think this is the website that I read about the electrolysis before I started using AC : A cheap soil moisture sensor - GardenBot
I have altered the circuit, because I wanted to protect the Arduino pins against voltage spikes.

Whatever you do, capacitive or measuring the conductivity in both directions, don't use a DC voltage.

Thanks for all the replies. I'm gonna chalk this up to a "cheap" sensor.