LEVITATING BANANA - Electromagnetic Levitation
by ElectroBing in Circuits > Electronics
12952 Views, 54 Favorites, 0 Comments
LEVITATING BANANA - Electromagnetic Levitation
I will be demonstrating how to levitate a banana. You might wonder, 'Why?' It’s not every day you see objects, let alone a banana, floating in thin air. The ability to levitate an object is not only impressive but can also entertain your peers. This project, which is relatively straightforward to create, provides an excellent opportunity to learn about electronics and gain practical knowledge. Personally, I found the experience highly educational.
Supplies
Materials I Used:
Tools
- Soldering Supplies
- Suitable Power Supply(6v-12v)
- Multimeter
- Rotary tool
- Pliers, Wire Strippers, and Other Handheld Tools
- Insulation tape
- Two compound adhesive
- Super glue
The Circuit:-
- 10k Potentiometer x 1
- S49E Hall Effect Sensor x 1
- 2N2222A NPN Transistor x 1
- D2394 or TIP41C NPN Transistor with Heatsink x 1
- LM358 Dual Op Amp IC x 1
- 2200uf 25v Capacitor x 1
- 7805 Voltage Regulator x 1
- 1N4007 Diode x 1
- 1k Ohm Resistor x 1
- 220 Ohm Resistor X 2
- Perfboard
- Jumper wire
- 3-pin JST x 1
- 2-pin Terminal Connectors x 2
Electromagnet:-
- 22 gauge enameled copper wire
- Solid iron core(1/2 inch diameter iron nut and bolt)
The Structure to Hold the Electromagnet
- A couple of Pieces of Wooden planks(I will specify dimensions later)
- Plastic enclosure for circuit 10cmx10cmx5cm(4"x4"x2")
The Principal Behind This
The electromagnet connected to the circuit is held upside down, with the Hall effect sensor placed underneath it as shown in the detailed illustration above. When a magnet (preferably neodymium) is placed under the initially activated electromagnet, it attracts the neodymium magnet towards itself. As the neodymium magnet approaches the electromagnet, the Hall effect sensor detects the magnetic field and causes a decrease in the sensor's output voltage. Once the output voltage drops below the threshold voltage (set by the potentiometer), the main circuit cuts power to the electromagnet, disrupting its electromagnetic field and causing the neodymium magnet to fall due to gravity. When the neodymium magnet moves down slightly, the sensor's output voltage increases. When the voltage surpasses the threshold, the main circuit reactivates the electromagnet, causing the magnet to rise again.
This process repeats continuously, allowing the magnet to levitate.
Circuit-Theory
Detailed Explanation of the Circuit
The circuit is powered by a voltage source ranging from 6 to 12 volts. Since the logic of the comparator operates at 5 volts, a regulator is used to step down the voltage to 5 volts.
The circuit can be divided into two parts: the right side, which is powered with 5 volts and controls the logic, and the left side, which is powered with VCC and controls the switching of the electromagnet.
The Right Side:
On this side, we have a comparator, a 10k potentiometer, and the Hall effect sensor, all powered with 5 volts. The output of the Hall effect sensor goes to the non-inverting (+) input of the LM358 comparator, while the output of the potentiometer goes to the inverting (-) input of the comparator.
The comparator compares the two voltage inputs: if the voltage at the non-inverting input (+) is higher than the voltage at the inverting input (-), it outputs 5 volts; if the voltage at the non-inverting input (+) is lower than the voltage at the inverting input (-), it outputs 0 volts.
Normally, the output of the Hall effect sensor is 2.5 volts, and the output of the potentiometer is slightly less than 2.5 volts. Thus, the comparator outputs 5 volts. When a neodymium magnet with its north pole facing the sensor is placed, the sensor's output voltage decreases. When this voltage falls below the potentiometer's output voltage, the comparator's output reduces to 0 volts.
The Left Side:
The output of the LM358 comparator is not sufficient to directly control the base of the D2394 transistor, which controls the electromagnet. Therefore, the output from the comparator is first amplified by the 2N2222A transistor, which then controls the base of the D2394 transistor, switching the electromagnet on and off.
A flyback diode is included to protect the transistor from damage caused by the inductive flyback of the electromagnet. Additionally, an LED in series with a resistor is placed parallel to the electromagnet to indicate whether it is powered.
Circuit-Building
Having gathered all the required components as per my schematic, I began the soldering process. It's important to take precautions to avoid inhaling toxic soldering fumes; generally, a fan can be used to blow the fumes away, but a fume extractor is preferable.
I used terminal contacts for the power, the electromagnet, and the high-current transistor to allow for easy replacement if needed. Additionally, I utilized a three-pin JST connector for the Hall effect sensor. Be sure to attach a heat sink to the larger transistor, as it can generate substantial heat. Use thermal paste to enhance its thermal conductivity.
You can follow my layout and solder traces as shown above. Thin traces represent jumper wires connecting on the upper side of the perf board.
Note: If you are using the TIP41C, replace R3 with a lower resistance value, as the current gain of TIP41C is comparatively lower than the D2394.
I recommend testing the circuit on a breadboard before constructing it on the perf board. I had to build the circuit twice on a perf board for it to work—avoid making the same mistake.
With the circuit on the breadboard or perf board, connect only the sensor wires and power it with 6 volts. Do not connect the electromagnet yet. Adjust the potentiometer until the LED begins to light up. When you bring the north pole of the magnet close to the sensor, the LED should turn off.
The Electromagnet
You can easily buy a premade electromagnet, but a better and stronger one can be made at a lower cost.
For my electromagnet, I used 22-gauge wire and wrapped it around an iron bolt as shown above. It is important for the core of the magnet to be iron, as using steel bolts would not work. An electromagnet with a steel core can retain its magnetic properties even after being switched off.
While constructing the electromagnet, remember that it must be hung upside down to levitate magnets. You can come up with your own creative ideas to achieve this. I built my electromagnet so that I could attach a piece of wood with a larger surface area than the electromagnet. This piece of wood would hold the electromagnet upside down (this will be demonstrated in the next step).
Once the electromagnet is complete, use a continuity tester on your multimeter to ensure the wire has not been cut off anywhere. You can also test the electromagnet's strength using an adjustable power supply.
I built two of these electromagnets: one with more turns and a higher resistance, and one with fewer turns and a lower resistance.
The Electromagnet Mount
I used a 7 cm (3 in.) x 3 cm (1 1/4 in.) wooden plank I had lying around and cut two pieces: one 22 cm (9 in.) long and the other 28 cm (11 in.) long. On the smaller piece of wood, I drilled a hole with a diameter slightly larger than that of the electromagnet.
Using my rotary tool, I made guiding holes for two wood screws to attach both pieces. I also applied some wood glue and attached both pieces as shown in the image above.
To enhance the appearance, I spray-painted the pieces. Although they didn't turn out exactly as I envisioned, they still looked much better than before, so I decided to keep them as they were.
I then took a flat piece of wood, 1 cm thick (which I also spray-painted), drilled two small holes, and screwed the base of the longer piece of wood to the flat piece of wood.
Testing the Circuit
Place the electromagnet on its mount and secure the sensor with tape under the electromagnet, centered and over a piece of foam as shown above. The foam prevents the magnet from directly attaching itself to the iron core of the electromagnet. The thickness of the foam can vary for each electromagnet, so I recommend experimenting to find the optimal thickness. I used insulation tape to temporarily hold the sensor in place.
Once you have ensured the circuit is working, connect the electromagnet to it and power it with a voltage of 6-9 volts. I recommend starting at 6 volts. Hold a neodymium magnet under the electromagnet and slowly, carefully adjust the potentiometer until the magnet begins to vibrate and then slowly levitate. This might take a few tries, so patience is key.
If it does not work, the electromagnet's polarity might be reversed. Simply change the polarity on the circuit, and it's also a good time to label the leads of the electromagnet. It should work now. Monitoring the current of the circuit can be helpful to ensure the electromagnet is drawing enough current. The transistor can heat up quite a lot, even with a heatsink attached, so it's best not to run the circuit for too long.
Both electromagnets worked, but the larger one performed better, so I will be using it. This test was conducted with my old circuit, as shown in the video.
Now that the levitation works, let's make it permanent and aesthetically pleasing.
Attaching the Sensor
I cut out a piece of cardboard in the shape of a circle, with a diameter 2mm larger than the electromagnet. I removed the top two layers of the cardboard to fit the sensor, as shown above. I used two compound adhesives to hold the sensor in place, ensuring the labeled part of the sensor faced outward. For aesthetic purposes, I covered the sensor with a piece of round black paper.
Next, I cut another piece of cardboard and used some force to curve it, wrapping it around the electromagnet. I used tape to maintain its cylindrical shape. I then used super glue to attach the cylindrical piece to the circular piece of cardboard, on its side opposite the sensor.
I later twisted the wires of the sensor, added a piece of heat-shrink close to the sensor, and stuck it to the side of the cylindrical piece using super glue. The sensor part was now complete. The piece of cardboard fit perfectly and snugly over the electromagnet, even allowing for adjustment of the sensor's distance from the electromagnet.
Circuit Enclosure
I used a project box (4"x4"x2") to safely house the circuit. I connected a female DC jack to the power supply, attached two wires to the LED, and extended the wires of the Hall effect sensor. The potentiometer needs to be accessible for adjusting the threshold voltage, as this varies depending on the strength and weight of different magnets.
Using my rotary tool, I drilled holes for the potentiometer, LED, DC jack, and the wires for the sensor and electromagnet. I secured the circuit board inside the box using double-sided tape, positioned the potentiometer with just its knob sticking outside, and fixed the DC jack in its respective hole with hot glue. The hole was perfectly sized for the LED to fit snugly.
To prevent the heatsink from overheating, it’s a good idea to drill ventilation holes. An even better option would be to add a small computer fan to blow air towards it. Once everything was in place, I covered the box with its lid and screwed it back securely.
BANANA
Now that everything is complete, it’s time to achieve the main objective of this project...LEVITATING BANANA! To balance the weight of the banana, I needed a stronger neodymium magnet.
Rather than inserting the magnet inside the banana (since I still wanted to eat it), I simply used some tape to attach the magnet to the banana.
Some Observations
Magnetic Strength The strength of the electromagnet is directly proportional to the distance between the levitating magnet and the electromagnet (the more strength, the greater the distance).
Object Weight The weight of the object is inversely proportional to the distance between the levitating object and the electromagnet (the more weight, the lesser the distance) and directly proportional to the amount of current drawn by the electromagnet (the more weight, the more current drawn).
A key observation I have made is that the shape of the magnet matters as well. The spherical magnet seemed to be the most stable compared to other shapes.