I bought an electromagnet online hoping to make it attract and repel metals by changing the polarity of the voltage on it, but I ended up experiencing attraction all the time.
Is there any way to make an electromagnet that attracts in one way and repels in another way?