Will this approach accurately measure capacitance and infer spacing?

You might consider a geometry that varies the OVERLAP of the plates instead of distance. Your capacitance will vary linearly with the overlap. C varies as 1/d, so as it stands, your sensitivity at the far point will be cruddy. Even changing to overlap, I wouldn't count on 1% accuracy.

Consider the other options already mentioned, or an LVDT.

UPDATE: As a followup, many measurements such as this are improved by a push-pull arrangement. If you can work this out using TWO capacitors, where one gets bigger at the same time and rate as the other gets smaller, sensitivity and linearity will both improve.


As Dave Tweed already mentioned, the fact that the maximal separation is comparable to plates' dimensions makes this setup problematic. You may get accurate estimation of the distance while the plates are close together, but this setup won't work for the whole range.

Dave suggested that these nonlinearities may be accounted for, but I don't see how this can be achieved, satisfying the required accuracy, without very complicated calculations.

However, since you're going to use microcontroller, you may try the following trick: perform initial mapping of distances to capacitance, store this data in microcontrollers memory (assuming it is sophisticated enough) and use the stored data as a look-up-table to map the measured capacitance back to distance.

As to the required clearance, it depends on which objects may be present in the vicinity of your setup. Consider shielding it with conductive screens.


Consider this as an alternative to using capacitance at the greater distances.

Use an optical communications laser of the type that has a very specific divergent beam (a lot of them are designed like this to be suitable for fibre optic interfacing). It "sprays" its light output onto a fractional surface of a sphere at a certain angle. The further you are from the laser, the less is the incident power received per square mm (such as from a receiving photo transistor). EDIT A lot have in built photo-diodes so you can accurately control the laser output light power.

The photo transistor will have an active surface area which it can receive light. This of course is constant irrespective of the distance from the laser, therefore it receives a weaker signal as the two are moved further apart.

You'd need to modulate the laser with a square wave so you can use this to filter-in the photo transistor signal to prevent dc effects like sunlight ruining results.

In may not work that effectively up close (<2mm) because alignment errors then become a really big issue but, up-close your capacitance idea works best from what I can see. Maybe use both.