I followed everything from this project but still, the magnet is not levitating - https://www.hackster.io/jsirgado/magnet-levitation-with-arduino-eeeee4
The best I can do is to make the magnet jump up and down fast but it never levitates. Have tried changing PID setting from the project as aggressive and mild but still didn't achieve the final result.
I need advice from an expert to tell me what I am doing wrong here. All components are in good condition and 5v electromagnet is strong enough.
So what am I missing here? will implementing fast PWM mode be helpful?