Go Down

Topic: Electromagnet play (Read 972 times) previous topic - next topic

Dbergy9

Hi,

I'm clueless when it comes to electronics so bear with me.

I want to control the intensity and polarity of a series of electromagnets (at the same time if possible) on an ATmega328 microcontroller and I cannot figure out the setup. Can anyone help me? Where do I start even? What pins do I use?

Do I need a driver, a darlington transistor array or a mosfet transistor array, or a H-brigde? I don't know the difference...starting at the beginning.

Each electromagnet is powered with a 12V DC power supply, consumes 3 watts, and has two connecting leads.

Any help is greatly appreciated.


retrolefty


Hi,

I'm clueless when it comes to electronics so bear with me.

I want to control the intensity and polarity of a series of electromagnets (at the same time if possible) on an ATmega328 microcontroller and I cannot figure out the setup. Can anyone help me? Where do I start even? What pins do I use?

Do I need a driver, a darlington transistor array or a mosfet transistor array, or a H-brigde? I don't know the difference...starting at the beginning.

Each electromagnet is powered with a 12V DC power supply, consumes 3 watts, and has two connecting leads.

Any help is greatly appreciated.




To do what you want you would have to treat the electromagnets as simple DC motors and drive them with a H-drive motor shield or module. Then there would be a 'direction' arduino output pin to determine the polarity of the magnet and a arduino PWM output pin to determine the intensity 0 to 100%. What pins you use depends on the motor driver you use and of course the motor driver has to be rated for better then the voltage and current rating of your magnet.

Lefty

MarkT

3W at 12V implies 0.25A per electromagnet which is well within the capabilities of small H-bridges, a multi channel motor
driver shield would seem to be the best fit if you need polarity reversal.
[ I won't respond to messages, use the forum please ]

Dbergy9

Could you link me to a specific model of the part so I can have a look?

Increasing and decreasing the intensity will be of most importance...

retrolefty


Could you link me to a specific model of the part so I can have a look?

Increasing and decreasing the intensity will be of most importance...


I believe this would work fine, but there are many others that sell H-drive motor shields that would work.

https://www.sparkfun.com/products/9815

Lefty

JimboZA

Quote
https://www.sparkfun.com/products/9815


Be aware that L298 based drivers drop a minimum of 1.8 volts off your input.... so if you put 12 in you'll only get 10... need 12?- put in 14.

(That's the minimum loss: goes to 3v at 1A and almost 5 at 2A)
Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Dbergy9

So is type of H-bridge?

What is the maximum number of 12V electromagnets do you reckon I can run off this shield? I was hoping for at least 3-4....but I see it says you can control two DC motors with this....is that the same for electromagnets?

Also I was hoping to run an RGB LED strip off the same microcontroller. I've been told it uses two SPI pins and two Power pins. Is this possible? I've attached the pins list - maybe someone can help me figure out if there is enough space for these?

MarkT


So is type of H-bridge?

What is the maximum number of 12V electromagnets do you reckon I can run off this shield? I was hoping for at least 3-4....but I see it says you can control two DC motors with this....is that the same for electromagnets?

One H-bridge per DC-motor, one H-bridge per electromagnet, one H-bridge for every bidirectional load.
Dual motor driver boards/shields are quite common, I think there are a few quad driver boards though - you'll
have to look for them.  google "quad motor driver" perhaps?
Quote

Also I was hoping to run an RGB LED strip off the same microcontroller. I've been told it uses two SPI pins and two Power pins. Is this possible? I've attached the pins list - maybe someone can help me figure out if there is enough space for these?


You have no pins for the electromagnets.  That's not your list is it?  For LEDs you need clock/data (they will be 12V strips
I suspect), and any pins will do (using SCLK/MOSI happens to be convenient for high-speed use)
[ I won't respond to messages, use the forum please ]

michinyon

Quote
Increasing and decreasing the intensity will be of most importance...


What are you actually trying to do with these electromagnets ?

The normal PWM strategies for controlling electric motors are not necessarily going to give you a good
outcome with electromagnets,   if you have no understanding of how it all works.

MarkT

Yes, this is an issue - electromagnets usually have solid iron cores rather than laminated,
so eddy-current losses are large, so PWM drive will heat up the iron core (lower PWM
frequency will help - mains frequencies for instance are often used with solenoids and relays,
but generate a very obvious buzzing).
[ I won't respond to messages, use the forum please ]

michinyon

I don't think you need an H-bridge.

Are you planning to reverse the magnetic direction of these electromagnets at all ?  If not,  then you don't need an H-bridge.

You are very keen on varying the intensity.   You may be disappointed with the outcome there, because of the way that
electromagnets behave.   Are you trying to pick things up ?

If you want to vary the electromagnet current,   the best approach would be to find a suitable transistor to implement
linear current control.  A big audio transistor would probably be the best place to start looking.

retrolefty


I don't think you need an H-bridge.

Are you planning to reverse the magnetic direction of these electromagnets at all ?  If not,  then you don't need an H-bridge.
He did state:
Quote

I want to control the intensity and polarity of a series of electromagnets (at the same time if possible)
[/color]
You are very keen on varying the intensity.   You may be disappointed with the outcome there, because of the way that
electromagnets behave.   Are you trying to pick things up ?

If you want to vary the electromagnet current,   the best approach would be to find a suitable transistor to implement
linear current control.  A big audio transistor would probably be the best place to start looking.

Dbergy9

I've attached a different pins list...I think this is the proper one.

These are the electromagnets I'm getting(12V, power consumption 4w)
http://www.ebay.ie/itm/221105769109?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

This is the indivdually RGB LED strip I've got (PWM all taken care by the LEDs):
http://www.adafruit.com/products/306

I've been advised recently to use this dual h-bridge driver which should run 2 electromagnets (image also attached):
http://semicon.njr.co.jp/eng/PDF/NJM2670_E.pdf

And a voltage regulator.

Here is the setup in the last image.

Go Up