How to burn lots of cash and kill yourself trying to do something that was around in 1966.

The answer is yes. You can make a magnetic levitator out of digital electronics. Unfortunately, despite being stable enough to suspend objects in mid air, it's too unstable to translate the objects over time, and hence completely useless.

Most levitators work by sensing the position of a permanent magnet floating in air with a hall effect sensor mounted below the electromagnet. The electromagnet constantly adjusts its power to keep the permanent magnet floating.

The levitators on the internet are all expensive and analog because #1 most people aren't very good at writing software, #2 it's hard to justify getting a microcontroller working for something so simple and #3 magnetic levitation is more stable with intermediate field strength, rather than on or off. Unfortunately, we have many gadgets and can't afford a dedicated set of discrete components for every gadget. The digital circuit is a single circuit that does everything.

The limit with the levitator is the inability to react to height changes exactly when they happen. No matter how hard you try, no matter how tough you are, your feedback loop always lags in a way which amplifies over time. The solution for analog levitators is to use more magnet voltage than required when the object is shaking fast and just enough magnet voltage when the object is shaking slow.

Since digital levitators can't change magnet voltage, their solution is to guess where the object is based on the speed of the object. If the object is moving down fast, subtract a little from the detected height. If it's moving up fast, add a little to the detected height.

This schematic shows specific parts in the simplest digital levitator. The method by which you program the microprocessor determines what extra connections it needs. This circuit requires running a PIC18F1320 at 40Mhz.

A large BJT can be more durable than the MOSFET but less efficient. Small BJT's won't do it because the inductance is too high. A full H-bridge can increase margins by providing some pushing force if the object gets too high, but isn't necessary either.

The hall effect sensor is very fragile. One got destroyed by the USPS. The more sensitive the hall effect sensor is, the better.

Not much to see in the real thing. Here's the source code.



The source code is useless unless you use gpasm, exactly the same programmer, and exactly the same bootloader we use, but it gives you an idea how the algorithm is done in PIC18F1320 assembly language. This source code only damps based on falling speed, not rising speed.

A $2 magnet from Radioshack is lifted.

The electromagnet retains a lot of flux when it's off and it saturates the hall effect sensor when it's on. The solution is to pulse the electromagnet and take height readings when it's off.

38 MB

Finally, have a movie of different objects being levitated by different algorithms. One of the levitations was an algorithm that changed height periodically, but only the tiniest amount, and it eventually failed.

Here we have a method for winding very large electromagnets with a hand drill and a crotch. The trick is to use balsa as temporary end pieces and tape the wire to the balsa. The drill must be capable of very slow RPM. The magnet wire doesn't need to be wound perfectly, just evenly enough to look like a cylinder. The balsa can be ripped off when finished.

Removing the bolt head does nothing unless you use the H-bridge to repell. Coreless electromagnets don't work because the flux is too widely spaced.

Fluid agitation

The most practical use of levitators is agitating fluid since there are no parts to wear out and there is no noise. Fluid agitation in mid air is very hard. We achieved contact lens agitation with TIP100 transistors in the H bridge and a 20V power supply. For agitation, the least sensitive hall effect sensor was better because the gap under the electromagnet needed to be as small as possible.

1280x720 8 MB movie

Unfortunately this effect required perfectly matched weight, temperature and levitation height. It would never be practical for daily changes in the parameters. Most likely the hall effect sensor isn't fast enough to track an oscillating object and the only reason this worked at all was by matching the resonant frequency exactly.

(C) 2013 Unemployed, flat broke Programmers