Magnets aren’t magic, but sometimes you can do things with them to fool the uninitiated — like levitating. [Jonathan Lock] does that with his new maglev desk toy, that looks like at least a level 2 enchantment.
This levitator is USB-powered, and typically draws 1 W to 3 W to levitate masses between 10 g and 500 g. The base can provide 3 V to 5 V inductive power to the levitator to the tune of 10 mA to 50 mA, which is enough for some interesting possibilities, starting with the lights and motors [Jonathan] has tried.
In construction it is much like the commercial units you’ve seen: four permanent magnets that repel another magnet in the levitator. Since such an arrangement is about as stable as balancing a basketball on a piece of spaghetti, the permanent magnets are wrapped in control coils that pull the levitator back to the center on a 1 kHz loop. This is accomplished by way of a hall sensor and an STM32 microcontroller running a PID loop. The custom PCB also has an onboard ESP32, but it’s used as a very overpowered USB/UART converter to talk to the STM32 for tuning in the current firmware.
If you think one of these would be nice to have on your desk, check it out on [Jonathan]’s GitLab. It’s all there, from a detailed build guide (with easy-to-follow animated GIF instructions) to CAD files and firmware. Kudos to [Jonathan] for the quality write-up; sometimes documenting is the hardest part of a project, and it’s worth acknowledging that as well as the technical aspects.
We’ve written about magnetic levitation before, but it doesn’t always go as well as this project. Other times, it very much does. There are also other ways to accomplish the same feat, some of which can lift quite a bit more.
Thanks for the write-up Tyler! It’ll be fun to see if anyone either builds one of their own or extends on this, e.g. doing something useful with the ESP32 or something more interesting than just lighting LEDs on the levitator.
ask to make a decent magnetic bearing.
One that will allow the wheel to move without friction.
“F’ing Magnets, how do they work?!” -William Gilbert, 1543 AD
I’ve had a rotating 9″ Earth in the corner of the room for years and still love seeing it spin. I’m not sure about trying to make something from scratch though.