Electromagnets controlled by arduino - please help!

Hi,
I am working on a project which uses grasshopper and firefly to switch on/off and move electromagnets. These electromagnets would have to be quite strong because the model i will be making would potentially be moving small metallic spheres around. I am new to arduino so I'm not really sure how it works. I have just been introduced to it and I am expected to have a prototype complete in three days :D. I am trying to read about it and I just had an introductory tutorial to it, so things are moving slowly right now. Any help would be greatly appreciated!

I am working on a project which uses grasshopper

What is a grasshopper (in this context)?

and firefly

What is a firefly(in this context)?

I am working on a project which uses grasshopper and firefly

Sorry, I don't know what those are.

What's the role of the Arduino?

What is the voltage & current rating on the electromagnets?

[u]Here[/u] is an example of driving a solenoid with the Arduino. (A solenoid is an electromagnet that moves an iron rod.) There are also ways of doing it with MOSFET instead of with a transistor.

I have just been introduced to it and I am expected to have a prototype complete in three days

That's a long shot. If you have all of the parts, and the programming is simple, and you know what you are doing that might be possible. On the other hand, it took me a couple of months (evenings & weekends) to finish my 1st Arduino project, which involved blinking lights to the music. And, I have many years of electronics experience and quite a bit of on & off programming in various languages over the years too.

PaulS:

I am working on a project which uses grasshopper

What is a grasshopper (in this context)?
Grasshopper is a plugin for Rhino (3d modelling software) which allows you to create flexible parametric designs with Rhino.

and firefly

What is a firefly(in this context)?
firefly is a plugin for grasshopper (plugin for a plugin haha) which allows you to bridge the gap between grasshopper and arduino. So its sort of the interface between the two.

DVDdoug:

I am working on a project which uses grasshopper and firefly

Sorry, I don't know what those are.

What's the role of the Arduino?

What is the voltage & current rating on the electromagnets?

[u]Here[/u] is an example of driving a solenoid with the Arduino. (A solenoid is an electromagnet that moves an iron rod.) There are also ways of doing it with MOSFET instead of with a transistor.

I have just been introduced to it and I am expected to have a prototype complete in three days

That's a long shot. If you have all of the parts, and the programming is simple, and you know what you are doing that might be possible. On the other hand, it took me a couple of months (evenings & weekends) to finish my 1st Arduino project, which involved blinking lights to the music. And, I have many years of electronics experience and quite a bit of on & off programming in various languages over the years too.

I haven't made the electromagnet at the moment so i can't give you the voltage and current rating. However, I am thinking of either buying electromagnetic components or making one myself using a coil and iron core. Which would you recommend? Lol sorry for the stupid questions...like I said, I am completely new to all this :smiley:

The prototype is not going to be too big (We are only testing ideas) and our tutor said it shouldn't be too hard to get this done for thursday. Lol still sound crazy?

Will the electromagnets be touching the spheres when they try to lift them or are you expecting them to lift at some distance - which would require a much more powerful magnet.

Have you considered using permament magnets that are lifted up and down inside a tube by a servo. Extend the magnet out of the bottom of the tube to pick up the sphere and withdraw it into the tube to break contact with the sphere.

The practical implementation of electromagnets is not as simple as it seems and some large electric currents or coils with very many windings will be needed.

Cheap relays could provide a source for your electromagnets.

...R

Robin2:
Will the electromagnets be touching the spheres when they try to lift them or are you expecting them to lift at some distance - which would require a much more powerful magnet.

Have you considered using permament magnets that are lifted up and down inside a tube by a servo. Extend the magnet out of the bottom of the tube to pick up the sphere and withdraw it into the tube to break contact with the sphere.

The practical implementation of electromagnets is not as simple as it seems and some large electric currents or coils with very many windings will be needed.

Cheap relays could provide a source for your electromagnets.

...R

The electromagnets will not be touching the spheres. They will be below a sheet material which would carry the spheres. How will the magnets in a tube work? I already considered doing this with a servo but i didn't really know how it will work. The magnets may also need to switch polarity thats why i was considering an electromagnet. But like you said, it may need many coils and a lot of power.

Get the magnets bit working first before you bother with an arduino, because that is the bit you will struggle with.

Is your tutor a fool? He sounds like one.

Grasshopper is a plugin for Rhino (3d modelling software) which allows you to create flexible parametric designs with Rhino.

So... If this for a 3D modeling class, I'd suggest you model something you already know how to build. And then if you are really supposed to build it, I suggest building something you can make from shtuff you can get at the hardware store.

So Firefly is a plugin for Grasshopper and Grasshopper is a plugin for Rhino? You've not even got your electro magnets sorted yet?

Sorry, I think it would take me longer than that to get to learn enough about Rhino, Grasshopper and Firefly.

Id suggest you get some thick nails. Then starting just under the head, wind a nice neat coil onto it until you've covered about an inch of it. Hold this in place using a piece of tape and run the loose straight back up to the head again. Now make another neat coil directly over the first time and repeat the process. Once you've done this about half a dozen times, hook it up to a 1.5 volt battery and see if has any effect on your spheres. (I hope they're small).

With a bit of experimentation you should hopefully get a better idea (than me) of how many coils are needed to be effective. Once you've perfected the design make up 64 (you may find a cordless screwdriver handy here to speed up operation) leaving enough spare wire at each end of the coil available for soldering later.

Hammer your coils into a piece of board as an 8 x 8 matrix. Now for each row connect all of the positive ends together and lead off to a screw terminal at the edge of the board. For each column connect all the negative ends together and lead off to a screw terminal at the top (or bottom) of the board.

You'll now have 16 screw terminals. If you make it this far it should be fairly simple to build a circuit that will allow your arduino to contoll every one of those magnets independently. All you'll then need to do is sit a tray on top of the nail heads and drop a few spheres on it and start guiding them around with your arduino.

Grumpy_Mike:
Get the magnets bit working first before you bother with an arduino, because that is the bit you will struggle with.

Is your tutor a fool? He sounds like one.

Yeah, I'll try to get that working first. LOL he's not a fool. He's just trying to expose us to a lot in a short period of time...which does sound quite foolish actually

KenF:
So Firefly is a plugin for Grasshopper and Grasshopper is a plugin for Rhino? You've not even got your electro magnets sorted yet?

Sorry, I think it would take me longer than that to get to learn enough about Rhino, Grasshopper and Firefly.

Id suggest you get some thick nails. Then starting just under the head, wind a nice neat coil onto it until you've covered about an inch of it. Hold this in place using a piece of tape and run the loose straight back up to the head again. Now make another neat coil directly over the first time and repeat the process. Once you've done this about half a dozen times, hook it up to a 1.5 volt battery and see if has any effect on your spheres. (I hope they're small).

With a bit of experimentation you should hopefully get a better idea (than me) of how many coils are needed to be effective. Once you've perfected the design make up 64 (you may find a cordless screwdriver handy here to speed up operation) leaving enough spare wire at each end of the coil available for soldering later.

Hammer your coils into a piece of board as an 8 x 8 matrix. Now for each row connect all of the positive ends together and lead off to a screw terminal at the edge of the board. For each column connect all the negative ends together and lead off to a screw terminal at the top (or bottom) of the board.

You'll now have 16 screw terminals. If you make it this far it should be fairly simple to build a circuit that will allow your arduino to contoll every one of those magnets independently. All you'll then need to do is sit a tray on top of the nail heads and drop a few spheres on it and start guiding them around with your arduino.

Thank you so much! I'll try to get the magnets working as soon as possible and I'll let you know how it goes :smiley: I'm assuming the nails don't have to b arranged in a gridded pattern?

assuming the nails don't have to b arranged in a gridded pattern?

Depends on what they are supposed to do.
I remember some time ago some one trying to move metal sphears with electro magnets. He made a magnet and coudn't get any movement at all. They have to be very strong magnets drawing a lot of current to be able to move something. Just try one on a bench supply and check the feasibility.
It might be the same tutor?

anthony9419:
The electromagnets will not be touching the spheres. They will be below a sheet material which would carry the spheres.

Is this sheet material specified in the project description given by your teacher?
Is it specified that the movement of the balls has to be by magnetism?
If these haven't been explicitly specified, I guess the teacher is trying to get you think laterally.
And I can probably guess that the answer he is looking for is based on Relativity.

anthony9419:
The electromagnets will not be touching the spheres. They will be below a sheet material which would carry the spheres.

The critical thing is the distance between the sphere and the face of the magnet because the magnetic force falls off as the square of the distance. The nature of the material may also affect the transmission of the magnetic force.

I had thought from your original description that the magnets would have to lift the spheres but that does not seem to be required which makes things easier.

How will the magnets in a tube work? I already considered doing this with a servo but i didn't really know how it will work. The magnets may also need to switch polarity thats why i was considering an electromagnet. But like you said, it may need many coils and a lot of power.

If the spheres are supported by the sheet material it may not be necessary to put the magnets in tubes. I only suggested the tubes as a mechanism that would allow the magnet to be ddisconnected from the sphere.

I have a collection of powerful small magnets and ball bearings from a game with which you could construct shapes by "sticking" the balls and magnets together.

I remember from years ago a childs toy in which a tiny plastic car was navigated around a tiny streetscape by manipulating a permanent magnet below the cardboard on which the streets were printed.

Get a permanent magnet and a steel ball and experiment - take 5 minutes.

...R

Grumpy_Mike:

assuming the nails don't have to b arranged in a gridded pattern?

Depends on what they are supposed to do.
I remember some time ago some one trying to move metal sphears with electro magnets. He made a magnet and coudn't get any movement at all. They have to be very strong magnets drawing a lot of current to be able to move something. Just try one on a bench supply and check the feasibility.
It might be the same tutor?

The spheres are only 6mm in diameter and the thickness of the diameter is 3mm. So I'm guessing they should be quite easy to move around. Also, I might be using iron shavings rather than the metal spheres. The idea behind this project is that the magnets repel and attract the metal spheres/iron shavings in order to create patterns. The electromagnets will be switched on and off in a random pattern using grasshopper and firefly.

Henry_Best:

anthony9419:
The electromagnets will not be touching the spheres. They will be below a sheet material which would carry the spheres.

Is this sheet material specified in the project description given by your teacher?
Is it specified that the movement of the balls has to be by magnetism?
If these haven't been explicitly specified, I guess the teacher is trying to get you think laterally.
And I can probably guess that the answer he is looking for is based on Relativity.

You question was answered in my reply to Grumpy_Mike in the previous comment.

The idea behind this project is that the magnets repel and attract the metal spheres/iron shavings in order to create patterns.

Magnets will not repel metal spheres/iron shavings they will only attract them.

If however you have a diamagnetic material that will be repelled by a magnet but not attracted to it.

anthony9419:

Henry_Best:

anthony9419:
The electromagnets will not be touching the spheres. They will be below a sheet material which would carry the spheres.

Is this sheet material specified in the project description given by your teacher?
Is it specified that the movement of the balls has to be by magnetism?
If these haven't been explicitly specified, I guess the teacher is trying to get you think laterally.
And I can probably guess that the answer he is looking for is based on Relativity.

You question was answered in my reply to Grumpy_Mike in the previous comment.

OK. I was thinking of a stretched rubber sheet, moved up and down in various places, so that the balls run by gravity into the wells. But it appears that you have to use magnetism.

KenF:
So Firefly is a plugin for Grasshopper and Grasshopper is a plugin for Rhino? You've not even got your electro magnets sorted yet?

Sorry, I think it would take me longer than that to get to learn enough about Rhino, Grasshopper and Firefly.

Id suggest you get some thick nails. Then starting just under the head, wind a nice neat coil onto it until you've covered about an inch of it. Hold this in place using a piece of tape and run the loose straight back up to the head again. Now make another neat coil directly over the first time and repeat the process. Once you've done this about half a dozen times, hook it up to a 1.5 volt battery and see if has any effect on your spheres. (I hope they're small).

With a bit of experimentation you should hopefully get a better idea (than me) of how many coils are needed to be effective. Once you've perfected the design make up 64 (you may find a cordless screwdriver handy here to speed up operation) leaving enough spare wire at each end of the coil available for soldering later.

Hammer your coils into a piece of board as an 8 x 8 matrix. Now for each row connect all of the positive ends together and lead off to a screw terminal at the edge of the board. For each column connect all the negative ends together and lead off to a screw terminal at the top (or bottom) of the board.

You'll now have 16 screw terminals. If you make it this far it should be fairly simple to build a circuit that will allow your arduino to contoll every one of those magnets independently. All you'll then need to do is sit a tray on top of the nail heads and drop a few spheres on it and start guiding them around with your arduino.

Hi, thanks for the help again. I've made the magnets but they don't seem to work too well. I followed this:

but the magnets are very weak. The magnets pick up ball bearings but they have to be in contact with it. Also, it seems the more the resistance the stronger the magnets are. Is this correct? Also the magnets are hooked up to a 9 volt battery. Could that be the problem?