Digital Spirit Level?

Anyone any idea how to make a digital spirit level? Can an accelerometer be used or does that need a lot of movement to activate? Any other ideas please?

With a +/- 1G accelerometer, you can directly measure tilt in reference to gravity. You would likely need some precision op-amps and a lot of software filtering to get accurate results to less than a degree.

An interesting way to implement this would be a two axis accelerometer with a small graphic LCD; a dot on the LCD would show where the device was tilted in two axes. Perhaps you could set a desired angle and the microcontroller could beep when that angle was achieved, allowing one person to position an object without looking at the device.

One could probably simulate a bubble level using a 16 character based LCD.
And [u]this thread[/u] described how to use custom characters to get a higher precision vertical display, a similar technique could be used to increase the horizontal resolution to +- 64 units of tilt.

And of course there is a graphics LCD library in the playground :wink:

Sounds like a fun project.

THanks for the info.

Apparently you can buy sspirit level software for an iphone

I don't have an iPhone. I have an Arduino.