Control DC electromagnets

I would like to control 3 DC electromagnets with my arduino. The electromagnets are at about 12v and 2amp each. They need to be turned on and off multiple times per second. What is the best way to go about doing this?

On a side note, I would really like to power the arduino and all three coils with one DC power supply. Only one electromagnet needs to be on at once. What is the best way to power this setup.

Thanks for all the help.

I would use logic level N-channel MOSFET transistors to switch the coils on and off. The Arduino I/O pins can switch the MOSFET gate termianls directly.

An external 3 amp 12vdc power supply should be enough current if your only going to have one coil on at and time and there is enough current left to drive a 5vdc regulator to power the Arduino if away from a USB connection.

Lefty

Do I need to control the amount of amps that the arduino receives, or does only the voltage matter?

Could you post a link to a N-channel MOSFET transistor that would do well in my application?

There are many avalible from many sources, here is one I just goggled:

http://www.hobbyengineering.com/H1586.html http://info.hobbyengineering.com/specs/IR-irl520.pdf

The Arduino will draw the current it requires, just wire the 12vdc to either the external power jack or the Vin pin.

Lefty

They need to be turned on and off multiple times per second

How many is multiple? The problem with a big coil like this is the inductance, it's like charging a capacitor, it takes time for the current to build up in the coil and get the full magnetism.

So you could be switching the voltage rapidly but not seeing the effect you expect. Just remember that if you have problems later. The standard cure is to use a higher voltage but you have to make sure the coil is turned off before before the current exceeds the maximum.

With any luck this won't be an issue for you.

Basically what I am using the set up to do is spin a magnet which will spin a prop in an aquarium. The electromagnets are positioned in a triangular shape about 1in between each coil on the outside of the tank. The cores will be iron. Then, there will be a magnet on an axal (diametrically magnetized) on the inside of the tank, which has about 1/2in thick glass. The magnet will hold the iron through the glass and act as a clamp when the coils are off. When a coil turns on (all coils will have the same poll facing the magnet) the magnet on the other side of the glass should rotate so that it's opposite end is facing the electromagnet with electricity. By turning the electromagnets off and on in sequence, I was thinking that I could control the speed that the magnet spins.

Is there any logic errors in there? Is 12v @ 3amp over kill for this application? All I need is enough change in magnetic pull to cause the magnet (about 2.5in diameter) on the other side of 1/2in glass to spin. What current should I use instead? About how much current should I put through coils that are no more then 2.5in in length and 1.5in in diameter?

Is 12v @ 3amp over kill for this application?

I don't know, what I do know is that a magnetic field drops off at the inverse cube of the distance so magnetic fields drop off very quickly. However, 3A is a lot of current to put through a coil for an electronics guy like myself.

All I need is enough change in magnetic pull to cause the magnet (about 2.5in diameter) on the other side of 1/2in glass to spin.

It also depends on how much drag this magnet is getting as to how much power you need to make it move.

Is there any logic errors in there?

Well at the moment you have an open loop system, that is you are going to change the magnetic field strictly according to a time schedule. There is no mechanism for changing this while the prop comes up to speed, so there might be some slippage.

This sounds like the magnetic stiring devices you find in labs and they go quite fast. You still haven't said how fast you want to turn the prop.

1/2inch is a lot to decouple magnets by...

would it not be easier to set the coils in resin and mount everything inside the aquarium?

My hopes where to keep all the electricity/heat out of the aquarium but if need be, I will resort to encasing them in resin and using them in the tank. I would like the prop to turn about 1000rpm max.

The reason I am now wondering how much power is necessary in the electromagnets is because the magnet in the tank pull about 1000lbs, which should easily be enough to hold itself and the 3 coils on the outside of the tank to the tank (it should attract the iron core in the coils). When a coil is turned on, it will repel the same poll of the magnet, and attract the opposite poll. How much power is necessary to do that I don't know. I assume it is a fairly small amount?

would like the prop to turn about 1000rpm max

16Hz? In water? That's going to take quite a lot of power, I'd've thought. How big is the prop?

What I meant to type was that I would like the prop to move about 3000 gallons per hour. I am not sure how many rpm that would be. The prop is similar in shape and size to the dumas 3004, but slightly larger.

3000 gallons per hour

US or imperial?

US

Sorry, US units are not my strong point A US gallon of water (I'm assuming water) weighs about 8.3 pounds? So 3000 gallons is 24 900 pounds, or 11 320 kg, give or take. So you need to move about 3.5 kg per second (nearly 7lb).

Is this a ducted system? Is the prop vertical or horizontal?

It is horizontal, and is not ducted. Why? Will heat be a problem?

The Arduino will draw the current it requires, just wire the 12vdc to either the external power jack or the Vin pin.

So I can just send the 12v 3amp line straight into the arduino and it will be able to take what it needs by iteslf? Nothing required to alter the current in anyway?

Correct, if you wire it into the external power jack or Vin pin. This routes the 12vdc to the 5vdc voltage regulator that powers the active components on the Arduino board.

Lefty

Will logic level N-channel MOSFET transistors be able to switch fast enough for my application? Also, I looked around at a few relay circuits and I am a little confused. I thought that all that I need to do to use a logic level N-channel MOSFET transistor is plug the 12v 3amp power supply in one side, the 5v from one of the output pins on the arduino, and then ground it?

I thought that all that I need to do to use a logic level N-channel MOSFET transistor is plug the 12v 3amp power supply in one side, the 5v from one of the output pins on the arduino, and then ground it?

Mosfet gate goes to Arduino I/O pin. Source pin of MOSFET goes to ground, drain of MOSFET goes to load (magnet) other end of load goes to +12 voltage. The 12vdc ground must also be wired to the Arduino ground. Most recommend that a reversed biased diode be wired across the magnet coil.

Any specific MOSFET data sheet will give turn on and off time specs that can be seen if they match well with your time requirments. Lefty

Most recommend that a reversed biased diode be wired across the magnet coil.

I looked it up and found that it is much like a check valve. When you say wire it across the magnet coil, what do you mean? What is it's purpose?

Oh I checked their data sheet and it is about 122 nanoseconds to turn off then completely turn back on. Not too shabby.