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. DB says:

    Would your team design and build a modified levitation device to meet my own specific needs? It is likely that I would want to purchase several identical devices.

  2. mebrahtom welday says:

    I will like to see the LQG controller design for magnetic levitation step by step since it is mandatory to my project and i don’t have a time to search it until the submission day or tomorrow so if some one is voluntary to help me he/she can respond by the address mebrahtom2112@gmail.com

  3. Ralph Boomer says:

    Haven’t received a response to my email regarding sense placement. You alive Shahriar?

  4. Schalk (South Africa) says:

    Thanks for the great tutorial. I built one about a year ago and decided to fire it up again today. It works perfectly after tweaking it for a bit. I discovered that my top hall sensor should be moved slightly to the side of the core of the Electro magnet (Off centre) to eliminate the levitating magnets from jumping up and down.

    I started this project with a very limited knowledge of electronics and I am confident that anybody, and I mean anybody could achieve success with this project if you can find the component and study the tutorial very carefully.

    I think all of us would appreciate it if the next magnetic levitation tutorial will be REPULSIVE MAGNETIC LEVITATION.

    Thanks again

    • jose says:

      Hi, I´ve read your comment about tutorial-and-experiments-on-magnetic-levitation/ and how you changed the position of the hall sensors. COuld you be a little bit more specific?. I´ve placed two sensors, and the one in the top goes from 520 to 527, but the one in the bottom changes from 560 to 840 aprox (all these reads without placing any object close to them, just the coil effect).

      Thanks in advance, and happy new year

  5. Ralph Boomer says:

    Please specify the orientation of the two ss494b sensors. I presume their N/S polarity is identical with the coil N/S. Sensor output on a 5volt supply ranges positively from 2.5v to 4.95v as the magnet approaches in that position. Is this the orientation you used? – Thanks in Advance, Ralph

    Your style in presenting is refreshing!

  6. Sha says:

    Hello dear…
    I make thus design but i do not get the point which is weight is stable position…i use foe pwm ic 502 motor drive module and hal effect sensor…circuit is working but the point which stable poistion weight is not get it please help me to out this problem.

  7. Praveen karuvoolam says:

    is this system is working. i am tracking for pwm module for the 3 month.i am not getting it. is that i can use any alternative for pwm controller in cheaper and best

  8. 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

  9. Pike says:

    coil ohm .How much?

  10. lorincz huff says:

    I LOVE YOUR SITE !!!!!!

  11. 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.

    • wim peeters says:

      I think the magnets woeld turn 180°
      You can test this with the current implementation by holding the magnet upside down.

  12. Yoram says:

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

  13. 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.

  14. 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

  15. 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.

  16. 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

  17. 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


  18. mark says:

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

  19. 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.

  20. 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????

  21. 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?

  22. 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)

  23. 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

  24. 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.


  25. 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?


  26. 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

  27. 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

  28. 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!

  29. 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!

  30. 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.

  31. 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!


  32. 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

  33. 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?

  34. 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 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Social Media

  • Administrator

  • Archives

This site is protected by Comment SPAM Wiper.