Reversible Electromagnets?

I'm trying to control two pairs of reversible electromagnets with the arduino with the circuit design here:
http://www.arduino.cc/playground/uploads/Learning/solenoid_driver.pdf
My question is this: given that this circuit is designed for a solenoid, I see no reason why it would be reversible. This is a main component of the function I need from my electromagnets, so I was wondering how exactly should I change the circuit to allow reverse current flow? I'm rather new at this and not exactly an expert in electrical engineering, so any help would be appreciated. I've checked the playground and haven't seen anything I would deem particularly helpful in this case.
Thanks!

If you want to reverse the direction... you treat it the same as you would a motor. You use an H-Bridge.

Alright, so where exactly in the circuit should I put the H-Bridge so that the arduino can control both current directions? If possible I need the circuit to be self-contained, so that all the work is handled by the arduino. Apologies if this is a stupid question, as I said I'm rather new to circuit design and microcontrollers.

It is always best to specify the voltage and the current of the device you want to drive, in this case your electromagnet, before one can recommend the best circuit or device to drive it.

H-drive devices can be as simple as a single IC component and your Arduion would control it with two digital output pins, one to command direction and the other to control on or off.

Lefty

I have not posted voltage/current because I'm not 100% certain about either. The electromagnets I'm trying to drive I wound myself, and I'm attempting to drive them off of a 12V 2.5A DC adapter plugged into a wall outlet. I would welcome any alternate suggestions as to a power source, though.

Well your best off playing with your magnet until you find the voltage and current that allows it to perform as you wish. Once you know that data then that is the best time to start designing the driver and specifying components for the H-drive.

Lefty

You should measure the DC resistance of the coils before assuming any voltage or current levels. With at least the resistance known, you can determine how much current will flow at a given voltage. You need to be careful not to a) overdrive the coils and burn them up or b) draw too much current from your power supply and fry it.

You need to limit the current (by reducing the voltage) to something less than the maximum the wire can handle for its gauge. See this page for info on that: American Wire Gauge Chart and AWG Electrical Current Load Limits table with ampacities, wire sizes, skin depth frequencies and wire breaking strength

something less than the maximum the wire can handle for its gauge

Quite a bit less actually. These figures are for a single strand of wire. Once you start winding them round together the heat builds up much more quickly.

The resistance would appear to be 1.7 ohms per coil pair. I’ve already burned out a 12V 1A power adapter by driving the coils for too long, and I’ve considered using a 12V battery instead of an AC-based power supply; I’ve put a multimeter on the adapter I’m currently using, and it seems to be around 2.5A every .5 seconds, 0 the other .5. I haven’t had too much trouble with heat on the coils themselves, but I understand that it could be a problem if the current is sustained for a long enough period.

Just curious, what is this for?

Let’s make an example of 24 gauge wire used to make the coil and look up its current capacity in the link above: 3.5A for chassis wiring or .577A for power transmission. These numbers represent the best case for opposite types of needs. Your target will be somewhere in between.

Due to heating like Grumpy_Mike mentioned, you should start at the bottom end and work your way up, trying values and monitoring the temperature.

Using Ohm’s Law (in your case: Ohms / Amps = Volts)
At 1.7 ohms and .577 A means you can power the coils at a voltage of… wait for it: 1 Volt
At 3.5 A, you can increase the voltage to: 6V

So somewhere between those numbers is going to be your optimum voltage. My guess is around 3V. If you are only going to energize the coils for a moment at a time, you can hit them with a substantially higher voltage. Heat is really the limiting factor (and supply capacity) up to a point.

So for this example, you would need to find an H-bridge driver that a) is controllable by your Arduino (keeping it on topic) and b) can handle 6V at 3.5A or better. You’ll most likely drive it at a lower voltage, but you want the overhead for safety.

BTW: Your 12V/2.5A supply is cycling on and off to protect itself. You’re trying to pull almost 7A out of it! :o

Thanks so much for the help, my problem seems to make a lot more sense now. Given what I've been told, I believe that this motor driver should be able to control my coils properly, is there any reason why it shouldn't?

Well, you haven't posted what gauge wire you used to wind your coils. That's an important detail. The example I gave above was only hypothetical and uses 24 gauge wire for the sake of explaining the process and calculations involved in figuring out what you need to drive your coils.

(Sorry, after reading my own post again, I realized I drifted out of "example speak" and into "factual speak".)

Reply back with the gauge wire that you used and I'll rerun the numbers for you if you want.

I believe that this motor driver should be able to control my coils properly, is there any reason why it shouldn't?

Looks good providing your coils take less than 2A each (4A total). This drives 2 coils so as you said at the start:-

I'm trying to control two pairs of reversible electromagnets

You will need two of these boards and a power supply capable of providing that current.

Coincidentally, I did in fact use 24-gauge wire for my coils. Given that, should I try out a 12V battery or try and find a 6V 4A wall adapter?

I would try for the 6V supply. At 1.7R you get 3.5 Amps and that is a hell of a lot to push down a coil, it will get very hot. Next you have to control it.

OOOO, I just noticed that the H-bridge you pointed out is only good up to 4A TOTAL and it's two channels. You need something that can handle 6V/4A on each channel. So look for something a little heftier that these H-bridges.

And I'm thinking as I type..... ::slight_smile: If you run two coils in series as a single unit, you CAN use this H-bridge and drive it at 12V (4A). You would need only one of the h-bridge kits too. Hope I didn't just confuse you. :stuck_out_tongue: Let me know if you need clarification on that.

I think I understand...if I run each coil pair as a single unit in series, I'll be able to run both pairs from the same H-bridge chip; is that correct? Assuming I can find a 6V 4A power supply, that is.

Ugg, I misstated in my last post (12V/4A), but I it's still OK.

Yes, with this h-bridge and a 6V/4A power supply, run two coils in series on each channel. That will drive each pair of coils at 6V and just under 2A, which will be within the spec of the h-bridge.

If the coils are not powerful enough in this configuration, you'll need to find a heavier h-bridge. But you'll really need to keep an eye on the heat factor of the coils.

At 6V, the coils will each dissipate about 5 Watts, which is enough to heat them up depending on big they are. If you raise the voltage to 12V, they will each dissipate about 21 Watts, which may be enough to burn you or melt plastic after being on for a few minutes.