This Instructable will show you how to make a device that can float almost any object with a magnet in it.

It is much like the floating globes you can buy, except it works by balancing the forces of permanent magnets with electromagnets, rather then simply using combinations of permanent magnets.
This is done by using a microcontroller and an IR sensor to detect where an object is floating below. Then based on a set value, the microcontroller uses the electromagnets to to hold the floating object at a given height.

The place the object floats at depends on the weight of the object and the power of the magnets in the object. The height is set by holding the object under the magnets and sensor and pushing the button.
The object floats at the point where the force of gravity down equals the force of the magnets pulling up, which allows it to use non-industrial electromagnets and less power to float. The program also dynamically adjusts so the object is always at the perfect height.

I decided to make the electromagnetic floater because I have always been fascinated by the floating globes in the store, but I never wanted to pay their prices, and I never liked how they only floated objects that you had to buy or came with it. So, I decided to make my own that could float anything with a magnet. The results are what you see here.

Step 1: Materials

- ATMega168 Microcontroller
- 1 16-20 MHz Crystal
- 28 Pin Socket
- Dual Full H Bridge IC
- 1 Power NPN
- 2 Electromagnets
- 1 Bicolour LED
- 2 IR LED
- 1 IR Photodiode
- 1 5V Regulator
- 2 Leveling Capacitors
- 1 SPST Switch
- 1 NO Button
- 1, 470 Ohm Resistor
- 1, 5 Ohm Resistor
- 1 Universal Breadboard
- 2 Cases
- Plexiglas
- Solder
- Hot Glue
- Steel Wire
- Vinyl Tubing
- 3 or more 1/4" diameter x 1/4" thick rare earth magnets (for the base)
- 2 or more 1/2" diameter x 1/8" thick rare earth magnets (for the objects)

- Soldering Iron
- Hot Glue Gun
- Desoldering Pump
- 3rd Hand
- Plexiglas cutter
<p>Awesome work..</p>
<p>Is the NO Button a push button or a switch?</p>
no button would be a normally open button
<p>I have one of these devices -- a levitating globe. It's driving me bonkers because when the globe is suspended, I can hear a persistent noise. When it isn't (just glued to either the upper or lower magnets), the sound stops. What can I do to fix this? I find the noise very distracting, but nobody else can perceive it (I can hear significantly higher pitches than the average person which is why I think I'm picking it up).</p>
<p> <br> <br>Thanks for taking <br> the time to discuss this, I feel strongly about it and love learning more on <br> this topic.</p><p><a href="http://www.monacopropertylistings.com" rel="nofollow">immobili monaco</a></p>
<p>Ttat is magic ! I don`t know why him can control the power. Who can help me ,I want to do such things.</p>
<p>Hey dude I'm having a hard time understanding the power inputs, I haven't worked from electrical schematics before and the H bridge I ordered is not like yours, any chance I could get your email and I could rack your brains? Cheers James</p>
Awesome ible...
wonder if you could beef it up and make floating furniture
And then sit in it. That would be awesome. Or a floating bed-sized ferofulid ball that you could sleep on.
it would suck if it stopped working when you were sleeping SMACK!
<p>&quot;Hey, what happened to the power...&quot; *BOOM* &quot;Whups, grandpa's up&quot;</p>
i think the ferofluid would be a bad idea the second you lay on it you would fall through and be soaked in it. not to mention you might drown.
Fill a waterbed with it?
that would probably work better but theres no telling what shape it would be or if it would float at all
It would spike you though
make it weak then
It would just be a regular water bed then
no, it'd be a really badass waterbed
It be a really badass floating water bed. PWNT fools.
It would be a watery blob,if it was in a skin of some kind it would be a cool bean bag chair
and if your pants were magnetic... now we're getting somewhere! haha
Owww, ultra wedgy
they actually do have floating beds but they are expensive<br>
send me a link i'd like 2 luk at it <br>
<p>I need to check this out at home</p>
DANG! <br>
holy crap thats cool<br>
<p>I wonder if you could coat a gemstone with molten iron on one end and float it.</p><p>Or if you could float liquid iron itself, since the process of making permanent magnets does involve melting the metal.</p>
<p>do all of the parts create the micro controller or do you need both</p>
<p>Where did you get your program from?</p>
Could you get the items part numbers? I am trying to make it and it is hard to find it without it.
I need it by the end of the week.
Please hurry!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
would it be possible to make this into a hand held version by reversing the magnets to it is being pushed up rather than pulled up? this could be made into a glove similar to an iron man repusler. it will have to be a powerful electromagnet, but is would be Definitely worth it! the effects are ENDLESS! Magneto! Hadoken! Deathstar! dragonball!(have not been a fan of the last two, so no clue :P ) <br>what do you think?
This would look cool levitating ferro-fluid.
I totally agree. Although you'd need a permanent magnet for the ferrofluid to glom around, since it can only hover things that are already magnetic. Or invent a type of ferrofluid that naturally has its own field.
Use it as a thermometer or something; have the hover height depend on the temperature.
So if I got this correctly - the circuit uses the feedback of IR led-s to regulate the current going trough the coil to keep the downward force constant <br> <br>but then why 2 electromagnets? <br>can you label the pins on your H-bridge symbol (never seen that symbol, so I don't know what pins do what)? what do 2 Leveling Capacitors do? it is a bit complicated to understand <br>I would like to make my own but it isn't very straight forward
he used an unsusal sybol but i found it on this page <br> <br>http://www.adafruit.com/datasheets/l293d.pdf <br>took me 3 months of looking be happy :)
Thank you very much!!
Hi every one i would like to know how many turns should be used on the electromagnets and also what size wire <br>Bertmci
This is a great project! I'm hoping to recreate this with a more powerful setup since I'm hoping to levitate a slightly heavier object. However, in looking at a bunch of EM levitators, I see people either use a hall effect sensor or an optical setup like your to sense position of the object. This one seems much simpler than having to measure the magnetic field with the hall sensor, are there any drawbacks from it? What are the benefits of using the hall sensor instead?<br><br>
Can anybody tell me how exactly to assemble the electronics, as the tutorial is to advanced for my primordial brain.
How about if you changed the microcontroller and LED and thar stuff with a potensiometer.... Could it still work??<br /> <br />
you can try to use negative feedback opamp and some analog circuit design to achieve the same thing. i believed.
no it needs to compensate for height. if the object being levitated is too high it turns off the magnet and vice versa. with a potentiometer it wont be able to automatically adjust. also it would be impossible for someone to to control it because they couldn't react to the changes fast enough.

About This Instructable


1,174 favorites


Bio: Currently doing masters in Mechatronics Engineering, but still create in my spare time
More by J_Hodgie: Cheshire Cat Pumpkin animated with LEDs Walking Papercraft Mech Warrior Geared Christmas Card
Add instructable to: