I was playing around with two EM coils where they have a steady flow of DC current through them.
Theoretically, both of them should be magnetised to have a stable north and south pole, a typical dipole field.
When I make both their like poles face one another, they are able to repel but when they get close enough, they somehow "merged" and attracted one another.
If I put them at a close distance but not too close together(~0.8cm,) they will repel as expected.
Why is this happening? I am using an Arduino with some drivers to drive the EM coils.
I have read this but it seems that for this case,the two magnets of interest have different magnetic fields. The magnetic field and current through the coils should be approximately the same but it is still happening.