3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Electromagnetic Floater

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.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Materials

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
« Previous StepDownload PDFView All StepsNext Step »
462 comments
1-40 of 462next »
Mar 23, 2012. 9:51 AMAdielFernandez says:
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?

Jan 30, 2012. 4:14 AMconnormarve says:
Can anybody tell me how exactly to assemble the electronics, as the tutorial is to advanced for my primordial brain.
May 2, 2010. 1:01 AMpenghars says:
How about if you changed the microcontroller and LED and thar stuff with a potensiometer.... Could it still work??

Jan 7, 2012. 3:19 AMh2osteam says:
you can try to use negative feedback opamp and some analog circuit design to achieve the same thing. i believed.
Aug 31, 2011. 6:28 AMbears0 says:
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.
Nov 21, 2011. 11:43 AM1dog789 says:
what is the zipped file?
Nov 10, 2011. 4:24 PMJGsoldier says:
where would you get all of the materials?
Nov 8, 2011. 8:48 PMCMNDR says:
Anybody ever figure out how or where he got his coil, or the specs of the coil so I can make something similar?
Nov 8, 2011. 5:28 PMCybot Rules says:
It reminds me of the look of some coils i grabbed from the driver coils from a floppy drive motor.. Wortha look anyway and off memory there is 6 in one drive :)
Nov 8, 2011. 6:20 PMCMNDR says:
Those look really big to be located in a floppy drive. I could see one maybe but not six.
Mar 3, 2010. 7:28 PMCMNDR says:
Exactly how many transistors or voltage regulators are you using? Your schematic calls for one but I see two in this picture. Also on later picture I see another two are located underneath the board itself. What are these used for or are they the ones that were located on the top but have been moved under the board.
Nov 8, 2011. 5:35 PMmacnomad84 says:
I dropped a floater in my toilet this morning... Now i have to build another one.
Nov 8, 2011. 2:19 PMblinkyblinky says:
Can I use an Arduino?
Sep 28, 2011. 11:05 PMamruth says:
can i know what type and gauge of wire u used for the electromagnet.
Sep 19, 2011. 6:38 PMSuper_Nerd says:
This would look cool levitating ferro-fluid.
Sep 11, 2011. 5:41 PMtledgerwood says:
saw the name and couldn't stop laughing, imagining a magnetic poo and its uses
Aug 6, 2011. 11:14 AMvzdemon says:
that's really cool, but i wonder if i can use the Arduino2009 instead of create a new MCU.
Apr 29, 2011. 11:16 AMsamirsky says:
1. Is it possible to get a parts list?
Excuse me if this was already posted. I couldn't find it. I am too much of a newbie to know what to buy when I see "Power NPN": there are so many transistors.

2. Is it possible to drive the electromagnet (via transistor/bridge) with the PWM output of the Arduino? Or does this higher frequency switching cause the magnetic field to not behave properly? I ask because this project has inspired me for another project I want to do (and post on instructables, of course).
Jul 15, 2011. 4:29 PMlurkingdevil says:
I too would like to know the answer to question 2.

How does the arduino control the coil in this instructable?
Sep 6, 2009. 1:07 PMrkr says:
How exactly do you load a program onto a microcontroller? I am unfamiliar with this task and I think that you should have included some instructions on it.
May 28, 2010. 11:46 AMantonad says:
ya, me to, need to know, and also the value for capacitor and transistor?

Jul 28, 2010. 2:39 PM16zzundel5 says:
You need to program it with an arduino- I can do one and send it to you for tthe price of the microcontroller and shipping. If you have the microcontroller already, send it to me and I can program it for you for the cost of me sending it back.
Nov 17, 2010. 3:55 AMkucloth says:
Well... not exactly. Arduino is a special micro hardware/software system based around the atmega micros and is actually not nearly as useful as everyone seems to think it is. To program a microcontroller, you need a compiler program to write the code on and actually load it into the micro. (tons of free ones like WinAVR available online, just Google it). You also need a cable to connect the port (serial, parallel, USB, etc) on your computer to the micro to program. It's not that complicated, but it does take a bit of practice. I am sure there a few instructables that can teach you how among many websites.
Jul 8, 2011. 1:12 PMtheexpert says:
it should be like putting music on your mp3 from lime wire and or frost wire just download it to your computer then put the file into the micro-controller after plugging it in at least with arduino you can put it into the comp idk about others
Jun 19, 2011. 2:54 PMrobomatt1999 says:
This would make a nice futuristic pecil holder : P
May 12, 2011. 10:55 AMbkrishnan1 says:
its very nice can you send which electromagnetic coil used
May 4, 2011. 6:38 PMTheIronHobo says:
is it strong enough to hold a pen?
May 3, 2011. 3:04 PMtech industries says:
Would the math involved in the Arduino code need to be modified for every specific coil? My electromagnets are not identical to yours, so with the change in size/strength where in the code would the modification (if any was needed) take place?

thanks
Dec 23, 2008. 10:59 PMpianoman2011 says:
i was thinking... since the power jack is a 1/8" audio jack, if you used a jack converter and plugged the device into a cd player/iPod, would the change in the electrical signal when you play a song sort of move the magnet with the music? would an amplification system be needed to strengthen the signals to sufficiently power the device, if this was all possible?
Apr 6, 2011. 3:44 AMscraciun says:
hello i really need your help:) you didn t say anything about the program 

Feb 10, 2009. 4:21 PMpianoman2011 says:
but if you amplified the audio feed current, or just added to it so that the slight changes in voltage would make the magent float, it still wouldnt work?
Feb 11, 2009. 6:35 AMpianoman2011 says:
that would be neat. but i gues i am only dreaming lol
Mar 13, 2009. 6:45 AMAercimete says:
you might be able to put a secondary electromagnet in(much weaker) so that the primary suspends it and the secondary just kinda wiggles it lol
Dec 11, 2010. 5:05 AMcoleyy says:
it might be easier to do that to a smaller magnet like Aercimete said and put that next to the object
Mar 15, 2009. 6:47 PMpianoman2011 says:
lol nice idea. but now that i really think about it, i don't think having it wiggle to music would be that fascinating... still worth doing though.
Mar 18, 2011. 1:07 PMrichsrules says:
does anyone know if the object remains stationary while it is suspended or does it revolve and spin?
Dec 10, 2009. 9:59 PMxXnocturnusXx says:
im thinking about making an index (from halo) replica and having it float in it the center.....i hope it's mass isn't to big!
Jan 15, 2011. 5:28 PMelectric_destruction says:
I would love to see that, i love both Halo and electromagnets.
1-40 of 462next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
98
Followers
11
Author:J_Hodgie
Currently doing masters in Mechatronics Engineering, but still create in my spare time