Recently, I finished my first Arduino project, a magnet levitation device. It levitates a magnetic object under an electromagnet. What makes it different from similar projects is the position sensor for the feedback loop. I use a single Hall effect sensor placed directly on the bottom of the core of the electromagnet. This creates a problem of separating the electromagnet’s field from the levitating magnet’s field. Fortunately, this can be done in software by the microcontroller ATmega168 that is the heart of Arduino Duemilanove, the board that I use to control the levitation. This article gives a detailed description of the project together with source code at https://github.com/rekka/levitation, as I promised.
WARNING: This is an advanced project that requires quite a substantial amount of tweaking and understanding of the software internals to make it work. Please consider this post just a description of what I did. Furthermore, it is more than 3 years old and therefore hopelessly outdated; the software most likely needs nontrivial changes.