Measure Resistance using an AC source

Discussion in 'Embedded Systems and Microcontrollers' started by timothyb, Jan 7, 2010.

  1. timothyb

    Thread Starter New Member

    Sep 16, 2009
    7
    0
    Hi

    I am looking at making a remote soil moisture probe using a pic micro controller. The probes are read by measuring the resistance between two electrodes within the probe. The resistance can vary between approximately 0.5K and 35K. the problem is to prevent the probe from becoming polarized the measurement must be taking using an AC source, around 3Vp-p. Does anyone have any experience in doing something like this? Would I just use a shut resistor, rectify the voltage on each side and read the voltage drop with two A/D channels?
     
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Have you picked a PIC yet? If so which? I may be able to help.
     
  3. timothyb

    Thread Starter New Member

    Sep 16, 2009
    7
    0
    No i haven't chosen one yet, as i'm not exactly sure what i require, I'm assuming i'll need a PWM channel to generate the AC signal, plus i want to read three of these probes, so i'm going to need a few A/D channels plus i would like it to have a very low standby power consumption. I just thought i'd work on reading the probe first though.
     
  4. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    real quick, how did you want to display your results? with a few LEDs (fig1) or a dual-7seg LED to show %age or are you trying to transmit the data back to the pc for data collecting/viewing?

    10% 30% 60% 100%
    --o-----o------o------o fig1
    ?

    -rm

    Also, how do you want this powered? Is it going to be battery powered or corded?

    If you use AC from the mains, you do not need to try to modulate AC with the chip. You can use the voltage from the wall and use the chip to compare the resistance between two of the three probes. ie. put AC down leg1 then use leg2 and leg3 as "volt meter probes" that can tell you the resistance between leg 1 and 2 and leg 1 and three then calculate the average for display.
     
    Last edited: Jan 7, 2010
  5. timothyb

    Thread Starter New Member

    Sep 16, 2009
    7
    0
    integrate with a wireless card and send to a base station, requires a GPOI
     
  6. timothyb

    Thread Starter New Member

    Sep 16, 2009
    7
    0
    It is going to be battery powered
     
  7. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Ok. using PWM, it is important to regulate the voltage of the square wave to a fixed number. then using a voltage comparator pin on almost any PIC, you can measure the input and compare to the reference form the PWM'ed digital out pin.

    Now depending on your physical setup of the probe, ie. you could use 2 jumper pins as the probe so they are a set .1 inches apart, (1 pin for PWM out and 1 pin for analog in to comparator) measure your result dry and in a cup of water. Recording the both. then the math is up to you for the data you want to extract.

    -rm
     
  8. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    I think I read your original post wrong. You ALREADY have the probes? or did you want to build the whole system?
     
  9. timothyb

    Thread Starter New Member

    Sep 16, 2009
    7
    0
    i have the probes, i would just like to measure the resistance of each one individually and send the result in ohms back to the base station for further calculation. I just want to put a low voltage ac source, about 3V peak to peak across the probe, measure the voltage and current, calculate the resistance and send the result back. the resistance value is then used to look up the water tension in kpa from and probes calibration curve.
     
  10. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    right, then what I said is still valid except the part about building the probe.

    Ok. so. you can use the TC110 to convert your pwm to 3v
    use the datasheet to get the 3v ptp.
    here is the link:
    http://rocky.digikey.com/scripts/ProductInfo.dll?Site=US&V=150&M=TC110303ECTTR

    then use your choice of PICs. The number of probes per chip is the major deciding factor.
    You can find a simple OhmMeter schematic on the web to use for the recieving side.

    Send the output from the TC110 down the probes send side,
    Send the input from the probe to the ohmmeter input.

    Using many available technologies, you can easily transmit your ohm reading to a wireless reciever.

    hope this helps
     
    Last edited: Jan 7, 2010
  11. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    I suppose you must be aware of the extreme variability of soil conductivity that is exclusive of moisture? A change in ionic concentrations throws out the whole measurement.
     
  12. timothyb

    Thread Starter New Member

    Sep 16, 2009
    7
    0
    thanks for the fast input, i'll see what i can find in the way of ohm meter circuits
     
  13. timothyb

    Thread Starter New Member

    Sep 16, 2009
    7
    0
    the probes are gypsum blocks with embedded electrodes designed for measuring water tension, i'm not actually testing the conductivity of the soil, just the block
     
  14. ericwertz

    Member

    Aug 26, 2009
    14
    0
    I think that you can just use a simple voltage divider here, no? Another known-valued resistor in series with your probes. Measure the voltage drop over the probes (or fixed resistor) to figure out its resistance relative to the other series resistance. Pick the known resistor value such that the sum of it and the minimum resistance of the probe (probably saturated) gives you a current draw that you can tolerate.
     
  15. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    I think your AC is to stop the probe being destroyed over time by electrolysis so the current must reverse through the probe. I don't think that simple DC pulses will work. Probably the way forward is to use the above suggestions with a voltage source at the centre of the AC. I'd recommend 50% duty cycle.
    Another way of doing it would be to use 2 pins of the pic to drive the sensor, one high and one low, but alternating.
    You only need to measure the resistance on one half of the cycle.
     
  16. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Can you post a simple drawing or picture of your system?
     
  17. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    You can use a DC source, but the polarity of applied voltage must change to reverse the current. That can take place at some convenient rate. That means that the current through the fixed resistance stays the same, making current sensing very easy.

    It would be helpful to see the system.
     
Loading...