# DIY electronic inclinometer: Measure tilt using water!

For a school project, Nicholas Kwan made this interesting inclinometer, which is a device that measures how far over an object is tilted.

For a sensor, he built a variable capacitor out of two semicircles of tinfoil mounted vertically, with a petri dish half-filled with water stuck in between them. When the wheel rotates, the water stays in the bottom half, which causes the capacitance across the tinfoil to change (because water and air have different dielectric constants). This change is then detected, and then used to change the frequency of a 555 timer chip, which is measured and translated into tilt by a microcontroller.

You could probably accomplish the same measurement by using an accelerometer in much less time, but I think this method is much more enlightening. I really like that the whole thing was made from scratch; it does a great job of demystifying how the sensor works. I realize that it was a second year engineering project, but it might be interesting to see what the dynamics of the system are (for example, how long it would take for the water to settle down if it was bumped?).

Does anyone think that it might be possible to design the capacitor differently so that it can sense which direction the tilt is occurring? You might also be able to use this kind of capacitance circuit to measure how much water is in a pipe, such as a rainwater gauge. Fun stuff!

Oh, and if you want to learn more about inclinometers, there is … wait for it … a whole blog dedicated just to them!

### 7 Responses to DIY electronic inclinometer: Measure tilt using water!

1. It should be fairly simple to create a version that can detect direction of tilt – just split the capacitor into two quarter circle ones instead of one half circle one, then measure each capacitor individually. Only the side rising out of the water will exhibit any change.

• Matt Mets on said:

Ah, yeah, that makes good sense. I was trying to think of something along the lines of a gradually sloped piece of aluminum foil, so the capacitance would change faster when turning in one direction vs the other. The two-capacitor idea seems much more straightforward.

2. What would happen if the foil was at a 45 degree angle? That would allow up to 45 degree rotation with max capacitance at 45 tilt and min at the other 45 tilt. Just a quick thought.

• Matt Mets on said:

The active part of the capacitor should (ideally) be just the stuff directly between the two tinfoil plates. The plates currently cover 180 degrees (half) of the circle. If I’m understanding you correctly, offsetting them by 45 degrees would effectively be the same thing as having a capacitor span 135 degrees of the circle, so I’m not sure if that works.

3. Anonymous on said:

Another option may be build two sensors. Clock them 90 degrees apart. It would generate a quadrature style signal.

4. Dave Walker on said:

Turn the whole thing 90 degrees, so the semicircle of foil is on the left instead of the bottom. When level, the capacitance is a mid-value. Tilt left and it increases. Tilt right and it decreases. Simple :o)

• Matt Mets on said:

Ha, certainly! Of course, it would be ambiguous if the sensor could be rotated freely, however that probably isn’t how the sensor is to be used.