Hello, I want to make a project where I control an electromagnet (which I will make by wrapping wire around iron and supplying with electricity) that I can simply turn on an off with my arduino so that it can pick up and drop metal (this will be part of a larger robot arm project).
As far as I know, I need a relay so that I can use a separate power source for the magnet that I can switch on and off. Beyond this, I am slightly confused, and I do not know if this is the best method. I only plan to use a battery to control the magnet, and it seems most relays are intended for much larger loads.
Ultimately, what is the easiest way to turn a magnet on and off, and if using a relay is the best option, how do I go about doing that?
Any help would be great!