Ask HN: have you built an electromagnetic levitator?

7 points by idm ↗ HN
Theoretically, what's the biggest gap you could create between the levitator and the object? Why is it that all examples of levitation I've seen on youtube lift an object just an inch or two?

The specific challenge is to suspend a Canadian penny from the ceiling; it's primarily steel, and strongly influenced by magnets. My current strategy is to:

- use an arduino for the controller

- drive an electromagnet with a sinusoidally modulated voltage

- use a hall effect sensor to detect the distance of the penny

- in the arduino, change the maximum voltage of the electromagnet, based on the voltage coming from the hall effect sensor

I don't know how the penny will behave when it's in the field, so I don't know if the hall effect sensor will be able to detect the penny's distance. Obviously, when the penny isn't magnetized, it will be invisible to the sensor, but I hope it will behave differently when it's actively being levitated.

I am not sure why this system will become less stable as the distance from the electromagnet increases, but it seems like it must. It also seems like the amplitude of the sine wave is going to need to increase, based on the distance from the penny, to cause grosser adjustments to the penny. I'm assuming that because in the opposite case, when the penny is close to the electromagnet, it seems like you will only need to make small adjustments to keep the penny a specific distance. I assume the relationship between distance and the amplitude of the sine wave will be non-linear, which will determine the maximum distance the penny could ever be.

Here is a specific question: how do I determine the force of attraction between the penny and the electromagnet given the distance and the voltage of the magnet?

This is still in the earliest stages, so any advice at all will be appreciated!

6 comments

[ 0.20 ms ] story [ 24.1 ms ] thread
The reason they only lift an object only an inch or two (and usually less) is that magnetic field strength falls of to the cube of the distance.

I think you'll be learing a lot about servo systems, search for PID control loops.

And good luck, that's a tricky thing you're trying to do there.

Be sure to post it if you got it working!

Thanks jacquesm!

The more I look into the problem, the more challenges I'm finding. A friend of mine did this for his master's thesis back in 2002, so I know it's not impossible, but he had a strong background in EE (whereas I'm a relative n00b).

Also, thanks for the search query. I'm checking on it now.

It's almost a perfect storm of inconvenient equations. Magnetic field strength drops off as the cube of the distance, so you want to increase the current in the coil, but power loss (and thus heating) in the coil goes up as the square of the current, while field strength is only linear.
Or you could use a high temperature semiconductor. True, there are cooling issues you'd have to overcome but the thing about levitating using a semiconductor is it is self-stabilizing.
Assuming the penny is ferromagnetic you might be able to use DC to drive the electromagnet (i.e. you don't need to excite a current in the penny to get it to be attracted to the magnet).

Also, the magnetic field is going to be proportional to current, not voltage (and because electromagnets are highly inductive, you can't assume the two will be linearly proportional).

In fact you might be able to use the current rise in response to a voltage pulse as a measure of the inductance of the magnet/penny system and use that to measure the distance.

The old levitating spheres that The Sharper Image sold used an optical system (IR LED and photodiode) to detect the position of the sphere and modulate the magnet (arranged horizontally just above where the sphere would hang), but that might not be as impressive as having it hang out in space.

Sounds like a tricky problem :)

Thanks for correcting the voltage/current error - you're totally right about that.

Great idea about the voltage pulse! Let me see if I have this right: with a known voltage, the current will rise in proportion to the nearness of the penny? That is, for a fixed voltage, when the penny is closer, the current will be higher?