Hi I'm trying a create a project where I levitate an object by electromagnet that attached permanently above it.
The levitating object connected to permanent magnet.
I want to measure the distance between my electromagnet and the levitating object by measuring the magnetic field using linear hall sensor (which is close to the electromagnet).
Then to use this measurement to increase or decrease the power of the electromagnet to pull or release the levitating object.
here is a similar (or same) project.
-
What I don't understand is how can I measure this magnetic field accurately. The field changed not only by the distance of my levitating object, but also from the electromagnet itself.
-
Another problem I have is when I PWM my electromagnet, it starting to make a buzzing sound.
Any suggestion will be appritated