Tune and Test
1.) When mounting our solenoid, our orientation did not take polarity into consideration. Therefore, we will need to select the correct pole of our magnet to face our coil. To do this connect the power and begin bringing the magnet into the solenoid's field. One side of the magnet will attract continuously, the other will have a tendency to lock in place several inches from the coil. Make a note of this side of the magnet. Be careful not to get too close; both poles will attract violently if brought too near to the energized coil.
2.) Now that we know which pole of our magnet we are using, we will now determine how much weight it can hold. Too little weight and the load will attract without levitating, too much weight and the magnetic field will not be able to overcome gravity and the object will fall.
Trial and error should help you find the optimal weight by attaching random objects to your magnet. However you can also use a more precise approach:
Using small nuts and bolts, incrementally add them to your magnet and test. Once you find a balance point (you'll feel a slight click as it locks into place), note the weight of the load using a small scale. Then add or remove small weight to find your range and optimize for stability. You can then use this as a reference and start levitating anything within this weight range which is usually between 45-55 grams, not including the magnet itself.
3.) When everything is functioning correctly, connect an oscilloscope to see the fields in action!