Introduction: Levitating LED

Me and my team set out to make a lit LED levitate. After a short time googling around, I came across a video from SparkFun Electronics, that can be found here, in which we based our design off of. Our light levitates with one electromagnet above the light. We chose this design because it only requires one electromagnet to levitate the LED. To achieve the wireless power transfer we used a primary coil attached to the bottom of the levitation electromagnet and a secondary coil soldered to the LED. The LED module has a white LED, a secondary coil, and a strong permanent magnet. I designed the structure and 3D printed all of the parts.

Step 1: Designing the Structure

I used Solidworks to design the structure. The base is meant to house a printed circuit board. There are tunnels through the base, legs, and top pieces to route wires. We did not have the time to get a circuit board printed, so the circuit board cutout went unused.

Step 2: Winding the Electromagnet

To wind the electromagnet, we used a power drill to turn a bolt with washers as barriers. We went very slow to make sure the wire did not overlap itself. Doing it this way took a long time. I think it would be fine to save a lot of time and be less careful with overlap while winding. We estimated there are 1500 turns in the electromagnet.

Step 3: Power Supplies

For testing, we used a variable DC power supply. After everything was working, I used an old 19V laptop charger and a 12V voltage regulator to supply power to the 12V rail. I used a 5V regulator from the output of the 12V regulator to supply power to the 5V rail. It's very important to connect all of your grounds together. We had issues with our circuits before we did this. We used capacitors across the 12V and 5V power supplies to reduce any noise in the power rails on the board.

Step 4: Levitation Circuit

The levitation circuit is the hardest part of this project. Magnetic levitation is accomplished using a hall effect sensor to judge distance from the permanent magnet to the electromagnet and a comparator circuit to switch the electromagnet on or off. As the sensor receives a stronger magnetic field the sensor outputs a lower voltage. This voltage is compared to an adjustable voltage coming from a potentiometer. We used an op-amp to compare the two voltages. The output of the op amp switches an N-channel mosfet on or off to allow current to flow through the electromagnet. When the permanent magnetic (attached to the LED) is too close to the electromagnet, where it will be sucked up to the electromagnet, the electromagnet turns off, and when it is too far away, where it would fall out of levitation, the electromagnet turns on. When a balance is found, the electromagnet turns on and off very quickly, catching and releasing the magnet, allowing it to levitate. The potentiometer can be used to adjust the distance the magnet will hover.

In the oscilloscope screen image, you can see the signal from the hall effect sensor output and the magnet switching on and off. As the LED gets closer to the sensor, the yellow line increases. When the magnet is on the green line is low. When it is off the green line is high.

Depending on the environment and what you use as a waveform generator, you may need to add a small capacitor from the sensor output to ground. This will allow most of the noise to go straight to ground and the clean signal from the sensor to be used by the op-amp.

Step 5: Wireless Power Circuit

To handle the wireless power transfer, we wrapped a primary coil of 25 turns with 24 gauge magnet wire around the sensor holder. We then made a secondary coil by wrapping 32 gauge magnet wire around a tube of paper for 25 turns. Once it was wrapped, we slid the coil off the paper and soldered it to an LED. Make sure to remove the enamel coating of the magnet wire where you are soldering.

We used a square wave generator at 1 MHz to switch a MOSFET on and off which allows current to flow through the primary coil from 0 to 12V at 1 MHz. For testing, we used an Analog Discovery for a function generator. The final version uses a 555 timer square wave generator circuit to switch the MOSFET. However, this circuit produced a bunch of noise that was interfering with the power rails. I made an aluminum foil lined box that has a divider to separate the wave generator and the levitation circuit. This significantly reduced the amount of noise.

Step 6: Assembly

I used Chroma Strand Labs ABS to 3D print the base and legs. The legs warped too much while printing, so I re-printed with Chroma Strand Labs PETg. The PETg warped very little. All of the parts fit together without the use of glue. We had to cut a few notches in it to add extra clearance for wires. You may have to sand down the areas that contact other pieces to allow a looser fit.

We are planning to get a circuit board printed and solder the components to it so that it all fits inside the circuit board cutout.