Magnetic levitator-night light

Levitating objects always look exciting, especially if they also glow. Such a device will be discussed. Following this instruction, you can make a very unusual night light.

General view of the finished device

General view of the finished device

The basis of the device is an electromagnet and an analog hall sensor located on the bottom of the electromagnet core. The hall sensor detects the field of a permanent magnet held in the air and through the operational amplifier controls the current of the electromagnet coil. When the magnet approaches, the current in the electromagnet drops, the magnet begins to move away from the hall sensor and the current begins to flow again, again attracting the magnet.

The device would be quite simple, so that in this levitator the transfer of energy to the levitating part is organized. The device is powered by 12 V, the power supply is enough for 1-2 A. We will keep the neodymium magnet in the air, to which the payload is attached (a board with LEDs, a secondary coil, a case). During the experiments, it was found that the larger the neodymium magnet, the less energy is needed from the power source to hold it, so a 20 by 10 mm magnet was chosen. With the help of such a magnet, it was possible to hold a weight of up to 40 grams in the air (excluding the weight of the magnet).

The electromagnet holds two weights of 20 grams

The electromagnet holds two weights of 20 grams

First you need to make an electromagnet, the core of which is a 7×70 mm bolt, in the lower part it is imperative to install a washer, ideally with a diameter of the coil itself. The coil is wound with enameled wire with a diameter of 0.35 mm, the number of turns does not matter, the main thing is to dial the required resistance of 10-15 ohms (in my case 13 ohms). I tried to wind the coil on the first layers turn to turn, but then everything did not go according to plan, and the winding was carried out “in bulk”, which did not affect the quality of the electromagnet. Under the coil, it is necessary to fix the hall sensor exactly in the center of the magnetic circuit (in my case, this is the center of the bolt head). The sensor is placed with the flat side towards the coil. This can be done with the help of double-sided tape or hot glue (as in my case at the prototyping stage).

Hall sensor is fixed under the electromagnet

Hall sensor is fixed under the electromagnet

General scheme of magnetic levitator

General scheme of magnetic levitator

The upper part of the circuit is responsible for levitation. The circuit is built on a single operational amplifier LM2904 (can be replaced with LM358, they are completely interchangeable). The op-amp and the hall sensor are powered by 5 V, through the LDO stabilizer LP2981. The op-amp (OP1.1) compares the voltage from the hall sensor with the voltage given by the divider R1-R2-R3 and as soon as the voltage at pin 2 exceeds the voltage at pin 3 (the magnet moves away from the coil) it opens the composite transistor T1 through R5 (you can put almost any transistor to a current of 1 A), and when the voltage drops from the hall sensor (the magnet is close enough to the coil), the op-amp attracts pin 1 to the ground and the transistor closes, stopping the current in the electromagnet (the magnet begins to move away from the coil). Levitation occurs due to the constant fluctuation of this process.

Voltage at the base of transistor T1

Voltage at the base of transistor T1

The second part of the OU (OP1.2) is responsible for turning off the electromagnet and the power transmission circuit in the absence of an object held in the air. While the neodymium magnet is held in the air, oscillations are created at the output of OP1.1, which are smoothed out by the RC filter R8-C3 and come to the non-inverting input of OP1.2, and until the voltage exceeds the voltage at the inverting input (set by the divider R6-R10), the output will be Earth. But as soon as the magnet is removed, the oscillations will stop, the transistor T1 will be open to the full and the voltage at the non-inverting input will increase. The op amp will open transistors T2 (shunts the T1 base to ground) and T3 (turns off the TL491) and the circuit will go into standby mode, consuming almost no power. Diode D1 used SN4007. A radiator is installed on the transistor T1, since during the setup it will possibly heat up, but on a well-established heating circuit, it should not be on it.

If you want to assemble a simple magnetic levitator, then the lower part of the circuit is not needed, with the exception of the input capacitor C4. For tuning, it is necessary to replace the resistor R1 with 1 kOhm, and the resistors R2 and R3 with a 5 kOhm multi-turn variable resistor. Unscrew the resistor R9 into position so that the transistor T1 opens (there must be voltage at its base). Then bring the neodymium magnet 1-1.5 cm to the electromagnet and start rotating the variable resistor R2-R3. At a certain moment, you will feel the vibrations in the magnet with your hand, which means success is already close! You can try to release the magnet by very carefully changing the distance of the levitating magnet from the electromagnet with a resistor. If the magnet is repelled or levitation does not start, then it is necessary to turn the magnet over or connect the electromagnet coil in reverse. After successful tuning, you can measure the resistance of the tuning resistor and remake the divider from two resistors to three, as in my case. I brought the resistor R2 to the case and you can always carefully adjust the distance from the levitating part to the electromagnet. During the tuning process, the magnet will often be magnetized to the core of the coil with great force, so it is necessary to protect the hall sensor on the core, for example, fill it with hot glue or attach a soft layer to the magnet. In my case, for 3-4 times of such magnetization, the hall sensor broke into pieces from the next blow.

To transfer energy to the levitating part, a simple Push-pull on TL494 was used. Coils L2, L3 with 23 turns of enameled wire 0.4 mm. For the convenience of the coil, I wound it on a preliminary frame and filled it with varnish, resulting in a frameless coil, which, during assembly, is lowered into the body of the electromagnet.

Frameless coil

Frameless coil

Electromagnet body

Electromagnet body

Transistors T6, T7 are selected for surface mounting, they can be replaced, for example, with IRFZ44n. The TL494 piping is standard, the capacitor C6 and resistors R22, R23 are responsible for the frequency (the circuit indicates the ratings for a frequency of 100 kHz to control two transistors, if you do not need to change the frequency, then you can put a jumper instead of R22), the variable resistor R20 is responsible for the duty cycle. They can regulate how much energy is transferred to the levitating part. In my case, the fill factor is set to the maximum, a little more than 0.4. Pins 1 and 2 are the pins of the TL494 error amplifier, they are used to stop generation when there is nothing to hold under the electromagnet. When the transistor T3 opens, the voltage at pin 1 outweighs the voltage at pin 2 and the generation stops. Transistors T6, T7 open in turn through the chain R16-R13-D2 and R16-R21-D3, and close through T4-R19 and T5-R24, respectively. Diodes D2, D3 are Schottky diodes that were at hand (marking 1M). There are surges on the drains of transistors T6, T7, but since the transistors cope, I did not add elements to limit surges.

Voltage surges at the drain of one of the transistors

Voltage surges at the drain of one of the transistors

Finished board, view from the side of the tracks

Finished board, view from the side of the tracks

Finished board top view

Finished board top view

The magnetic levitator board and power supply are located at the bottom of the case. Just in case, there are holes in the case for cooling the elements, but in the end nothing heats up significantly.

The levitating block consists of a neodymium magnet, a secondary coil and a simple circuit with LEDs.

Scheme of the levitating block

Scheme of the levitating block

Coil L1 is wound with 0.3 mm enameled wire for 200 turns. Further, the voltage is rectified by a diode bridge and fed through a resistor to three LEDs. They do not glow very brightly, but for a night lamp, that’s it.

If the lower part is magnetized to the body of the electromagnet, nothing bad will happen, the electromagnet will turn off, and the energy transfer circuit will continue to work, except that it will glow brighter.

Levitating block

Levitating block

The photo shows the secondary coil.  In the center is a neodymium magnet and a board on top of it

The photo shows the secondary coil. In the center is a neodymium magnet and a board on top of it

The result is an unusual lamp that surprises others, and also opens up scope for creativity in the suspended part.

In the next part of the article, we will talk about a suspended lamp that shimmers with all colors.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *