Electromagnetic Levitation

Electromagnetic Levitation

Our goal is to levitate a magnet with electromagnetism. The magnet is electromagnetically suspended from the top of the box and the electromagnet is automatically regulated in order to keep the magnet at the right height.

Modeling

3D Model of the box

We have one 30cm box with a little bridge on top of it. On the bridge there is an electromagnet and an Arduino powered by a DC power supply. Under the bridge, a hall effect sensor which will control the electromagnet to increase or decrease the magnetic field according to whether the magnet is close to the electromagnet or not.

Electromagnetism

The DC power supply is hooked up to the Arduino board. Since the electromagnet needs a varying current, the output of the Arduino is a PWM that chops the current so that the average is the intensity needed to lift the magnet.

Electrical schematic of our prototype

The hall effect sensor is connected to the analog input of the Arduino. It senses the magnetic field, and since the magnetic field is inversely proportional to the square of the distance, we can deduce how far is the magnet from the electromagnet. According to the distance, we change the duty cycle of the PWM in order to change the average intensity. The PWM is then connected to a MOSFET N that will regulate the current going to the electromagnet.

Control System

The control system was probably the most difficult part. We searched the internet looking for help but found nothing relevant. There was a lot of information about electromagnetic levitations and a lot of tutorials, but none fit our budget and deadline. We ended up using a PID controller for Arduino and solved our problem empirically by tweaking its constants and iterating until we get the desired results.

Conclusion

At the beginning of the project we searched the internet to find where to start. Unfortunately, we hardly found anything helpful . Even the teachers couldn’t help us It was the first project that required a real knowledge in electronics, prior to that we didn’t know PWM existed and we never used a transistor. However, this experience has lead us to build up new skills over the theory we had in classes.
So it taught us about the real implications of physics phenomenons and how to use them to our advantage.