Maker Pro
Maker Pro

Capacitance Measuring Circuit - Can This Circuit Be Changed For Higher Frequency?

Mahonroy

Oct 21, 2014
69
Joined
Oct 21, 2014
Messages
69
I came across this circuit that measures capacitance mainly between 30pF and 300pF, and is typically used between 31KHz and 250KHz. It basically outputs a 0-5V analog value that correlates with the capacitance. I drew a green arrow pointing to where the measurement is taking place. Its basically an RC circuit with a peak voltage detection circuit. I believe the op-amp is in place because the RC circuit has really high impedance, so this corrects it for the peak voltage detection portion. Here is the circuit:
upload_2020-12-18_18-21-23.png

My question is, how should I go about modifying this so I can use a much higher frequency of 80MHz instead of 31KHz-250KHz, and so I can read larger capacitance values (up to say 40uF). I simulated the circuit as-is, at different frequencies, and different capacitance values. The square wave I used here is a 0 to 5V square wave, 50% duty cycle:
upload_2020-12-18_18-21-39.png

It looks like the only thing that needs to be done is either change the values of the RC component of the circuit, or change the values of the peak detector? Or both? How do you determine what would be appropriate values for these? And I'm guessing I'll just pick an op-amp that has a "Gain Bandwidth Product" of something greater than 80MHz?

I also wanted to note, regarding the range, I can even go from 500pF to 40uF, maybe 100ish steps in-between. It doesn't need to be all that high precision. The only thing is the frequency must be 50MHz minimum or higher.

Any help or advice is greatly appreciated, thanks!
 

ratstar

Aug 20, 2018
485
Joined
Aug 20, 2018
Messages
485
I see the whole thing as a waste of components, why not just have the capacitor in series with ac, then the brighter the led (use 2 back to back) the more capacitance it is, depending on the frequency. the higher the frequency the lower the maximum bar is for farads tho. also the lower the frequency the higher the minimum bar is.
 

Frankchie

Nov 14, 2017
149
Joined
Nov 14, 2017
Messages
149
Mahonroy,
I'm puzzled why you seem to think that you need a higher frequency to read larger capacitors. I would think the opposite is needed, lower frequency for larger capacitors. Even your simulation hints at that. For example, it confirms that higher frequencies give less range ("bottom out") for larger capacitors. Not to mention that in-general lower frequencies are less critical (easier to measure, less affected by stray impedances, etc.).

BTW, I think you should show the power supply details.

Is there a purpose for this circuit or are you just enjoying some experimentation? You can buy devices to measure capacitance very inexpensively.
 

Mahonroy

Oct 21, 2014
69
Joined
Oct 21, 2014
Messages
69
I see the whole thing as a waste of components, why not just have the capacitor in series with ac, then the brighter the led (use 2 back to back) the more capacitance it is, depending on the frequency. the higher the frequency the lower the maximum bar is for farads tho. also the lower the frequency the higher the minimum bar is.
Thanks for the response! Are you suggesting doing something like this? I didn't put the LED's in the mix, because in the end I still need to read an analog value to determine the capacitance: e.g. run the analog value into an ADC and do a calculation.
upload_2020-12-18_22-31-26.png

Mahonroy,
I'm puzzled why you seem to think that you need a higher frequency to read larger capacitors. I would think the opposite is needed, lower frequency for larger capacitors. Even your simulation hints at that. For example, it confirms that higher frequencies give less range ("bottom out") for larger capacitors. Not to mention that in-general lower frequencies are less critical (easier to measure, less affected by stray impedances, etc.).

BTW, I think you should show the power supply details.

Is there a purpose for this circuit or are you just enjoying some experimentation? You can buy devices to measure capacitance very inexpensively.
Thank you as well for the response! The reason is because I'm reading the soil moisture content, by taking the capacitance. There are some studies out there that show the salinity of soil still effects a capacitance reading. But... the higher the frequency you use (sweet spot being between 50 MHz and 150 MHz), the less salinity effects a capacitance reading. So I'm trying to take a capacitance reading using a frequency above 50 MHz.
 

Frankchie

Nov 14, 2017
149
Joined
Nov 14, 2017
Messages
149
Mahonroy,
Your circuit is also going to measure the resistance of the soil and my wild guess is that will influence your reading more than the capacitance. What you are measuring is a resistor in parallel with a capacitor and both are changing with moisture.

Simply measuring the resistance, as is typically done, sounds more workable to me.
 

Mahonroy

Oct 21, 2014
69
Joined
Oct 21, 2014
Messages
69
Mahonroy,
Your circuit is also going to measure the resistance of the soil and my wild guess is that will influence your reading more than the capacitance. What you are measuring is a resistor in parallel with a capacitor and both are changing with moisture.

Simply measuring the resistance, as is typically done, sounds more workable to me.
Thanks again for the response! Resistance based sensors, or circuits that measure EC (electrical conductivity) is popular, but they are drastically effected by the salinity of the soil. The capacitance based method is supposed to be the more "accurate" way of measuring soil moisture as salinity doesn't effect it over 50MHz.
 

Frankchie

Nov 14, 2017
149
Joined
Nov 14, 2017
Messages
149
I wouldn't think that salinity changes very quickly so maybe occasional calibration of a resistance method is workable.

Anyway, for your circuit to give meaningful results the capacitor's reactance would have to be very low compared to the resistance, probably by a factor of at-least 10. Basically the resistance effect can then be ignored assuming that you can live with a small error in accuracy. Guess what, at 50mhz that could be the case (>10) since cap reactance is lower at higher frequencies. Although I have no idea of the magnitude of the capacitance or resistance of soil so don't get too encouraged.

If you have some inkling of the resistance and capacitance values involved maybe I (or others) can offer more help.
 

Mahonroy

Oct 21, 2014
69
Joined
Oct 21, 2014
Messages
69
I wouldn't think that salinity changes very quickly so maybe occasional calibration of a resistance method is workable.

Anyway, for your circuit to give meaningful results the capacitor's reactance would have to be very low compared to the resistance, probably by a factor of at-least 10. Basically the resistance effect can then be ignored assuming that you can live with a small error in accuracy. Guess what, at 50mhz that could be the case (>10) since cap reactance is lower at higher frequencies. Although I have no idea of the magnitude of the capacitance or resistance of soil so don't get too encouraged.

If you have some inkling of the resistance and capacitance values involved maybe I (or others) can offer more help.
Thanks again for the response. That chart in my initial posting has the capacitance values involved. Completely dry reading is under 100pF. A little bit of water is around 11.5nF. Pretty wet is closer to 10uF, and fully saturated is around 15uF.
 

ratstar

Aug 20, 2018
485
Joined
Aug 20, 2018
Messages
485
If the time it takes for a capacitor to turn off is t=RC. so the voltage your getting out of the cap is a proportional of the power going into it at some frequency. (the larger the capacitor, and the higher the frequency) the more power youll get.

So maybe you could just hook a galvonometer up to it, with a tuning resistor, and you would get a higher reading the higher the farads. But when you use a higher frequency, you would want this value to set the lower bound, so maybe a voltage divider could work to set this new minimum bar, but u need a source of power thats proportional to the oscillation speed of the oscillator.

It depends on how you make the oscillator.

If you had a switch for each frequency, for each farad range like maybe for nanofarads, picofarads, microfarads, millifarads, then farads. then each one could have a different resistance on the galvonometre? but if you use a voltage divider maybe really high frequency could be a problem, cause ull start to parallel capacitate through your insulator. but I wouldnt worry about that at first.
 
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Measuring from 100 pF to 15 µF in one single range is quite a challenge. A ratio of 1/150000 is equivalent to a 5 1/2 digit instrument. I doubt that accuracy is possible with such a simple setup. The transfer function of the circuit is also nonlinear (see e.g. here). Assuming w × R × C >> 1 the transfer function is approx. Vout/Vin = 1 / (w × R × C). You'll have to compensate the nonlinearity computationally.

This article compares different capacitance measuring methods using an Arduino microcontroller. Including one method that claims to work from 18 pF to 470 µF. I wouldn't trust the pretended accuracy (sub pF :rolleyes:), but this may be good enough for measuring soil moisture in any case.
 

Frankchie

Nov 14, 2017
149
Joined
Nov 14, 2017
Messages
149
After studying the circuit a little more carefully I can't really understand how the circuit operates. At first glance it seems like a peak voltage detection circuit, but it does not hold the peak value as most peak detection circuits normally do (IMHO). Rather it produces a varying positive output whose average or RMS value correlates to the capacitance under measurement. Okay, maybe that still accomplishes the objective providing you can figure out the correlation factors.

Anyway, given that I don't really understand this circuit I can't suggest any changes for higher frequency operation as the Op requested. Not to mention, the higher (RF) frequencies probably introduce more problems than they solve.

Furthermore, the input signal will necessarily be attenuated by soil resistance, so the objective of measuring soil moisture via capacitance alone is not really accomplished.

I imagine a circuit to measure soil capacitance without being influenced by soil resistance would have to be based on a resonant circuit concept. I'm not sure how commercial capacitance meters work, but if they use resonance maybe they are good alternative.

BTW, a DIY solution using an Arduino, as others here have suggested, might be viable if programed to use resonance as the measurement technique.
 

ratstar

Aug 20, 2018
485
Joined
Aug 20, 2018
Messages
485
If you lower the voltage youll be able to test higher capacitances cause itll stop off early, but ull have to add a transistor to amp it.
It only would work 5 hz and up or the galvonometre will start to jump.
 
Top