Parallel plate capacitor level sensor
One of the key parameters that will vary a lot with respect to some liquid being used is the value of \$\epsilon_r\$. Who knows? One thing you do know is that it is the same for both capacitors: reference and measuring.
If only you could work out a way where a lack of knowledge of that factor could be taken out of the equations.
Well, that's not too difficult to do. If you construct two capacitors where both of them have the same width and both of them have the same distance between the plates (this isn't all that hard to achieve), then perhaps something could be done about the problem.
Let's construct two capacitors: a reference capacitor \$C_2\$ and a measuring capacitor \$C_1\$:
$$\begin{align*}
C_1 &amp;= \epsilon_0\cdot \epsilon_r\cdot\frac{h_1\cdot w}{d}\\\\
C_2 &amp;= \epsilon_0\cdot \epsilon_r\cdot\frac{h_{ref}\cdot w}{d}\\\\
&amp;\therefore\\\\
\frac{C_1}{C_2}&amp;=\frac{\epsilon_0\cdot \epsilon_r\cdot\frac{h_1\cdot w}{d}}{\epsilon_0\cdot \epsilon_r\cdot\frac{h_{ref}\cdot w}{d}}\\\\
&amp;=\frac{h_1}{h_{ref}}
\end{align*}$$
Please note that \$\epsilon_r\$ has dropped out of the equation, now. So different liquids, even minor differences, are eliminated. At least, to the degree that \$w\$ and \$d\$ can be carefully managed to be equal in both cases. Luckily, that kind of manufacturing isn't difficult to achieve.
So now the level measurement isn't confounded by the details of the liquid. As long as it is the same liquid through-out, the concept remains valid and:
$$h_1 = h_{ref}\cdot\frac{C_1}{C_2}$$
Since \$h_{ref}\$ is known by the design itself and since \$C_1\$ and \$C_2\$ are in a continuous process of measurement, the device works well.
It is a requirement, though, that \$C_2\$ be under continual submersion. And this also discounts the idea that the portion of \$C_1\$ that uses air as its dielectric contributes significantly to \$C_1\$. That can be included in the above analysis, but then the result becomes a little more nuanced.