Magnetic Levitation for Variable Weights
It would seem that you could make this self adjusting within certain limits.

A solenoid (your electromagnet) exerts a force that is proportional to the current through it squared and inversely proportional to the distance squared between the solenoid and the ferrous object. 

From this simple relationship, you can see if you are able to go from one amp of solenoid current to two amps, the force will increase four times at the same distance. You could therefore theoretically suspend an object with four times the mass. At 3 amps, you could suspend nine times the mass. All of this assumes that the balance of the control circuit is able to adjust to these changing masses.

And then recall that force is equal to mass times acceleration. Your device is trying to overcome the force of gravity which has an acceleration of 9.8 m/s2.

Since you have a hall effect sensor, you are able to measure the distance between the sensor and the ferrous object. This can also be used to determine the rate at which the object is falling away from or being attracted toward the sensor. The ideal rate is 0 m/s which indicates that the object is stationary because the solenoid is supplying the exact amount of force needed to overcome the gravitational force on the ferrous object.

Since the PWM circuit determines the amount of (average) current through the solenoid, you now have all the elements needed to create a closed loop control system.

I recommend that you study PID (Proportional, Integral, Derivative) control loop theory to get a handle on how to best write the formula. There you will learn about critical damping and other factors for your algorithm.

You could potentially simplify the control loop by having a starting condition where the weight is placed in contact with the solenoid and the solenoid current is set to maximum. Then start to ramp down the solenoid current until the weight attains the correct position as indicated by the hall effect sensor (remembering the force squared effect). Once in position continue to hold the position with the control loop with which you have already experimented. Not as elequent as briefly holding the weight mid air and letting go, but it is a functional approach.

It looks like a fun project - enjoy!