Help me design a simple capacitance meter using AC voltage

Started by brett, April 02, 2006, 07:55:59 AM

Previous topic - Next topic

brett

Hi.
I'm working on a design for a capacitance meter with a couple of twists. 

The circuit I'm looking for should:
1. indicate capacitance by measuring resistance to flow of an alternating current (AC) (unfortunately, this is essential)
2.  include the AC generator
3.  use a voltmeter as the display device
4.  the capacitance will be nominally be 0.1uF to 1uF
5.  consume as little power as possible.  (<10mA??)
6.  the readout DOES NOT have to show capacitance directly, only rise or fall with increasing or decreasing capacitance
(e.g. 1V=0.01uF, 2V=0.1uF, 3V=0.5uF, 4V=1uF would be ok).

Here's my plan so far:
Use an 78L05 to set a reference voltage, and a schmitt trigger or CMOS 555 timer to generate a 5V square wave at around 1 kHz.
Run this through the variable capacitor and a 1 kohm resistor.
Rectify and smooth (100uF cap) the voltage drop across the 1 kohm resistor and read this DC voltage.

As the variable capacitance goes up, resistance goes down (1uF=160 ohms, 0.1uF = 1.6 kohms), so as capacitance goes up, the voltage drop across the fixed resistor should rise.  Yes?

Any suggestions?  I'm concerned that with only a 5 volt wave that I'm losing a lot of voltage in a rectifier.  I guess I should use Schottkys or Ge diodes.  Maybe go even further and use op-amps to make those "virtual diodes" that have been discussed a couple of times??

Thanks for any help.
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

R.G.

OK, an AC ohmmeter. Could do it in standard ohmmeter practice, which is to measure the voltage or current resulting from passing a current or voltage through the device under test. That works, but the conversion of AC to DC for metering and the necessity for range switching because of low accuracy at the low end of the scale make these designs hard.

What most AC measurement setups do is some variation of bridge-null measurement and/or frequency servoing to eliminate the tiny end measurement.

You do not mention, but imply a couple of other restrictions. For instance, is it mandatory to have the indication of capacitance be on a voltmeter output? Or can it be the position of a pot? The simple way to do this is to rig it so you have to turn a pot that sets the frequency of an oscillator making a sine wave. The sine wave feeds the DUT (Device Under Test) and you turn the pot until a light comes on. The light indicates that a specific value of voltage/current across the DUT has been reached, so the frequency is now a direct indicator of the capacitance. This can be automated by using a capacitance locked loop.

You make an sine wave generator that is variable, say with a CD4046 PLL and some shift registers to make the resulting high frequency into a high purity sine wave by resistor networks. That sounds complicated, but it's only about 3-4 CMOS packages. Then you make the resulting AC voltage across the capacitor convert to DC that lies within the range of the PLL's VCO, and in the right direction to lock the loop, and feed it back to the loop. Once that's done, you're done. You meter the PLL's error voltage, and that's proportional to the capacitance. Estimated circuit for the thing is 1-CD4046, 2-8 bit CMOS shift registers, 16 1% resistors, two dual opamps and assorted R's and C's, along with the voltmeter that reads the actual error voltage. 

Given that this is not a toy application, I would encase the whole mess inside one PIC and one CD4046, including driving a numeric readout with the real capacitor value, autoranging.

It may be simpler to put the DUT into an LC oscillator and read the resulting frequency with a frequency counter.

Then there are the whole legion of backwards and bridge methods.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

brett

Hi.
Thanks RG.
Wow, that PLL idea seems elegant.  But it's probably beyond my ability to implement.

I forgot to mention that this is off topic.  The capacitors are sensors for soil moisture.  More soil moisture increases the capacitance.

Thanks for your suggestion about LC oscillators.  Maybe as C in a scmitt trigger RC oscillator?  Only the chip and one resistor, plus the frequency counter.  That's simple!

Thanks again.

PS The comercial units currently doing this job use 1kHz sine waves and rectifier bridges to measure the voltage drop across the capacitive sensor.  This is satisfactory because the sensors are highly sensitive (change in capacitance per unit change in soil moisture is high).  However, the sensors are variable from batch to batch, so the readout has to be calibrated against soil moisture for each batch of sensors anyway.  I'm trying to miniaturise and standardise the sensors so they have a fixed relationship between moisture and capacitance (ie do not require calibration for each batch).  Once this is achieved, an improved capacitance meter can be used to  improve the precision of the system (and this will be the cream on the cake, so to speak).
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

R.G.

Let me toss you another idea.

If the sensors vary, you don't need to adapt each one - you just need a varying reference. Is is possible to use two sensors from the same batch in a bridge, and then only sense the imbalance? Perhaps make the sensors so that there are two active areas on each sensor (since I gather from your description that this is a more-or-less mechanical contraption) and use one active area for soil measurement, one for a reference that's not inserted into the soil. Then you use these as the active sections of a bridge and look at bridge imbalance, or servo the drive to the bridge to force a balance; the servo'ed drive is then the measure of the quantity, like the error voltage of a PLL.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

brett

RG, you are a wiz.
The reference sensor idea has inspired me. 
Instead of calibrating the impedance meter for each sensor, I should adjust the sensors.  Using reference conditions, maybe I could add resistance and/or capacitance until every sensor is virtually the same.  No need for calibration curves because they have identical  relationships between Z and moisture.  Brilliant !!

Thanks heaps.
If I make a million out of this, I'll send a cut your way.
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

R.G.

QuoteUsing reference conditions, maybe I could add resistance and/or capacitance until every sensor is virtually the same.  No need for calibration curves because they have identical  relationships between Z and moisture.  Brilliant !!
That would work great as long as drift doesn't get you. Do these things have long- or short-term drift that is significant?

The other advantages of bridges is that drift is usually cancelled by both elements drifting.

QuoteThanks heaps.
If I make a million out of this, I'll send a cut your way.
Nah, don't bother. I'd just waste it on buying more parts...  ;)
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Paul Perry (Frostwave)

I have a circuit that measures resistance, by forcing a constant current source through it & looking at the voltage developed across it.
Now I presume there is some kind of circuit that will give a constant AC current out.. but I don't know it. Someone here is sure to, though.
I can't understand the sensors being different to each other, I used variable capacitance sensors to measure air humidity (back in the 60s!) in a meteorological research project & I would think there would be so much measurement error with buried sensors that differences between the sensors would be negligible (at least when buried). Might be worth inserting & removing & reinserting one sensor a few times just to see how consistent a single sensor is!
Incidentally, the sensor I worked with was an air dielectric plate capacitor & it changed the frequency of a RF oscillator, that was hetrodyned (like a theremin) & the audio recorded & then converted to voltage by a FM detector. We used a temperature stable metal (invar, from memory) and coated the plates with wax to prevent variable water adsorbtion on the surface.

brett

Hi
thanks for the suggestions.

From RG's idea of adjusting the sensor rather than calibrating the meter, I'm planning on using a small variable resistor in series with the sensor, so that I can standardise the sensor impedance at the wet end of the measurement range.  Where the sensor might otherwise vary from 0.8 kohms to 1.2 kohms, I can add resitance to make them all read 2k.  At the dry end of the measurement range (100 kohms) the extra 0.8 to 1.2k doesn't make a significant difference.

Paul, your humidity measurement method sounds interesting.  In the lab we measure soil moisture by measuring the humidity of air in eqilibrium with the soil.  The machine is a dewpoint hygrometer, which cools the air until it fogs a tiny mirror and disrupts a light beam.  Unfortunately, the relative humity of air in contact with soil is very high (> 99% ??) unless soil is fairly dry, so the method is only good for the dry end of the soil moisture measurement range.

In case you're interested, the sensors consist of gypsum blocks, which simply provide a porous matrix that fills with moisture like a sponge when its surroundings are wet, and dries when its surroundings are dry.  Like a sponge, when really wet, all of the pores are filled with water, and when dry, only the smallest pores are filled (and slight films of water cover the internal surfaces).  The dielectric property of water makes the capacitance of the block vary almost linearly with water content.  Only snag is that at there are only a few, and variable number of large pores (0.1mm and up) in gypsum blocks, and so accurate readings and consistency between blocks is difficult to achieve at the wet end of the measurement range.  At the dry end of the measurement range, there's no problem because all of the pores are almost dry, and capacitance is negligible.

Although gypsum blocks have been used for sensing soil moisture for at least 60 years (for scheduling irrigation, etc), the problem of inter-sensor variability has restricted their use to poor scientists.  Poor, because they are much cheaper (10x) than other sensors, and scientists because nobody else has the time, technology and skills to calibrate them.

thanks for your ideas

Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

R.G.

Brett - is the gypsum block left buried or stuck into the dirt for a reading?
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

brett

It is left buried, usually for about a year.  They slowly dissolve/weaken (which is s good thing because they provide a constant background of salinity).  Several sensors are used at depths ranging from 10cm to 120 or 150cm.
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

Paul Perry (Frostwave)

It's an interesting problem, wondering what 'humidity' means when you are underground!
I'd be inclined to ditch the gypsum & go with unglazed terracotta. It's easy to get & has a regular structure. Personally, I'd try a terracotta cylinder with one electrode inside, and the other in the form of a mesh on the outside. With enough spare depth to allow for water to pool in the bottom when conditions are saturated. It isn't an easy problem (nothing is, when you actually try to implement it.. as all of us stompboxers know!)
Maybe gypsum is used because the original work (if I remember correctly) on automatic irrigation sensors was done in Israel, where they have more gypsum than they know what to do with!

One alternative approach, which I would be inclined to try, would be a 'standard' soil mix (some empirically determined mix of graphite and clay), inside an unglazed terracotta tube, acting as a resistor.

brett

Hi Perry
Very good ideas, and tried to various extents.  There have been many "granular" sensors available for some time.  They use relatively large (0.1 to 1mm) nylon or PVC granules to mimic a soil/sponge.  They work very well in wetter situations (larger pores fill when more water is available), but have no buffering against soil salinity, and still require individual calibration.  The calibration issue seems odd, because you'd think that the pore size could be kept constant, but maybe the packing from one sensor to the next is different, and so the distribution of pore size varies (?).

The terracotta idea is interesting.  If we want to sample soil moisture, we use small ceramic cups.  These are glazed and potentially attractive for the job, but the average pore size is too small (0.001 mm ??) to be useful at the wet end of the measurement range.

I really like the idea of using mesh or screens rather than wires in any sensor.  It will minimise any local effects and give a spatially averaged result.   Stainless steel insect/security mesh would be perfect.

Hence I'm still thinking that a simple resistance adjustment of individual gypsum blocks is a practical and elegant, if imperfect approach.

thanks
Brett Robinson
Let a hundred flowers bloom, let a hundred schools of thought contend. (Mao Zedong)

Paul Perry (Frostwave)

you're right Brett, I never thought about the variable salinity screwing the resistance!! Plus if I'd built it, i would probably have used DC instead of AC and consequently corroded the contacts :icon_redface: Truly, stompboxes are easy-peasy in comparison.
http://www.sowacs.com/comparisons/index.html suppose you've seen this.. now my head hurts..