Watch this Maker suspend a neodymium magnet in midair with the help of an Arduino Mega.
If you went to enginering school, you probably remember a class called “Control of Dynamic Systems” or something similar. One of the most common concepts that you likely forgot the math behind was the “PID,” or proportional-integral-deriviatave, loop. This crazy-sounding name basically means that it takes three mathematical concepts, factors them into an equation, and outputs the correct amount of power to, say, a heating element on an oven.
If you have forgotten the math behind this, you can conveniently just buy a box called a “PID controller,” tune it, and forget all about Laplace transforms. On the other hand, as shown in this Instructables piece, you can make your own PID controller using an Arduino Mega.
As if controlling one power source wasn’t challenging enough, the setup shown below can balance four electromagnets’ power outputs to keep a neodymium “floater” suspended between them. The suspended disk wobbles slightly in the video, so it’s possible that a more developed setup or different tuning values could cut down on these vibrations. Maybe this could even be perfected to the point where these oscillations are nearly imperceptible.
Oscillations or not, it’s really an amazing project, and showcases what can be done with a firm grasp on PID-mathematics and a low-cost microcontroller setup! Mesmerized? You can check out the entire build here.