Pages: [1]   Go Down
Author Topic: Electromagnet play  (Read 872 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Online Online
Shannon Member
****
Karma: 206
Posts: 12099
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Johannesburg. UTC+2
Offline Offline
Faraday Member
**
Karma: 91
Posts: 4261
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote

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)
Logged

Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?


* pins list.jpg (234.29 KB, 507x546 - viewed 8 times.)
Logged

0
Online Online
Shannon Member
****
Karma: 206
Posts: 12099
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3011
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Online Online
Shannon Member
****
Karma: 206
Posts: 12099
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Faraday Member
**
Karma: 62
Posts: 3011
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17293
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

* Nanode_Connections.pdf (129.4 KB - downloaded 15 times.)

* IMG_5154.JPG (102.27 KB, 800x533 - viewed 8 times.)

* IMG_5155.JPG (56.69 KB, 800x533 - viewed 9 times.)
Logged

Pages: [1]   Go Up
Jump to: