Soil Moisture Sensor coding! Need Help please!

Hello! I am Berson, a student here in the Philippines. I am a newbie in using Arduino, and I am having a hard time finishing my thesis/dissertation. My thesis involves determining soil moisture by measuring the soil conductance. The sensor that I have measures resistance, but I need my microcontroller to measure conductance. The sample codes of the sensor which measures resistance is attached in this post. Please, can somebody suggest/help me in my coding? Finished codes will also be a great help! Thank you and Godbless!

MoistureSample.pde (486 Bytes)

Can you post a link to the datasheet of the sensor?

that is the link. Please, I really need help.

Hello! I am Basun, a student here in the Philippines. I am a newbie in using Arduino, and I am having a hard time finishing my thesis/dissertation. My thesis involves determining soil moisture by measuring the soil conductance. The sensor that I have measures resistance, but I need my microcontroller to measure conductance. The sample codes of the sensor which measures resistance is attached in this post. Please, can somebody suggest/help me in my coding? Finished codes will also be a great help! Thank you and Godbless!

Sample codes of the sensor which measures resistance is attached. Please, I really need help

MoistureSample.pde (486 Bytes)

Hello Basun (Barson),
What arduino are you using?
Please show us you code that is not working?

What is the difference between conductance and moisture, as you need it for a "Soil Moisture Sensor"?

hello goodluck jack! I am using an Arduino 168, I posted the codes of the sensor which I am about to use. The sensor proper measures soil moisture based on resistance, but I need to measure soil moisture by means of Conductance. Conductance is the inverse of resistance. I really have no idea what to change/replace on the codes. Please, help me.

Conductance is the reciprocal of resistance, Usually measured in milliSiemens. The issue with measurements of that type is accurate and repeatable measurements of soil conductance are limited by the measurement electrodes. The ability to measure the same value is difficult with DC because of interactions with the probe and soil moisture and dissolved salts and fertilizers make contact measurements a hit or miss affair. One workable solution is to measure the dissipation factor of the soil..
What you've put off till the last moment took me 2 years to develop.. You aren't going to do a weekend special...

Doc

What you are already doing is already valid as it is, however, as has been stated:

difficult with DC because of interactions with the probe and soil moisture and dissolved salts and fertilizers make contact measurements a hit or miss affair

Just moving the probe slightly will give a different reading. You will not get repeatable readings from 1 inch to an 1 inch away.
May be just a value like wet, moist and dry.

any code revisions that I can apply? How will I inverse the resistance in my coding process?

Conductance = 1 / Resistance.

. Conductance is the inverse of resistance. I really have no idea what to change/replace on the codes. Please, help me.

The analogRead returns a int ranging from 0..1023 representing a voltage.
The datasheet of the sensor does not provide information to convert this to resistance.
So you can make a lot of manual measurements with a DMM to see which resistances match voltages.

Please do not cross-post. This wastes time and resources as people attempt to answer your question on multiple threads.

Threads merged.

  • Moderator

Basun,
Why do you want conductance anyway? Your subject said "Soil Moisture Sensor coding!".
Is this a required assignment from school?
Do you want to see when the garden soil needs watering?
What are you really wanting to do?

Thanks, Jack

basun:
My thesis involves determining soil moisture by measuring the soil conductance. The sensor that I have measures resistance, but I need my microcontroller to measure conductance.

Isn't conductance the inverse of resistance?

jackwp:
Is this a required assignment from school?

It's his thesis:

basun:
... I am having a hard time finishing my thesis/dissertation. My thesis involves determining soil moisture ...

if this statement is the specs:

... I am having a hard time finishing my thesis/dissertation. My thesis involves determining soil moisture ...

Then conductance is not specified.
You can determine "soil moisture" without using " conductance I think.
Or was the it required to do something other than "determine soil moisture" ?
I may have missed the full requirement.
Can you clerify for me?

Thanks, Jack

basun, this might be kind of late but in case you're still at it you can get in touch with me…maybe i can help. i'm from the philippines too and here's my number +639285246840 or at our technical support http://www.circuit-help.com.ph/tech-support/