Magnetic Levitation Frustration

Endless experimentation was needed to achieve attractive magnetic levitation (e.g. hold a magnetic object below a shelf). I have found the following sites helpful.

Strong and Stable Magnetic Levitation : 5 Steps (with Pictures) - Instructables

Suppressing unwanted oscillations with a resistor [Pt.1] (youtube.com)

Why do we need to stabilize a MOSFET Transistor? (youtube.com)

Tried first with the Arduino Uno. Could not stabilize the magnet floater. So.... went the analogue route, using a simple op amp design, of which there are many examples on the web (first link). My objective here is to offer some ideas that may help with Arduino and analogue designs. Apart from using an oscilloscope and making a mag. field sensor (built using Arduino Uno), it is important to get the + and – in the correct order as well as N and S. Concerning components, every use, design and layout is different giving unique problems with noise, fluctuating levels and magnetic fields, consequently the need to experiment with placement, dimensions and values. What worked for my project:

-- dampening resistor in series with the back emf diode (placed across the coil). Used 3.3 ohm.
-- hollow core coil, 5/16” ID, #24 wire, about 1 5/8 x 1 3/4. Hall sensor (label side down) in the middle (hole), taped to the coil.
-- 4.7 uF cap near the hall sensor power input.
-- noise: trial placement of capacitors and resistors of various values (see link 2, 3). Ceramic capacitor and a low pass LC filter on power supply (0.57 mH choke made a difference).
-- dampening: diameter of floating magnet, length of object and amount of coil current made a difference. External magnets and metal kept away from levitator. Demagnetize everything (except the float magnet), including hall sensor.
-- fine voltage reference adjustment (input to the op amp): 1 k ohm potentiometer in series with the 10 k ohm potentiometer.

A the beginning, without all the adjustments, the mag. floater started jittering (oscillating) within 15 sec.. Achieved more success after making adjustments. Next rewound the coil with a 5/8” ID and #22 wire, keeping similar physical size. To help control coil current (below 0.7 A), added a series resistor (10 ohm). Success, finally. Next project: repulsive levitation. PS… if there is lower physical dampening, the oscillations can make for a nice effect.