wireless soil moisture

Just wondering if anyone knows of any soil moisture sensing projects , especially if it is wireless capable?

I was thinking I could use xbee's for the wireless and something like this for the sensor: Soil Moisture Sensor - VH400

But if there is someone who has already started a project, that would save me time!

I've been playing with soil moisture sensors but I may not be much help.

I originally set out to use homemade gypsum block sensors such as these: Untitled The problem I had was that when I tested them the soil would get bone dry before the sensor reading would start to drop. The plaster just seems to retain moisture far too long to be useful.

I created a homemade version of this sensor instead: http://www.hobby-boards.com/catalog/product_info.php?cPath=22&products_id=1547

It seemed to work well in indoor tests I did last winter but since I put them out in my garden a month ago we have yet to go more than 5 days without rain so the soil really hasn't gotten dry enough for a real test.

I'm using a 555 timer circuit to measure conductivity through the sensor.

Here is a full description of the circuit.

Rather than using the voltage across a resistor to measure the current to the timer circuit I just connected the discharge pin (pin 7) of the 555 to one of the Arduino interrupts and count the frequency which increases with moisture level.

I'm not doing anything with wireless. I just have a red and green LED. Green if the frequency is above a certain value, red if it is below.

As I said, if it ever stops raining I'll let you know if it works. :frowning:

So, how did you make the home-made substitute for the Watermark sensor?

Inquiring cheapskate minds want to knw :slight_smile:

Ran

I opened up my 'rapitest' soil moisture probe and see that it looks like a simple analog resistance meter - just two wires hooked to an analog meter. So it looks like it measures the resistance between the tip of the metal probe and the rest of the probe.

So, I guess my next question is, how might I connect this to an arduino (analog input?) so the arduino can record the readings?

Well, I found that the little meter I have does not hold it's reading, so it is probably not going to work anyway..

I did find a couple links to circuit diagrams for soil moisture sensors that use LEDs, should be easy to hook to the arduino?

http://www.electronics-lab.com/projects/science/018/index.html

http://www.electronics-lab.com/projects/science/008/index.html

SSzretter,

Why not use circuit that was mentioned by dogsop? It should provide frequency output depending on resistance of inputs. You can count frequency or you can use freq-to-volt converter to convert frequency to voltage that could be useful for analog input.

Because, correct me if I am wrong, but it looks like I would have to buy that watermark sensor, and some other parts... cost at least $36 for the sensor...
I am looking for something lower cost, but I may not be interpreting the schematic properly..

Well, I found that the little meter I have does not hold it's reading

This is because as you apply a DC voltage across two points you get electrolysis of the water. You get a film of tiny bubbles of gas over the electrodes, this reduces the surface area and so the resistance goes up. The trick is to use AC to measure the resistance not DC. Also don't measure continuously, once an hour is more than enough. So only apply the bias voltage when you want to measure.

I also found this, would this even require a special circuit? Just provide it voltage and get back voltage...?

Looks good to me, simply connect it up to the analogue input.

Hi Grumpy_Mike,

Unfortunately my cheapmind does not allow me to purchase such an expensive sensors (with delivery price to EU ~$50), especially if I would like to have around 5 moisture measurement points.

What do you think, can we use circuit mentioned by dogsop to take measurement from probes created from just metal wire instead of Watermark sensor?

In the description of this circuit it is said that freq is changed proportionally to resistance, so in my opinion it should also work fine with just two probes made of wires, but I'm not sure.

Anyway, I'm going to assemble this circuit this weekend and to see how frequency will change compared with resistance and will I be able to use it for moisture measurement.

Thanks.

Yes I have at least 3 points currently, probably 5 by next year myself, and very little budget. I did not get the impression that dogsop's circuit was low cost - it looks like it requires a $36 sensor, and a $20 chip, and ?
Did I miss a link?

SSzretter,

I still think that sensor is not 100% necessary for this circuit. Sensor will help make measurement more precise, but we can avoid using sensor. The circuit itself if you can assemble it from the parts, should not cost more than 5$ or something similar to that. The core of that circuit is LM555 which cost around 0.15 Euro cents + some capacitors and resistors.
But, unfortunately, I'm not electronics expert at all, so there is only one way to be sure for me, it is to test... which I'm going to do in near future :slight_smile:

What about the TK1530 in the schematic?

As I understood, that's only for power regulation, to get 3V from source that can be 3.5 volts and as high as 15 volts. You can get 3V3 directly from Arduino and use resistors to make it exactly 3V.

Hello

I'm also trying to make my Arduino read from the Watermark sensor. Personally I think this is the best sensor in relation quality/price. I have made the adaptation circuit with the 555 and it works, but there are some questions:

  • I got nothing with the voltage configuration (my favorite one), so I just have to use the frequency configuration. Anyone knows how to solve that?
  • Has anyone some Arduino code to read from the circuit?
  • In frequency mode, watching my oscilloscope I see:
  • 32 Hz for totally dry sensor (on my table)
  • 1.37 KHz for totally wet sensor (inside a glass of water)

OK, 32 Hz fits with the tables, but just 1.37 KHz doesn't fit at all. Because for 100% wet, we should have around 10 KHz. There is a factor of 10 !!!!! What happens? Anyone in the same situation? What should I do, some calibration?

Best regards!!

Dear javiZgz,

My readings are around 40 Hz for dry and 8-10 kHz for glass of water (readings depends on length of sensors) and how deep I put them. Please, be aware, that if you are using real Watermark sensor, and not just stainless wire, that it takes some time for Watermark sensor to "get wet"... so maybe you have to leave Watermark sensor in a glass for longer period of time... or just try with metal wire and check your results.

I haven't tried to convert it to voltage output, because impulse output was ok for my project.

I have made dirty-hacked version of digitalRead, to be able to sample 200 kHz, instead of 100 kHz I was getting with digitalRead... but in this case it's not really necessary, digitalRead should be fine.

I have not used interrupt to count impulses, mainly because this approach was sufficient for me and because in my actual project, sensor circuit is connected via 74HC164 and PCF8574 (so that I can read more than one sensor using 1 digital pin and two analog pins).

Here is my code, to count impulses on Arduino pin. countImpulses takes 3 parameters, time in milliseconds how long to sample, digitalIn input pin and in sampleCount you will get sample rate. It will return how number of impulses.

#include <pins_arduino.h>

int inline digRead( uint8_t port, uint8_t bit ){
  if (*portInputRegister(port) & bit) return HIGH;
  return LOW;
}

unsigned long countImpulses( int time, int digitalIn, unsigned long &sampleCount ){
  unsigned long startTime = millis();
  
  unsigned long count = 0;
  unsigned long measureCount = 0;
  int value = 0;
  int lastValue = 0;

  // part of DigitalRead, inline it to make x1.7 speed improvement
  uint8_t port = digitalPinToPort(digitalIn);
  uint8_t bit = digitalPinToBitMask(digitalIn);

  while( millis()-startTime < time ){
    value = digRead( port, bit );
    
    if( value > 0 && lastValue < 1 )
        count++;
    lastValue = value;
    measureCount++;
  }
  
  sampleCount = measureCount;  
  return count;
}

Hi Chupit!!

Thank you so much for your reply!!

I use the real Watermark sensor, by Irrometer. And yes, it's really wet, as I put it in water 2 days ago! :slight_smile:

Metal wire? You mean what? Yes, I have extended the green wires from the sensor with the usual copper wires (just 5 cm)

You have make the 555 circuit to feed the sensor (like me), haven't you?

In the oscilloscope I see for the sensor inside a glass of water (filled with water ;)):

100 microsec


| | 600 us | |
| |______| |_____

It's just a freq = 1.5 KHz, more or less.. Do you think it's correct? We shold have about 10 KHz! What do we have to measure? The period of 100 us? The period of 600 us? The duty cycle?

You say the freq depends on the depth the sensor is. What do you mean? I have submerged the sensor about 3 cm under water, so if I put it 50 cm will I have more freq?

I don't know what to do.. Maybe my sensors are broken, or I have to calibrate it, in the terms: 10 KHz is now 1.5 KHz

Help! I need somebody!
Help! Not just anybody!
He-e-e-elp!!!

I've only used homemade sensors, I have no experience with real Watermark sensors, but are you sure that pure water will give you the same readings as wet soil?

If the sensor is in saturated soil the conductivity may be higher than in pure water. I would try burying the sensor, either in the ground or in a flower pot full of soil, and see what kind of readings you get.

By metal wire, I mean, that instead of Watermark sensor, I just use metal wire connected to emsystem's 555 circuit.

You should count number of spikes, count how many times per interval, it switched from logical 0 to logical 1. I can post screen shot of my oscilloscope later, if you like.

By saying, that frequency depends on how deep I put sensor, I mean, that emsystem's 555 cirucit measures conductivity. The longer are my wires and the deeper they are, conductivity is better.

Anyway, my readings are around 8-10 kHz in glass and 7 kHz in wet flower pot, going down as soon as soil is getting drier. I have build 8 sensor circuits according to emsystem circuit, and all give pretty consistent results. As sensors I use two wires, each 10 cm in length and not actual Watermark sensor (I don't need it to be very precise).

javiZgz, please, check, that you have used 2.2mF bipolar capacitors.