Tutorial and Experiments on Magnetic Levitation


In this episode Shahriar demonstrates one of the simplest magnetic levitation circuits. First, the basic concept of magnetic levitation is examined. Two different methods of detecting the location of the levitating object is presented and the Hall effect sensor method is chosen. A semi-digital overall system is implemented where a PWM control IC is employed to control the magnetic field strength. The block diagram and functionality of this IC is presented. Finally, the schematic of a dual-Hall effect sensor solution is presented. The circuit is built and tested in both open-loop and close-loop configuration. Magnetic levitation is demonstrated with the capability of adjusting the levitation location. The schematic of circuit can be downloaded here and the electromagnet can be purchased from here.



  1. Rahul Kumar says:

    Great Help!
    Tho i wud like to see the more stable version of this system and also the hardware implementation of the IC used …..
    i’m opting this topic for my project …wud be thankfull if u cud send me some info of the above(or any report) at rahulkumar12812220@gmail.com

  2. Pike says:

    coil ohm .How much?

  3. lorincz huff says:

    I LOVE YOUR SITE !!!!!!

  4. Vanessa says:

    Hi, I really liked your video and I was wondering about the suggestion you gave to improve the circuit. You said that just by adding a transistor it would be possible to change the direction of the magnetic field, another point is how one defines the point when the repulsion action should work and not the attraction force?, I guess this should be switched some how, could you give more hints about this. Thanks for your reply.

  5. Yoram says:

    Top videos one by one. Very stucural and yet easy
    to follow and understand.

  6. Onurkan says:

    Hello Shahriar,

    Thank you for the experiment, my object which i want to levitate is about 200g, could you help me about it.

  7. Gaurav says:

    Hello Shahriar,
    Firstly thanks for such a fantastic tutorial!! We are building the same for our college project.We cannot proceed because we do not have the electromagnet. Please can u specify the rating of the electromagnet?? We checked the amazon link but we would like to obtain it locally so please mention the rating of the electromagnet.
    Thanks again

  8. RAWAZ says:

    Dear Shahriar;

    I appreciate your acknowledgments and these are helpful really,could you guide me more about the controller which you have designed,I am going to using PID controller for such a solenoid type maglev using FPGA,I appreciate your advices.

  9. Abhiram says:

    Its really a great video & cool project. I’m having some doubts regarding this. Can I levitate objects with around 250g. And can we take this still further by variable loads, even with the variable loads can we bring back the object to the same specified position?
    Please in your leisure help me with your valuable suggestions.

    thank you
    with regards

  10. omid says:

    Dear Shahriar

    I am really proud that an Iranian engineer propagates these videos with this level of knowledge.
    Actually I’m doing mechatronics at University of Adelaide and we are working on a project which needs to levitate small particles.
    Our particles are made of Nickle oxide and AL2O3(Alumina) with dimension of around 2mm diameter(sphere-like) and they can be attracted by magnets. It is objective to levitate them but we are not sure that it is possible to detect their position with Hall sensors because particles are not permanent magnets.
    On the other hand, we are not sure that we can measure the place of such a small object with optical sensors.

    Could you please give me an idea how I can implement it?

    At the end, thank you for uploading such a detailed demonstration of magnetic levitation system


  11. mark says:

    What if the material floating is a non magnetic material? Is the diagram still useful?

  12. Sam says:

    I really enjoy your videos. I built your magnetic levitation circuit and also found it to work but the length of time for the magnets to stay in levitation was very dependent on my ability to place the magnets without inducing oscillations or rotations. I started with four disc shaped magnets but then found that by placing one of the magnets on the desktop directly under the pole of the electromagnet (in opposite polarity to the remaining three magnets) that the repulsion from the desktop magnet provided just enough force to allow much longer levitation times. I find that while in levitation that the total current draw from my power supply at 10 vdc is 350 to 390 ma. I’m interested in hearing about any refinements you might have to your original design.

  13. amol says:

    rply me its urgent

    hey friend i really like your project. but in the last you didn’t mention the type an number of diode and electrolytic capacitor. please tell me i need ….. ITS URGENT

    • wasim says:

      please tell me about the query you have asked about the levitation project on THE SIGNAL PATH…that is related to diode and capacitors used in magnetic levitation????

  14. Pablo says:

    Hi. Really cool approach! I am planning to build this with a friend, but we were curious on how we could make it even more stable. Would you insert a lead compensator or something?

  15. Pasquale says:

    As such, it shouldn’t be too difficult to spend some time constructing a database
    of tables similar to what is suggested at where
    they have provided a sample database spec for use in a hotel reservation application.
    So far, reactions on the acquisition, as well as to
    the announcement in the new business model, have been mixed,
    but only time will state whether or not only a revamped version with the massively popular peer-to-peer website will probably
    be as successful since its predecessor. Typically, the My Documents folder may be
    the best anyone to use.

    Also visit my web site :: the pirate bay (Pasquale)

  16. Kali says:

    May I simply say what a comfort to uncover someone who truly understands
    what they are discussing over the internet. You certainly understand how to bring a problem to light and make it important.
    More people should look at this and understand
    this side of the story. I was surprised that you are
    not more popular since you most certainly possess the gift.

    Feel free to surf to my website; kickasstorrents

  17. Gerard says:

    Any further info on orientation of the sensors and polarity of the magnet?

    Also, I second the comment on more info on improving the design.


  18. Norse says:

    Thank you for the great video. I built this and found the circuit came together quite nicely with some minor tweaks. Any suggestions for where I can find info about how to improve the design as you were suggesting at the end of your video?


  19. Irish says:

    You can view the latest weather updates by just taking a look into your phone’s home screen, where it automatically posts weather info, and all sorts of without having to launch the application. By this, you are reinforcing that negativity and attracting to yourself MORE. The most enjoyable facet of Revenge with the Fallen is its sheer familiarity.

    Also visit my web site: torrent proxy

  20. sarma says:

    basically congrats for such nice experiment. having worked with electromagnets for 40 years in telecom,
    i really enjoy your project. i had a basic doubt. please try to indicate the orientation of the upper and lower hall sensors. I hope both the legend facing upwards(means top one would see the back of sensor)

    can you clarify at your leisure please.
    thanks and i admire once again the brain behind the project.

    all the best

  21. Gerard says:

    Your videos are great! Thank you so much for taking the time to make them, I’ve learned a great deal through watching; I only wish there were more!

    Btw, It looks like there is a typo on the schematic for the PWM IC, KA7599 should be KA7500 like the data sheet in the video shows.

    Keep up the great work!

  22. Yue Fan says:

    Hi Shahriar,

    Where did you obtain the KA7599? I have only been able to find the 17599 from Maxim which has extra features.

    We are putting one together for Bring Your Kids To Work Day and think they will find it really exciting… will definitely recommend your blog in the handouts!

    Thank you!

  23. Eric says:

    Hi, I built this setup almost exactly the same. I have the same electromagnet and circuit components. The circuit components appear to be working as expected, but so far I haven’t been able to get it to levitate. It is acting unstable no matter where I put the magnet. It tries to levitate, kicking the magnet on and off. You can feel it, it is just never getting into the duty-cycle zone.

    I am wondering if you had to try different power levels? Also, how sensitive is the setup to different magnets as my magnets are not exactly the same? I am not sure if I need different magnets, but they are very similar, perhaps a little smaller in diameter.

    P.S. I have had some success by removing R2 and R8 (in the pdf schematic) although it is a bit unstable.

  24. Jovian says:

    Shahriar, all your videos are great, I particularly enjoy them because you go into a lot of detail that other “bloggers” don’t. You also cover some interesting topics that I would never have thought about before. I cannot wait for the PLL video, should prove to be very interesting.

    Keep up the good work!


  25. Dan says:

    Great video, I’m definitely going to do this experiment with my son… I’m buying a new set of screwdrivers, I notice you have a nice set… where did you get them? And I like how you have them organized. Thanks Dan

  26. AA says:

    Awesome video!
    I am wondering why you connected the Vfb and the reference voltage from the potentiometer to both inputs of the IC? Is that necessary for correct operation?

  27. Will says:

    Great video! A very interesting and cool topic that I hope to experiment with when I get some free time. I’m looking forward to a future PLL video as well.


Leave a Reply

Your email address will not be published. Required fields are marked *

  • Social Media

  • Administrator

  • Archives