Introduction: Electromagnetic Floater

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

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)

Tools:
- Soldering Iron
- Hot Glue Gun
- Desoldering Pump
- 3rd Hand
- Plexiglas cutter

Step 2: Prepare the Base

Once the materials are gathered, the cases needs to be prepared. For my base I used a project box from The Source (Radio Shack in U.S.) to house the electronics, and a ring box to house the magnets and sensor assembly.

First you need to drill a hole in the back of each box for the support wire to go through. Also cut holes for the power switch, power input, set height button and LED indicator. You also need to cut most of the bottom of the ring box out, just leaving a lip on the bottom.

Support the ring box above the base box by using some heavy gauge steel wire, bent to the shape and height you want. Next, wrap the electrical wire around the steel wire, then cover all of it with the vinyl tubing (optional) as seen below.

Next, bend the bottom end of the support in a zig zag pattern and use hot glue to secure it to the inside of the bottom case (see second picture below). I secured the ring box to the top of the support wire by using a magnet, but it could also stuck on by hot glue.

Step 3: Install the Magnets and Sensor

This step is pretty straight forward, first solder the electromagnets to 4 of the wires. As you attach the parts be sure to use a continuity tester to find and label the corresponding wires on the other end. At this point it is not too important which way the electromagnet coils around the magnet, it can be adjusted later. But be sure to connect both electromagnets the same way.

When you put the electromagnets in the box when finished, put the permanent magnets inside the coil.

Next cut a piece of Plexiglas to fit inside the bottom of the ring box but so the bottom lip holds it up. The next step is to attach the IR emitters and sensor to the Plexiglas as seen in the pictures below using hot glue then finish attaching and labeling the wires.

Step 4: Build the Electronics

For this step you probably should assemble the electronics on a solderless breadboard before soldering them together. The schematic to build the circuit is attached along with the hex file to load on the microcontroller. The Arduino - 0007 code file is in the introduction so you can tweak it or make changes as you need.

It is very important to plan where all of the parts go, so all of the electronics will fit in the box the first time, If not it could be very frustrating and cause much grief.

It is also important to note that the NPN power transistor(s) will heat up, to overcome this I mounted them to contact the aluminum base of my project box, This way it acts as a heat sink, preventing a spectacular fire. You will also need to come up with something similar to remove most of the heat from the box.

Once the electronics are built, there is a section of code in the program to uncomment and and then load onto the chip to test the orientation of the coils. It pulses the coils off, pulling up, and pushing down, also indicated by the LED. If you hold a magnet under the electromagnets and it doesn't follow the pattern, reverse the wires.

Step 5: Make Some Objects to Float

This part is only limited by your imagination. I have found that if the objects to float are too small, or two short relative to the width, are harder to get to float.

The object shown here is a heavy cardboard tube covered in electrical tape with 2 1/2" diameter x 1/4" thick rare earth metal magnets (from Digi-Key). I have also successfully floated a die I crocheted using a granny square pattern, and a ruby made from construction paper.

Step 6: Start Floating

All that is left to do is start floating the objects.
This is done by holding the object under the magnets and slowly bringing it up. When It nears the point where it wants to float up, push the button. This will set the level to float at to the current height.

Next, hold it just below where you set the hold height, so the LED lights up. Hold it there until it simply floats out of your hand. This happens because the microcontroller slowly adjusts the hold height up, to where the electromagnets have enough power to control the object.

You may also notice some buzzing coming from the electromagnets. This can be easily fixed by inserting some padding around the electromagnets.

If you do make this I would love to see some photos. It would also be great to hear any comments you have.

Comments

author
AndreaD20 made it!(author)2017-01-26

Hi, it's been a real challenge!. I finally used IR leds, more stable. Do you know about any other interesting projects involving hall sensors?

Regards,

author
AndreaD20 made it!(author)2017-01-26

Here is a short video:

https://youtu.be/RqrPMbACC7s

mlev.gif
author
SwainS made it!(author)2016-12-18

Where did you put your permanent magnet???

author
LearningProcess made it!(author)2016-10-04

Is it necessary to put Arduino?

author
RobinD2 made it!(author)2015-05-26

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).

author
Tigerlol made it!(author)2016-08-20

You should try adding a smoothing capacitor. The AC can generate a frequency through the electromagnets

author
Tigerlol made it!(author)2016-08-20

Sorry what I ment to say is the transformer might make a frequency in the circuit

author
jhardenberg made it!(author)2016-06-28

I want to ask, what type of full H bridge IC that you use there?

author
headslant made it!(author)2016-04-17

I didn't Make it this way, but i made one. I have an instructable coming out soon on it.

P4050038.JPG
author
headslant made it!(author)2016-04-19

See it here https://www.instructables.com/id/Magnetic-Levitation/

author
headslant made it!(author)2016-04-17

I didn't Make it this way, but i made one. I have an instructable coming out soon on it.

P4050038.JPG
author
CalinB1 made it!(author)2016-03-03

Do you have to set the location of the floating object with the button? Or can you test it find the point where it floats then turn off the current flowing to the magnets and let it drop. Then when turning the current back on, will the object return to the position that you initially tested??

author
brendan.a.jordan made it!(author)2016-01-28

Also, where is the arduino file you mentioned??

author
brendan.a.jordan made it!(author)2016-01-28

Hey, I am looking at your project and hoping to build one. I just wondered about the wire coils, how many times were they wound around the magnetic core??? Please reply ASAP, I'm fast encroaching a deadline and need all the pointers I can get. Thankies!!

author
nerd12 made it!(author)2013-01-10

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 )
what do you think?

author
drflav made it!(author)2015-12-30

You will need copper which repels

author
jhardenberg made it!(author)2015-05-26

Is the NO Button a push button or a switch?

author
Kaptia+Teramo made it!(author)2015-08-03

no button would be a normally open button

author
%E5%B0%8F%E9%87%91%E7%89%9B made it!(author)2015-04-02

Ttat is magic ! I don`t know why him can control the power. Who can help me ,I want to do such things.

author
james.hesp made it!(author)2015-01-26

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

author
Mr+AbAk made it!(author)2015-01-08

Awesome ible...

author
EZtechProjects made it!(author)2014-06-09

AWESOME!!!

author
DehLeprechaun made it!(author)2010-06-05

wonder if you could beef it up and make floating furniture

author
natman3400 made it!(author)2010-06-22

And then sit in it. That would be awesome. Or a floating bed-sized ferofulid ball that you could sleep on.

author
Jo-dan made it!(author)2011-08-22

it would suck if it stopped working when you were sleeping SMACK!

author
ob103ninja made it!(author)2014-05-30

"Hey, what happened to the power..." *BOOM* "Whups, grandpa's up"

author
DehLeprechaun made it!(author)2010-07-01

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.

author
natman3400 made it!(author)2010-07-02

Fill a waterbed with it?

author
DehLeprechaun made it!(author)2010-07-03

that would probably work better but theres no telling what shape it would be or if it would float at all

author
dombeef made it!(author)2010-10-31

It would spike you though

author
natman3400 made it!(author)2010-11-06

make it weak then

author
dombeef made it!(author)2010-11-07

It would just be a regular water bed then

author
killerdynamo made it!(author)2010-12-30

no, it'd be a really badass waterbed

author
natman3400 made it!(author)2010-12-30

It be a really badass floating water bed. PWNT fools.

author
dombeef made it!(author)2010-12-31

It would be a watery blob,if it was in a skin of some kind it would be a cool bean bag chair

author
killerdynamo made it!(author)2010-12-31

and if your pants were magnetic... now we're getting somewhere! haha

author
dombeef made it!(author)2011-01-02

Owww, ultra wedgy

author
pyrotech45 made it!(author)2010-10-20

they actually do have floating beds but they are expensive

author
DehLeprechaun made it!(author)2010-10-20

send me a link i'd like 2 luk at it

author
pyrotech45 made it!(author)2010-10-24

http://zedomax.com/blog/2007/02/18/magnetic-floating-bed/

author
ob103ninja made it!(author)2014-05-30

I need to check this out at home

author
Chimex14 made it!(author)2010-12-05

DANG!

author
gtyrfdrty made it!(author)2010-11-17

holy crap thats cool

author
ob103ninja made it!(author)2014-05-30

I wonder if you could coat a gemstone with molten iron on one end and float it.

Or if you could float liquid iron itself, since the process of making permanent magnets does involve melting the metal.

author
azlittleripper made it!(author)2014-05-03

do all of the parts create the micro controller or do you need both

author
Succorbenoth made it!(author)2014-01-23

Where did you get your program from?

author
0505STAZ made it!(author)2013-02-21

Could you get the items part numbers? I am trying to make it and it is hard to find it without it.

author
Super_Nerd made it!(author)2011-09-19

This would look cool levitating ferro-fluid.

author
AJMansfield made it!(author)2012-10-15

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.

author
AJMansfield made it!(author)2012-10-15

Use it as a thermometer or something; have the hover height depend on the temperature.

About This Instructable

438,248views

1,303favorites

License:

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