Using Hall-effect sensor a very interesting device is built that allows permanent magnet to levitate in air. A microcontroller reads value from Hall-effect sensor and determines how far permanent magnet is from the electromagnet. Than it can decide wether to atract it or let it fall a little in order to have levitation effect.
© Mario M.
[ Source: Mario M. ]