# How do I calculate the capacitance of a capacitive touch or water sensor?

Sensors like capacitive touch or moisture sensors are simply two traces drawn on a PCB. For example, you may check the Grove soil moisture sensor. In these types of sensors, the capacitance increases a lot in the presence of water or blood. The PCB shouldn't act like a parallel plate capacitor. The height of the copper is very low and the gap between the two traces is really high, and the masking is filling the gap too.

I even made this sensor by hand (almost 2-inch height and PCB trace of 4 mm)and connected it to the 555-timer (with 4.7k,4.7k resistors.) As the output frequency was almost 1KHz, the capacitance created should be 100nF (according to this calculator.)

Can anyone explain how this large amount of capacitance is created? Is it due to the polarity of water? What should be the mathematical equation to calculate the value?

• The PCB shouldn't act like a parallel plate capacitor. it very much does. It's just that the capacitance is just low, and that, more importantly, it's constant. So it's easy to calibrate away. Commented Jun 9, 2021 at 20:28

The amount of capacitance is determined by the area of the conductors, the distance between them, and the dielectric constant of what is between them (multiplied by the permittivity of free space).

You can calculate it like this:

$$C=\kappa\epsilon_0\times\frac{A}{D}$$

Where:

$$\C\$$ is capacitance (in farads)

$$\\kappa\$$ is the dielectric constant of what is between the conductors

$$\\epsilon_0\$$ is the permittivity of free space ($$\8.85 × 10^{−12} F/m\$$)

$$\A\$$ is the area of the conductors facing each other

$$\D\$$ is the distance between the conductors

The dielectric constant of water is about 80.

• Yes. I put that dielectric constant on that equation. But the capacitance was near 250 pf. However, I'll add a image with dimensions tomorrow as the setup is in my lab and I am in home. Commented Jun 9, 2021 at 20:29
• Perhaps you are underestimating the area of the conductors? It gets a bit complicated as these aren't exactly flat parallel plates. Commented Jun 9, 2021 at 20:33
• Another part of your answer is confusing. You said "Area of conductor facing each other". Actually here's nobody is facing each other. Both are faced up. Commented Jun 9, 2021 at 20:37
• Yes, because normally this is for parallel plate capacitors (the vast majority). They are, in fact, facing each other (the edges!). Take the cross-sectional thickness of those traces, multiply by the length, and that is the area facing. However, there is a lot of surface area not facing each other (and the the equations to calculate that gets very complicated) that adds to the capacitance, and this probably dominates. Commented Jun 9, 2021 at 20:40
• Also note that the center conductor in your link passes very close to the outer one at the end. This will increase the capacitance. Commented Jun 9, 2021 at 20:43

You are right, with a roughly 100mm by 4mm conductor I get about 3nF to 30pF for the capacitance range.

There is also cross inductance to worry about and many other factors. They may have picked 1kHz as an arbitrary frequent to work at. And since this isn't a calibrated instrument it's a relative measurement.