I've been working for some time on this system to automatically hold altitude on my quadcopter. I find that maintaining very low altitudes while flying around is one of the more fun things to do with a quad, but also one of the more challenging. Therefore I'd like my quad to be able to maintain low altitudes autonomously while I fly it around. I also just enjoy the challenge and like working with control loops. Plus, before this project, my whole quad ran entirely on code written by other people - unacceptable! Has to have something I hacked together myself to really be a satisfying build.
I have done experiments and revised hardware and software many times over the past 4 months, discovering many many issues that plague sonar in the quadcopter environment. As I progressed, I isolated a number of problems and created solutions to each, and the result is a mixture of hacked sensor hardware, lots of firmware, hand-sculpted mounting brackets, and a mess of wiring, but it hovers!
Details
Here's an intro video with an autonomous hover demo: