# How can I detach a metal ball from a magnet using opposite force with current?

I am trying to make a very small device which has multiple cylinders and inside each cylinder there is an iron ball (about 2.5mm ball size.) The bottom and the top of the cylinder are magnets, so the ball inside the cylinder is pulled by one of the magnets of the cylinder and the ball stays there.

Once the ball stays on one side of the cylinder, I want to be able to pull the ball to the other side of the cylinder, probably using some kind of magnetic field (using current.)

I have no other idea on how to do this. I thought about servos, but they are mechanical, and they are too big for my project, so I decided to go with electricity.

I have no idea how to actually create this pull force. I assuming that pulling the ball a bit of half way throough the cylinder is enough, assuming the two magnets are equally strong.

UPDATE:

100% of the time the ball is in one end of the cylinder, it's not "floating." I want the ball to be attracted to only 1 end of the cylinder, and stay there without using current. The only time I would like to use current is when I want the ball to change direction to the other side. I guess I mean ferromagnetic ball and not "iron." The point is that I need the ball to be attracted to one magnet or the other. The point is to use the magnet "free" power to make the ball stay in one point

Here is an image to visualize this:

• serious question: Why would the ball stay at either end of your tube? What's the orientation of these magnets? (also, the fact that you say "metal" here, where you mean "ferromagnetic", probably, indicates you might really want to revisit the physics behind magnets before doing this.) Commented Jan 18, 2021 at 19:57
• What are your assumed unstated other requirements on appearance , materials and power. How can you polarize a floating ball to keep its polarity? Commented Jan 18, 2021 at 19:58
• what is the purpose of the ball? ... at first glance, this appears to be an X-Y question ... what is your end goal? Commented Jan 18, 2021 at 20:19
• @MarcusMüller well, 100% of the time the ball is in one end of the cylinder, it's not "floating". I want the ball to be attracted to only any end of the cylinder, and stay there without using current. the only time I would like to use current is when I want the ball to change direction to the other side. and yes, I guess I mean ferromagnetic. the point is to use the magnet "free" power to make the ball stay in one point
– toto
Commented Jan 18, 2021 at 20:48
• @jsotola it doesn't really related to X or Y question, I just need to use current (in the right direction) in order to detach the ball from the magnet that it attached to. the question is how to build this cylinder so this will work
– toto
Commented Jan 18, 2021 at 20:52

You need an electromagnet in place of one of your magnets. By passing current through a coil of wire you create a magnetic field. If the electromagnet's field is stronger than that of the permanent magnet then the ball will move. Be sure to use a material for the electromagnet's core that does not become permanently magnetized.

• by "core" you mean the meterial that holds the coil in place? I can just use plastic of some sort.. right?
– toto
Commented Jan 19, 2021 at 10:47

Here's my first go at it:

The coils serve as a electromagnets when current passes through it. You use them to make one of the sides more attractive to the steel ball by "reinforcing" the field in that side. With sufficient current, this would work. However, the problem with that is that, in order to make the ball switch sides, you'll have to make the other side into a magnet that is a lot stronger than the side the ball is currently, because magnetic attraction is stronger when close to the magnet.

This "proximity effect" can be mitigated by moving the magnets away:

Alternatively, if you want to be clever, you could make a "reverse electromagnet" to briefly cancel the permanent magnet that is currently close to the ball: