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.
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.
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.
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?
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.
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?
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.
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?
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.
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