To experiment in repelling a magnet I winded a 3-layers inductor around a piece of a common nail (soft-iron?)
Initially it seemed to work OK but later I found that, after cutting the current, the magnet was atracted by the core which started to behave as a magnet. Not what I wanted, precisely.
Just to be sure I verified that a paper clip is attracted by the core.
I did not foreseen that. How to avoid it? Not using a core? Or is this the wrong material?
Now that I think of it this would be good if I wanted to attract the magnet. But I want just the opposite.