Magnetic levitation - Control the Electromagnet

Hello all,

I am building a device which should be able to elevate objects using electromagnetic force. I got a good idea and a plan on how I can build it with the hall sensor and read out the value. But I am not sure how to connect the electromagnet to the entire machine.

Can someone tell me how it is possible to attach a electromagnet to my Arduino UNO? So that I can control it's strength. I know I can't feed the magnet through the Arduino because it needs 1-5 Amps. But is there a way to make the arduino control the power source of the electromagnet?

Thanks!

Google "using a transistor as a switch". You'll have separate power for the magnet and you'll switch it on and off using a transistor that will be in turn switched by the Arduino.

Delta_G:
Google "using a transistor as a switch". You'll have separate power for the magnet and you'll switch it on and off using a transistor that will be in turn switched by the Arduino.

Thanks for your hint. I didn't know that search term. But I now found out that I should have described that better than I did. I need not a simple switch, it should be a component that can control the DC direction and strength.

LibertyMarine:
I need not a simple switch, it should be a component that can control the DC direction and strength.

The easiest way to control the electromagnet's strength would be using a simple switch circuit like mentioned above but using it in conjunction with pwm. Basically you turn the switch on and off really fast(>500hz). Then you would have to play around with the values. About the direction you would need a slightly more complex switch called a H-Bridge. One that would work for your 1-5 Amps would be something like this: Motor Driver 15A IRF7862PBF - ROB-09107 - SparkFun Electronics.

Hope that helps,
luketheduke

luketheduke:
The easiest cway to control the electromagnet's strength would be using a simple switch circuit like mentioned above but using it in conjunction with pwm. Basically you turn the switch on and off really fast(>500hz). Then you would have to play around with the values. About the direction you would need a slightly more complex switch called a H-Bridge. One that would work for your 1-5 Amps would be something like this: Motor Driver 15A IRF7862PBF - ROB-09107 - SparkFun Electronics.

Hope that helps,
luketheduke

Yeah that helped a lot. Thanks. I looked up what exactly a H-Bridge is and how it works. I found that a self made H-Bridge is a lot cheaper. But I am not sure whether this here will work out:

https://drive.google.com/file/d/0BxMLn_dhQzs3YzJzREh6OEZ2ZEk/view?usp=sharing

Can you say something about that? So I can give an input at L or R from Arduino. And the Quelle (=Source) feeds the electromagnet in the middle.

Can you say something about that?

Yes it is rubbish.

Making a proper H-bridge circuit is not easy and you are much better off buying one.

However, I doubt if you will need to reverse the field of your electro magnet. But as you haven't said how you think this could work it is hard to say.

I have had several students try magnetic levitation as their project and the success rate is small.

Grumpy_Mike:
Yes it is rubbish.

Would you mind explaining to us noobs what is "rubbish"like of the schematic? I would be honoured if you would enlighten me.

You can buy these things commercially; typically a small steel Earth globe is suspended. However there are lots of construction ideas on the web if you search for "magnetic suspension" or similar.

Here is one construction page Suspended Objects Experiment

The schematic you show on google drive is a terrible design, because the transistors can and will short circuit the power supply.

Grumpy_Mike:
Yes it is rubbish.

Making a proper H-bridge circuit is not easy and you are much better off buying one.

However, I doubt if you will need to reverse the field of your electro magnet. But as you haven't said how you think this could work it is hard to say.

I have had several students try magnetic levitation as their project and the success rate is small.

Thanks for your answer, could you then please tell me why it is "rubbish"?

That's how it is designed to work, it's the early concept: https://drive.google.com/file/d/0BxMLn_dhQzs3SGFkeFYwSlFuVFE/view?usp=sharing

Two axis will be stabilized by the permanent magnet. And because Earnshaw said it, we need to stabilize the 3rd axis, I do it with the Hall-Sensor and the Electromagnet.

jremington:
You can buy these things commercially; typically a small steel Earth globe is suspended. However there are lots of construction ideas on the web if you search for "magnetic suspension" or similar.

Here is one construction page Suspended Objects Experiment

The schematic you show on google drive is a terrible design, because the transistors can and will short circuit the power supply.

Yeah, but only when R and L are under voltage?

could you then please tell me why it is "rubbish"?

Because there is nothing in it to prevent shoot through. That is where both top and bottom FETs conduct and your supply is shorted out. This is because as the switching voltage changes from low to high there is a range of voltages where both FETs are on.
A good circuit would contain components that ensure that this does not happen.

Grumpy_Mike:
Because there is nothing in it to prevent shoot through. That is where both top and bottom FETs conduct and your supply is shorted out. This is because as the switching voltage changes from low to high there is a range of voltages where both FETs are on.
A good circuit would contain components that ensure that this does not happen.

Ok, I saw that issue but couldn't see its consequences. I googled a bit and found that. The transistors Q5,Q6 ensure in combination with the resistors that there is no possible combination where a short circuit can happen. So by better you mean something in that direction?

Please mind that I have never done something like that before.

But if was to only use the right combination, diagonally, there wouldn't be a short circuit? I know it's naive and I know that this isn't a solution, but I'd like to know whether this would work?

I'd like to know whether this would work?

Taking into account Murphy's Law, it is not worth it.

But if was to only use the right combination, diagonally, there wouldn't be a short circuit?

A lot depends on the transitions rather than the combinations.

These is a lot more to H-bridges than preventing shoot through. One issue is having the right voltages to turn on the FETs. It requires proper design which to be honest is not a topic for beginners. With H-bridges available for a few dollars, there is little scope for saving money by doing it yourself. And like I said I doubt you need to reverse the magnetic field anyway.

Grumpy_Mike:
A lot depends on the transitions rather than the combinations.

These is a lot more to H-bridges than preventing shoot through. One issue is having the right voltages to turn on the FETs. It requires proper design which to be honest is not a topic for beginners. With H-bridges available for a few dollars, there is little scope for saving money by doing it yourself. And like I said I doubt you need to reverse the magnetic field anyway.

I wouldn't have to reverse it if the levitation device (electromagnet) was above the floating magnet. But in the construction (as linked) I need to reverse it otherwise it'd have to be in a constant instable position and therefor it wouldn't be able to deal with a lot of distraction.

But as you said this topic isn't for beginners. So I may need to stick with a already built H-Bridge, as the other guy told me.