The electromagnetic levitation system controls the magnetic field generated by an electromagnet to levitate a small magnet in midair. The small magnet levitates in the air indefinitely without any disturbance. The vertical position of the levitating magnet is measured using a linear Hall effect sensor and the current in the electromagnet is controlled using a microcontroller. The system has three push buttons to adjust the vertical position of the levitating magnet and to apply a sinusoidal, square or sawtooth reference signal.