A Levitating Sphere Rotates Glows and Blinks With Arduino




A levitating little Death Star in Instructables invited me to the new project with Arduino. Three policies were decided and kept to differentiate it from the forerunner.

  • Do it myself with no (or less) ready-made.
  • Keep rotating.
  • Make glow and blink without battery.

VIDEO(1): A Levitating Sphere Rotates Glows and Blinks

The detail of the project is described below. Let’s wrap coils, and make a sphere levitate, rotate, glow and blink! I wish videos and pictures could cover my poor English.

(*) The sphere continues levitating, rotating, glowing and blinking on a dining table for 40 days more. Now it is given a prize in the Make It Move contest 2016. Thank you for your vote.

(**) The MS-Excel simulator used in Step5 will be posted in a few months. Now it is being improved for public use.

(***) The Japanese translation was published in Instrictables also.

Step 1: Get Solution Against the Oscillation

It is not difficult to make an object levitate in the air with a small coil and a few additional materials, when you pick up the coil between your fingers. Arduino with a very simple sketch (program) makes it possible.

On the other hand you will face some obstacles, when the coil is mounted in the rigid frame instead of your fingers. Then the levitating object will begin oscillating and fall to the floor finally. And the levitation is destabilized more rapidly when glowing LED is attached to the levitating object without battery.

To control the oscillation, some vibration damper (absorber) should be added to the system. If the distance between the levitating object and the coil were measured continuously and correctly, a few lines added to the sketch could work well as a virtual damper without any real materials.

But the output value of the magnetic sensor used to measure the distance is polluted by the dynamic magnetic field generated by the coil which controls the levitation. Hence some proper dynamic filtering method is needed in the sketch to estimate the correct distance. On the other hand if Arduino did not have enough power to execute it, some physical damper might be required additionally.

Step 2: Gather Materials

When you pick up the coil between your fingers in the simple levitation system, Arduino with the minimum sketch can make 50g weight levitate in the air easily. The materials of the system are listed under “LEVITATION SYSTEM” below.

Here the hardest work is winding a 20m copper wire around an iron bolt. And the most important stuff is the magnetic sensor called “Hall effect sensor”. Even in the same system, only 5g weight cannot levitate with the sensor which measures narrower range.


  • Arduino UNO
  • Iron hexagon head bolt and nut as the core of the coil (5mm Dia. *40mm)
  • Iron cylindrical spacer for the bolt above (5mm Dia. *20mm)
  • Two large stainless steel flat-washers as the flanges at the ends of the spacer
  • Thin copper wire coiled around the spacer (0.4mm Dia. *20m)
  • Motor driver IC: Toshiba TA7291P
  • Hall effect sensor: Allegro UGN3503UA
  • Several neodymium magnets (12mm Dia. *2mm): I got them at a dollar store.
  • Power supply unit for the coil (5-6V): 4 AA batteries can work.

To mount the coil in the rigid frame instead of your fingers, and to cover the naked electrical parts, the materials listed under “SUSPENSION STAND” are used. And the components listed under “SPHERE with WIRELESS JOULE THIEF” should be prepared to let LEDs glow and blink without battery. Furthermore, the parts listed under “ROTATION SYSTEM” are needed to make the object rotate continuously in levitation.


  • Two stainless steel brackets
  • Stainless steel bowl (150mm Dia.)
  • Several stainless steel bolts and nuts to join the brackets and bowl together
  • Low-repulsion urethane sheet or chip (5mm Thick)
  • Power supply unit for Arduino (9-12V)


  • Clear plastic capsule (70mm Dia.): Gachapon capsule I use.
  • Thin copper wire for transmitter and receiver coils (0.4mm Dia. *20m in total)
  • LED(s)
  • Transistor: Toshiba 2SC1815
  • Resistor (1000ohm)
  • Capacitor (0.1uF)
  • Two small steel cups (40mm Dia.): I got them at a dollar store.
  • Power supply unit for the transmitter (5V)


  • Small electric fan (working with 5-6V)
  • Two small stainless steel brackets to join the fan and the main frame
  • Some stainless steel bolts and nuts to join the brackets together

Step 3: Make an Object Levitate in the Air

Let’s make some object levitate in the air with the coil(*) picked up between your fingers. It would be easier than you think. The simplest Bang-Bang control program attached under VIDEO(3) below makes it possible. Here the hardest work is winding wire around an iron bolt. And the Hall effect sensor is crucial.

(*) In this instructable six coils are used in total. See the appendix in Step9 to get them.

In this project the sensor is attached to the head of the iron core (bolt) of the coil by the double-sided tape and covered with scotch tape. The sensor with adequate range to measure the magnet field can make 50g weight levitate. On the other hand the sensor with narrower range could not make the 5g weight levitate.

I started the project with the magnet sensor which has narrower range. Only the 4g weight can levitate with it. After replacing it with the sensor which has wider range to measure, much heavier 50g weight can levitate with the same system.

VIDEO(2): With the Sensor Which Has the Narrower Range to Measure

VIDEO(3): With the Sensor Which Has the Wider Range

The sample program below could make a 50g weight levitate with the simple levitation system and several neodymium magnets. This system is gotten by assembling the materials listed under "LEVITATION SYSTEM" in Step2 with referring to the picture above. The connection between driver IC (pin2 and pin10) and the coil is not arbitrary. They have to be connected with the proper opponents.

Also several (2, 3 or 4) neodymium magnets should be stacked, and the N pole of them is attached to the top of the weight. In the levitation the S pole of the stacked magnets faces to the magnetic sensor which is attached to the head of the core of the coil.

Since the direction of the current through the coil is changing quickly in a good levitation, some fine vibration is felt in your fingers. If you cannot see such a levitation in spite of good materials and correct wiring, the threshold (200) in the sample sketch should be changed a little.

Step 4: Make the Heavier Object Levitate

The most important point to make the heavier weight levitate is getting the sensor with wider range. But I found that the more heavier weight can levitate with the same sensor by adjusting the magnetic field created with the coil.

The hexagon head bolt as the core of the coil would not create homogeneous magnetic field outside of the coil. So I trimmed the six edges of the bolt to get rounded head. Then 80-100g weight can levitate with the same sensor. But it should be noted that such a heavier weight cannot levitate with over-trimmed smaller rounded head.

VIDEO(4): With a Round-Headed Bolt

Step 5: Mount the Coil in the Rigid Frame

In this step the coil for levitation is mounted in the rigid frame. It would be better to use no iron materials in the frame to avoid unnecessary troubles. Wood, plastic or aluminum materials are suitable. But I selected stainless steel fittings and bowl because they are easy to assemble and have good texture. It should be noted that the stainless steel materials I use are magnetized to some extent weaker than iron.

When the coil was mounted in the frame, the levitating object under the coil began oscillating in the air and fell to the floor or attached by the coil above it. When the coil is picked up between fingers, they work as a subtle cushion to restrain oscillation. Remember the fine vibration felt by your fingers in the levitation in Step3. Now there is not such cushion between the frame and the coil.

At first I tried adding such cushion virtually by modifying program. But I found that it is not easy(*). So I simulated the dynamics of the levitation with MS-Excel spread sheet. Though it was not easy to get the adequate simulator, it showed some important tendencies below.

(*) In VIDEO(5) below, a glowing and blinking sphere continues levitating with no physical damper. But it was a rare case. It requires the very good condition and fine tuned parameters to keep levitating.

(1) If the distance between the levitating object and the coil were measured correctly at high frequency, the simple program with a naive control method could work adequately against the oscillation.

But the output value of the sensor to estimate the distance above is polluted by the magnetic noise generated in the control.

(2) Though the noise changes cyclically, its pattern depends on some conditions in the control. Hence it is not easy to specify the cyclical pattern.

(3) It is very difficult to control the oscillation with the polluted output and the naive method such as moving average.

(4) A physical vibration damper (absorber) could work dramatically against the oscillation even if it is so weak or poor.

(5) And with such physical damper, it is very important to reduce the interval to check the output value in control when it is around 1 milli-second. See the figures above.

Taking the results of the simulation above, I added a low-repulsion urethane chip between the coil and the rigid frame actually, and uploaded another sketch with PD control below instead of Bang-Bang in the former step. Then the persistent oscillation was disappeared.

VIDEO(5): A Sphere Levitates under the Rigid Frame

Step 6: Make the Levitating Object Rotate

Here we make an object levitate and rotate. There are some means to keep the levitating object rotating. For example another pair of the coil and the sensor with additional magnet can make it possible. It can be considered the shaftless and brushless motor.

VIDEO(6): Shaftless and Brushless Motor

But the simpler means want to be chosen here. So the up-current of air was examined at first. A pinwheel was attached to the bottom of the levitating object, and a cup filled with hot water was set under it. But it turned out this rotation system with the up-current of air don’t have sufficient power.

Then a small electric fan was picked up. The fan set behind the levitating object worked well. It is easy to control rotating speed by changing the angle of the fan offset. The power supply for the levitation system or wireless Joule Thief can be shared for this fan.

[Added in April 2017]
I found that the sphere rotates in the opposite direction against the fan. Hence I removed the fan and found that the sphere rotates at higher speed. I think the coils for Joule Thief in Step 8 work as a motor. However I cannot tell yet how to make the sphere rotate intentionally with only the coils.

Step 7: Make the Levitating LED Glow

Joule Thief is a simple and clever system to light LED with single AA battery. And when adding another coil to the system as the receiver, it is possible to make LED(s) glow with wireless. Here the wireless glowing LED(s) is/are attached to the levitating and rotating object.

The materials for the wireless Joule Thief system are listed under "SPHERE with WIRELESS JOULE THIEF" in Step2. The basic system can be gotten with referring to the picture above. And see Step9 to wrap the coils used in the system.

I started with single LED glowing. And it turned out that the power supply is crucial. When supplying lower voltage to Arduino or sharing the common power supply with levitation coil and Joule Thief coil (transmitter), the levitating object tends to oscillate. Therefore 9V was supplied to Arduino and two independent lines of 5V were prepared for levitation coil and Joule Thief coil respectively.

Also when the Joule Thief unit is brought near the output line of the magnetic sensor, the levitation is broken. Hence the Joule Thief unit was set apart from both the output line and Arduino. And it was not connected with the GND of the levitation system. Furthermore, I covered it with a pair of small steel cups to confine the electrical or magnetic noise. See the third picture in the next step.

Then a levitating, rotating and glowing sphere was gotten. But I felt something monotonous with single white LED glowing. So I added red LED to the wireless Joule Thief.

VIDEO(7): A Levitating Rotating and Glowing Sphere

Step 8: Add the Blinking LEDs

In the former step, white and red LEDs glow in levitation. These LEDs are connected in parallel with the common receiver coil. To keep brightness, their polarities are set reverse each other in the connection. See the second picture in the former step.

But the brightness decreased in practice. Hence the exclusive receiver coil was given for each LED. It worked well. The stacked receiver coils light connected LEDs with less decreasing brightness. See the third picture in the former step and check the embedded comment in it.

Also it is possible to make some of the LEDs blink. First, the stacked receiver coils above are re-arranged apart from each other. See the second picture above. Next, another transmitter coil is added to the Joule Thief system. Then two transmitter coils are connected in parallel in the system. Now a rotating, glowing and blinking sphere levitates in the air. The detail of the arrangement of these coils is described in the next step.

VIDEO(8): Levitate, Rotate Glow and Blink

Step 9: Appendix "Get and Set Coils"

In the former step, six coils are used in total, except for the coils in the small fan. One of the six coils is mounted in the frame as a part of the levitation system. It is gotten with winding a 20m copper wire (0.4mm diameter) around the iron bolt inserted in the 20mm iron spacer between the two stainless steel flat-washers as the flanges.

On the other hand the rest five coils are contained in the wireless Joule Thief system. Two of them work as transmitters, and the remaining three coils work as receivers levitating. Every coil in the Joule Thief system has the shorter copper wire with no iron core.

The three receiver coils have no difference in winding. To get a receiver coil, the copper wire is wound by 45 turns around a round bar with 20mm diameter. And one of them, which is connected with the main LED glowing, is attached to the bottom of the inside of the levitating sphere. The rest two receiver coils, connected with the blinking LEDs, are attached to the side of the former coil apart from each other. See the second picture in the former step.

On the other hand, the two transmitter coils have difference in winding and setting. To get the one which makes the main wireless LED glow, the copper wire is wound by 2 times of 15 turns (in the same direction) around a round bar with 15mm diameter. And the wire is dragged out from the bar about 20cm between these two 15 turns without cut. Then the coil is set outside of the the levitating sphere under its rotation axis without contact.

The other transmitter coil, which makes wireless LEDs blink, is gotten with winding the copper wire by 30 to 45 turns around the round bar with 15mm diameter. It is not needed to drag out wire. And this coil is set outside of the sphere by the side of its rotation axis with keeping small distance from the sphere. See the third and the fourth pictures above.

Make it Move Contest 2016

Grand Prize in the
Make it Move Contest 2016



  • Pets Challenge

    Pets Challenge
  • Beauty Tips Contest

    Beauty Tips Contest
  • Growing Beyond Earth Maker Contest

    Growing Beyond Earth Maker Contest

39 Discussions


Question 1 year ago

Would you send an image of breadboard please?? Couldnt build it :'(

3 answers

Answer 1 year ago

At this time, all I provides are shown here, because this electrical ornament has been disassembled already. However if you post something that prompts a new or additional discussion, I can reply for you in the discussion. For example, if you post a schematic you can draw, I might be able to tell you some advices, even if the schematic has several or many defects. I think it is very natural that a beginner looks up the information and studies something with trial and error.


Answer 1 year ago

the thing is.. I couldnt understand the schematic. The materials says use 9v for arduino,but I didnt see any resembles in videos :( All I see from videos; A0 wiring,VIN-GROUND Wiring to (I dont know..4AA batteries maybe?, D10-D11 connections etc),But cant see or create shematic in my mind.Need a clear image of breadboard or a better schematic for beginners please, most apprecited the fact is Im doing this for final year project, so I hope, I'll be able to graduate


Answer 1 year ago


You can see stuff working on a breadboard in Video (2) in Step 3. Click the heading picture in Step 3, you could get schematic. Can you draw schematic and post it here?


Question 1 year ago

I couldnt find anything TA7291P Is there any alternative to that? would be great with instruction.

1 answer

Answer 1 year ago

TA7291P is a popular motor driver IC gotten at $1.5 in Japan. Though we can find it at ebay also, we can see various price tags with $1.87 to $11.95. You can use other motor driver or H-bridge instead, if it works with PWM and 3.3-5.0V logic Vcc. Search with “motor driver IC” in web shops like ebay or Google.


2 years ago

Great instructable! I built this with a different H bridge, the TLE5205-2. Haven't built a stand for it yet, but works great with a 100 gram plastic globe, 130 mm diameter and the joule thief led. I like the attention to detail you gave building the electromagnet. Parts were readily available in the local hardware store. Am trying to rotate the globe with 2 diametrically magnetized cylinder magnets, one in the bottom of the globe, and one at the stand base powered by a small gearmotor.

3 replies

Reply 2 years ago

Interesting. I image your plan for rotation as below. OK?
- Magnet 1 (N----S) :lying on the bottom of globe
- Magnet 2 (S----N) :rotating in a horizontal plane in the base unit
Can the former rotate more slowly than the latter by something resonate? If not, higher reduction ratio might be required in the latter.


Reply 2 years ago

See attached pictures. http://imgur.com/a/OowPT

The cylinders align axially, each end has a n/s across the face, so they align and rotation should be locked at the 20 rpm of the motor. The motor was cheap on ebay, a few dollars, and even came with a 1.5v watch battery holder and forward / off / reverse switch.


Reply 2 years ago

I see your pictures. Neat work. I understand the array of 2 magnets. However I cannot image well how the lower magnet transmits rotational torque to the upper one. I will be grateful if you show video when you make it rotate. Cheers.


2 years ago


one Question by ur led on ur breadboard. Why is she not in ur plan?

i see in all ur Videos the red and time by time the white led glow.

best regards

1 reply

Reply 2 years ago

Some experiments are shown in Video(2), (3), (4), (6) and (7). In these videos, a red LED is attached on a breadboard. This LED is distinguished from others in the levitating sphere in Step7 and the later.
This LED lights depending on the current through the coil for levitation. Hence it lights steadily in steady levitation though it lights unsteadily in unsteady levitation. However it is not needed in the final circuit.


2 years ago

SUPER!! Thanks for sharing!


2 years ago

VERY Cool project. Thanks for sharing!


RE: the Bang-Bang code: it looks like you're either attracting or repelling. No "floating"

Did you consider a "dead zone"? I.e >200 pull, <150 push, in between, off?

You might find that it would smoothly float atop 200 without developing oscillations?

Just a thought... You're kinda forcing it to keep moving. Not giving it a chance to settle down. I can see that inducing oscillation. The damper is a neat idea and worked much better than I would have thought possible.

4 replies

Yes. I think Bang-Bang control is restrictive and inefficient for the
good levitation here. But it is very simple. I want to show the sample
sketch as short as possible which can make an object levitate with poor
stuff in Step3. Your remedy could relax the restriction in Bang-Bang
control and make it work better. And I think PD control in Step5 relaxes
this restriction also.


Reply 3 years ago

I agree the bang bang control does work, my project ended up using it, but i have to put oil in all of my levitating things to keep the vibrations from knocking them over.


Reply 3 years ago

Hi headslant,
I saw your article in Instructables. And I saw the sample sketch attached to the end of your article. It seem that a PD control is used instead of Bang-Bang control. And also I have some questions. So a reply has posted as a comment to your article.