This is my version of a levitation circuit found surfing in internet. It is essentially an analog feedback system. The feedback signal is obtained by converting the magnetic field intensity near the electromagnet in a voltage by means of an hall sensor ( SS495 or SS496). My version of this circuit is based on the LM311D voltage comparator opamp. I used this circuit ( prototype ) to explain the feedback concept in the systems to my students ( V A INF a.s. 11/12). It uses an LED and a buzzer to monitor the electromagnet driving. This helps to locate the point where to put the magnet and/or metal object to levitate.
Here the post with video on the circuit test.