Understanding why this capacitor can be discharged at 1MHz but not at 100MHz ? - Page 1
Forum section: electronics / beginners

author: JL34
author_rank: Contributor
timestamp: May 26, 2022, 11:33:35 am
content: Hello,I have a circuit used to sens soil moisture, inspired by different open source projects :This sensor is composed of a capacitor probe Cx with a resistor R1, forming together a low pass filter. A square wave signal is sent to this probe at 1Mhz. The signal is partially filtered through the low pass filter. In output, this signal pass through a high pass filter (R2/C2) to get a DC signal representing the level of moisture. As the probe capacitance vary between 5pF and 50pF according to soil moisture level, the square wave signal is more or less filtered after the low pass filter, and the output signal vary according to soil moisture. To simplify, the aim is to have the greater output voltage at low capacitance 5pF and the lower output voltage at high capacitance 50pF.To increase dynamic range of the sensor, in online projects I have found, some BJTs are added to discharge the probe capacitor after each fall edge of the square signal. At 1MHz it work great. But I want to do this working at 100MHz. And I am not able to make this work at 100MHz.To imagine my words, this is two pictures of tests I have done some simulation test into LTSpice.Working circuit at 1MHz, with low moisture level (Cx = 5pF) and high moisture level (Cx=50pF).As you can see, Cx is fully discharged at each falling edge :Same circuit not working at 100MHz. R1 value is modified according to frequency change.As you can see, when Cx = 50pF, Cx is not fully discharged and do not reach 0V before next rising edge :When I use an LTSpice ideal NPN model for Q1 and Q2, this work great. But if I use a real NPN models of fast BJTs like the PMBT6429 (700Mhz BJT), I am not able to make this work. I think there is some effect of base/emiter capacitance, but I not understand very well, and I can not find a BJT that could work in this case.Could someone explain to me why this is not working ? I would like to understand.Thanks in advance ;-)

author: todorp
author_rank: Regular Contributor
timestamp: May 26, 2022, 12:40:17 pm
content: Don't you think 100MHz is a tad high a frequency for a soil moisture sensor reading?

author: JL34
author_rank: Contributor
timestamp: May 26, 2022, 12:43:20 pm
content: Quote from: todorp on May 26, 2022, 12:40:17 pmUnfortunately no. Soil minerals and component are a non-negligible effect under 50MHz. Above 50-100MHz, only water have a significant effect. This is the reason I try to adapt this sensor

author: rstofer
author_rank: Super Contributor
timestamp: May 26, 2022, 04:39:14 pm
content: What's the RC time constant of Cx and R5? Now, multiply by 6 to get a 99%+ discharge and then take the reciprocalCx = 50p = 50x10-12FaradsR5 = 1000 Ohms50x10-12* 1x103= 50x10-9-- time constant 50 nanoseconds6 * 50x10-9= 300*10-9-- full discharge in 6 time constants = 300 nanoseconds1 / 300x10-9= 3.3 MHz -- frequency is 1 / timeIt just gets worse for increasing values of capacitance.ETA:Actually, this isn't quite right. We still need to figure the time constant for charging and that will be 1/10 of the time constant for discharging (100 Ohms versus 1 kOhm) or 5 nanoseconds.The total period for 1 time constant is 55 nanoseconds and the period for 6 time constants is 330 nanoseconds or about 3 MHz which is, as expected, about 10% lower than the first approximation.

author: Terry Bites
author_rank: Super Contributor
timestamp: May 26, 2022, 05:55:29 pm
content: Why do you want to operate the sensor at these pericoloso speeds?

author: Porama6400
author_rank: Regular Contributor
timestamp: May 26, 2022, 06:11:53 pm
content: https://www.researchgate.net/publication/284614636_Analysis_of_capacitive_measurements_at_low_frequencies_for_moisture_content_determination_in_soybeansSeems like sub MHz should work just fine.operating it at 100 MHz sounds like an EMF nightmare imo

author: Marco
author_rank: Super Contributor
timestamp: May 26, 2022, 07:09:27 pm
content: He doesn't seem to want to calibrate too much and seems to think that high frequency will make it more selective towards water. Smaller molecules affect permittivity more at higher frequencies and all that.JL34 : do have a care for the currents involved though, charging these capacitors to the point a simple diode envelope detector can work takes a ton of current. I'd excite the the sensor with a low amplitude low passed square wave (ie. approximately a sine) and try to make a better detector. Which is to say, amplify and only then do detection.

author: DavidAlfa
author_rank: Super Contributor
timestamp: May 26, 2022, 07:19:43 pm
content: Wouldn't be easier to use a free-running oscillator, then depending on the moisture you'll get different frequency?Then convert frequency to voltage?I've just found something related using a PLL:https://www.researchgate.net/figure/Frequency-voltage-converter-with-PLL_fig3_283017568

author: Marco
author_rank: Super Contributor
timestamp: May 26, 2022, 07:58:19 pm
content: To give an example why the current matters, just look how nice a simple zero bias Schottky detector (with SMS3922 diode) looks in simulation. But that oscillator is pushing 60 mA peak to do it, which at 100 MHz is quite a bit.If you tried to reduce the amplitude of the oscillator, the detector would stop working well though. So, the obvious solution is less excitation, more amplification. The detector can handle a higher impedance signal source just fine, it's the amplitude which is the problem.So instead do something like the second schematic. This has low output voltage for 5p, you can do it the other way around but this gets a nice linear variation in output voltage for linear variation in capacitance. R2 works with much smaller values too (say 10 Meg).PS. a lock in amplifier/synchronous detector can detect low amplitude signals too, but I don't think you're going to beat the simplicity of a common emitter amplifier with a zero bias Schottky detector.PPS. talking about oscillators, Q1 might need a bit of base resistance, it's a high fT transistor. Just an example of concept, not necessarily a practical circuit

author: JL34
author_rank: Contributor
timestamp: May 28, 2022, 08:42:54 am
content: Thanks to all participants for those interesting informations.I have not looked at current consumption at 100MHz. In LTSpice I found around 35mA. I understand this will be problematic at 100MHz.My circuit will not be able to easily run at 100MHz. I must change it.Frequency changing sensor sound like promising. I have done some searches and found some articles :1)As quartz crystal oscillators seems to not easily shift from their nominal frequency, a first solution could be a 3rd overtone oscillator, as describedhere:2)Another solution is to use a resonant oscillator, as some has said. I have found an interesting articlehere:3) A third solution could be a double resonant oscillator, like describedhereandhere:The second solution, using a voltage controlled oscillator, seem to be a simple and cheap one. I will try to do some simulation on LTspice

author: Marco
author_rank: Super Contributor
timestamp: May 28, 2022, 11:18:21 am
content: Quote from: JL34 on May 28, 2022, 08:42:54 amA couple parallel UHS buffers can deliver it ... it's not impossible, but it's inelegant and quite a lot of power, which increases chance of EMI.Another problem which just occurred to me is that with a non sine wave, the speed of the edges is probably going to make a large difference on the detection and the speed of the edges is temperature dependent.The third solution you posted should be mostly insensitive to this, because of the sine wave oscillator and the temperature compensated LTC5507.