Electromagnets

Hi!

I have an electromagnet and I want to control the power and change polarity. I understand that I change polarity through an H Bridge like that schematic http://itp.nyu.edu/physcomp/Labs/DCMotorControl. But somebody told me "don't forget the back emf diode". According to my research I have found that http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads. So... I'm confuse a little bit. If I use only the Hbridge schematic, does the electromagnet is protect from the back emf? If not, how can I add the diode protection? Hope this is clear...

Oh... This the the electromagnet type: http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=0825900

PS: I can build small electronic circuits with schematics but I understand absolutely nothing about electronics.

Thanks!

Back EMF is a large voltage generated when a magnetic field collapses. That is when you turn the electromagnet off you will get a spike of several hundred volts generated by the coil in the reverse direction of the voltage you applied.
You use a diode to clamp or short out this voltage so it dosn not go on to damage anything else in your circuit.

If you only pass the current in one direction through the coil then a normal diode will do. But if you want to have the current flowing in either direction then one solution is to use two zenner diodes. A zenner diode breaks down at a certain reverse voltage. Choose a voltage that is about 10 to 20% above your driving voltage and use two of them in series. Wire then cathode to cathode and then put the anode ends across your coil. (or the other way round anode to anode and the cathode end across the coil).

Hope that helps

Thanks for your reply!

In the H Bridge schematic why there are no diode in the circuit? http://itp.nyu.edu/physcomp/Labs/DCMotorControl

Finally, my question is like 3 questions in one.
1- For controlling the power and change the polarity should I use only the H Bridge schematic or H Bridge schematic + the Hight current Loads schematic?
2- If I should use both of them, how does it go, How can I wire those together?
3- In any case where do I add the diode? Can I find a schematic somewhere?

(sorry, I have a bad english, i know it doesn't help)

Thanks!

n the H Bridge schematic why there are no diode in the circuit

I don't know maybe they were not aware, don't believe all you read. (including this (does that mess with your head?)) :wink:

where do I add the diode

As I said in the last answer across the coil.

should I use only the H Bridge

How much current does the coil take? If this is within the rating of the H-bridge use that.

If I should use both of them

You can't you have to make a more powerful H-bridge circuit using say FETs rather than the chip.

Hey Grumpy_Mike, I didn't know that it was you who built the MIDI Glockenspield. This is awesome!

Well, now I have studied all the diode protection stuff and I know what "across the coil" mean... ::slight_smile:

I need to drive 9 electromagnets 12V and I'd like to change polarity like switching A-to-B_B-to-A and at a different speed for each electromagnet. How should I do that? Grumpy_Mike, do you think your schematic of your midi glockenspield can be useful for that projet?

Thanks!

Yes you could use the LM18293 drivers, but if you want to drive them in either direction you could only drive two coils from each chip. So you would connect the coil to outputs 3 & 6, and drive the inputs accordingly. Actually this should help with the commutation (turning off) of the coil as when it is off it is effectively shorted out reducing the potential back EMF problem. I am not sure how fast you want to switch them but the inductance (time constant) will prevent them from switching too fast. In a way it is just like driving a stepping motor, you have to drive those coils in a sequence so have a look at the tutorials doing that.

I am curious as how other I could describe wiring something across a coil? As you might know I do have an education background so I have an interest in how people learn.

Also what are you making that requires a change in polarity of a magnetic field? The only thing I ever made of that required that was a device for reprogramming a car park access card, but let's not go too far into that. :wink:

Hi! Thanks a lot for your reply!

I am curious as how other I could describe wiring something across a coil?

You can't describe it better than that! It's just me, I don't speak english, it was not obvious the first time. Also, I'm a bit nervous working with electromagnets. I don't want to mess around.

Also what are you making that requires a change in polarity of a magnetic field?

My idea start there: http://tinyurl.com/5kl4kt. Of course, this is not what I want to do but the principle is about the same.
It will show you also how fast I want to switch them.

So... I have 3 possibilities:
1- Lab: DC Motor Control Using an H-Bridge – ITP Physical Computing and replace with L293D because if I understanf well, L293D has built in diodes. But in that shematic it is only for one motors, I need 4, 6, 8 or 9.

2- Use your schematic for MIDI Glockenspield

3- http://www.bobblick.com/techref/projects/hbridge/hbridge.html with http://www.bobblick.com/techref/projects/sv2pwm/sv2pwm.html and control them manually. Unfortunately, that circuit is for using with Basic Stamp. I'm not sure how to adapt it to be manual or use with Arduino.

Many thanks!

I don't speak english, it was not obvious the first time

No problems, your English is much better than my (insert any other language here ;))

My idea start there: http://tinyurl.com/5kl4kt.

Fascinating, at first I thought he was sitting in front of a giant board, untill I saw the hands. That is only low speed switching in the electronic sense.
However if you use idea 3, that uses PWM and involves switching much faster than you will get with an electro magnet, so that won't work.

I hope you post the results in the exhibition section when you have finished it. best of luck.

I hope you post the results in the exhibition section when you have finished it. best of luck.

If I can get it works, yes!

However if you use idea 3, that uses PWM and involves switching much faster than you will get with an electro magnet, so that won't work

Thanks! One big question resolved and deleted!

There is still 1 big question remaining... which is the best circuit for that application?
#1: Lab: DC Motor Control Using an H-Bridge – ITP Physical Computing
or #2:http://www.thebox.myzen.co.uk/Hardware/Glockenspiel.html
or**#3**: A H-Bridge with a 555 (is it possible?)

Grumpy_Mike, I want sincerely thank you for keeping answering. I really really appreciated it! (btw, you seems very nice for a Grumpy_Mike) :wink:

OK there's not a lot to choose between them (1 & 2). Both will do two coils per IC what ever you can get the cheapest.

As for 3 a 555 to me is a timer chip so I am not sure about this.

As to the Grumpiness, I do get Grumpy when people disagree with me. I don't mind that so much but when you disagree with me you have to be right otherwise the grumpiness comes out. :wink:

My picture by the way is a South Park style portrait my son did of me from a web site so someone thinks it's a good likeness.

OK there's not a lot to choose between them (1 & 2). Both will do two coils per IC what ever you can get the cheapest.

Does that mean there's not a lot to choose because they are pretty similar or that's mean there is a better solution?

Earlier you said

Yes you could use the LM18293 drivers, but if you want to drive them in either direction you could only drive two coils from each chip. So you would connect the coil to outputs 3 & 6, and drive the inputs accordingly.

I don't understand what you mean by "drive inputs accordingly".

Thanks again and again
Julie

that's mean there is a better solution

No I would go with one of those if it were my project.

what you mean by "drive inputs accordingly".

There are two inputs controlling each motor / magnet. If they are both high or both low then nothing is turned on. If one is high and the other is low then it is on. If you swap which is high and which is low then the motor or magnet is in the other direction.

Hi there! I gave you a day break, how nice I am... :wink:

There are two inputs controlling each motor / magnet. If they are both high or both low then nothing is turned on. If one is high and the other is low then it is on. If you swap which is high and which is low then the motor or magnet is in the other direction.

I'm sorry, I did read it 20 times and I still don't understand?

When you say "There are two inputs controlling each motor" you talk about the input of the IC 2,7,10,15?

When you say "If you swap which is high and which is low then the motor or magnet is in the other direction." How can I do that?

Thanks!

OK lets look at the LM18293.
Wire up a coil between pins 11 and 14.
So now input pins 10 and 15 control each end of the coil.
Wire pin 9 of the chip to 5V to enable it.
You connect the pins of this IC to your Arduino let's say Digital pins 4 & 5, and configure them as outputs. (but it could be any pins)

Now put both pins low:-
digitalWrite(4,LOW);
digitalWrite(5,LOW);
Both ends of the coil are at zero volts so nothing happens, no current flows.

Now put one pin high and the other low:-
digitalWrite(4,HIGH);
digitalWrite(5,LOW);
current flows through the coil because one end is at zero volts and the other is at what ever voltage you have pin 16 connected to. (12V)

Now swap what is high and low:-
digitalWrite(4,LOW);
digitalWrite(5,HIGH);
current now flows in the other direction giving you a reversed magnetic field.

Now put both ends of the coil high:-
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
no current flows because they are both high.

Is that better?

Is that better?

It can't be better! Thanks a thousand times for your help!

Oh hummm... sorry...

Wire pin 9 of the chip to 5V to enable it.

pin 9 or 8? (in your diagram it is pin 8 connected to 5V)

in your diagram it is pin 8 connected to 5V)

Yes it is but also pin 9 is the enable and that should also be connected to 5V as well as pin 8. In my diagram I controlled the enable from the monostable but you don't have to