Hi everyone..
I got my arduino about two days ago and I'm trying to use it to control the timing of a simple coil-gun. A coil gun is a device which accelerates a ferromagnetic (a material that is attracted by magnetic fields - like iron or steel) projectile by switching on and then turning off magnetic fields. The fields are produced by solenoids.
In my design, the currents will be on the order of a few amperes.. less than 15 but more than 5.
The current should be switched on, left ON for about 5 milliseconds, and then turned off. I believe the timing can be controlled by the arduino.. but it cannot control the large currents.
Can you give me some suggestions as to what kind of components I should use to isolate the arduino from these currents?
No.. it's a coil gun. A rail gun has a fixed magnetic field which a current carrying conductor moves through. A coil gun produces a temporary magnetic field to attract a projectile. ( Mine should have very low energy.. like 1 Joule. )
Switching magnetic fields on an off rapidly is not quite as easy as switching off a resistive load like an LED. The problem is that the coil is an inductor and it takes time for the current to build up. When voltage is first applied to an inductor it looks like an open circuit, so you have to ensure that you can get the required current flow in th 5mS you have it on. This often involves driving the coil with a higher voltage for the short time, much higher than you would need if it were being driven by DC.
Use mosfets to discharge capacitors through the coils, that way you can provide the initial voltage boost that Mike refers to. To work out what voltage and capacitance you need, you'll need to measure the inductance of the coils. You could adapt Arduino Playground - CapacitanceMeasurement to measure inductance, by using an L-R network instead of an R-C network.
The book "15 Dangerously Mad Projects for the Evil Genius" by Simon Monk feature a coil gun has one of the projects. It use a bank of capacitors ( in parallel ) and quick discharge throught a SCR to create a magnetic field. That was is idea.
I can see pros and cons of SCRs and MOSFETs in this application. MOSFETs can switch faster - indeed, the data sheets for many SCRs don't give any timing information. However, SCRs tend to have a higher peak current rating for a given price and package. Either way, you will probably need some gate driver circuitry. The logic level mosfets I have looked at are limited to about 40A peak if you only switch them with 5v, so you'll need to amplify the Arduino output to 10v if you want a higher peak current. The SCRs tend to need more than 20mA gate current to switch them, and to make them switch fast enough you should drive them hard - so you'll need an amplifier to source enough current.
Thanks for the help guys..
I've put a lot of though into designing my coil gun. If I do use capacitors, the capacitors required in order to get the proper timing and energy levels, are rather expensive. Low capacitance caps are cheap, but require high voltage to store enough energy. Moreover, using capacitors requires very long coils.. and copper is expensive as well. (I would need something on the order of 100m of 20AWG wire).
Since it's simpler and cheaper, I decided to do a kind of pilot project with a batter powered coil gun and then move onto caps if it proved effective.
Grumpy_Mike:
Switching magnetic fields on an off rapidly is not quite as easy as switching off a resistive load like an LED. The problem is that the coil is an inductor and it takes time for the current to build up. When voltage is first applied to an inductor it looks like an open circuit, so you have to ensure that you can get the required current flow in th 5mS you have it on. This often involves driving the coil with a higher voltage for the short time, much higher than you would need if it were being driven by DC.
I used LTspice to calculate the timing.. 5ms is the time taken for the current to build up to maximum plus a few more milliseconds.
dc42:
Use mosfets to discharge capacitors through the coils, that way you can provide the initial voltage boost that Mike refers to. To work out what voltage and capacitance you need, you'll need to measure the inductance of the coils. You could adapt Arduino Playground - HomePage to measure inductance, by using an L-R network instead of an R-C network.
Why do you need long coils if you use capacitors? It appears to me that it should be the other way round:
no capacitors -> long switching times -> projectile spends a long time between coils and in each coil -> long coils
capacitors -> faster switching -> short coils (for the same projectile acceleration)
Also, I don't see why the capacitors need be expensive, unless you are going for a lot of very short coils and therefore need a high peak energy in each coil.
terryking228:
Do some coil guns have more than one coil, with sequenced pulses??
Yes, that's how they generally operate. In the designs I have seen, the coils are short at the breech end and long near the exit end of the barrel, to allow for the acceleration of the projectile.
Given the parameters that mahela007 has mentioned, I think I would use two to four 2200uF 25v capacitors and one logic-level mosfet per coil. These capacitors can be purchased for about GBP 0.25 each here (e.g. RS Essentials range). Two of these charged to 20 to 25v will provide 10A for around 5ms as required.
Using capacitors has a couple of other advantages:
you can drive the gun from a relatively low-current source such as 9v batteries, because the capacitors provide the high current required
you can leave the mosfet turned on when you have fired a particular coil, allowing the capacitor to discharge fully and avoiding the need for diode/resistor networks to catch the back emf of the coils
dc42:
Why do you need long coils if you use capacitors? It appears to me that it should be the other way round:
no capacitors -> long switching times -> projectile spends a long time between coils and in each coil -> long coils
capacitors -> faster switching -> short coils (for the same projectile acceleration)
Also, I don't see why the capacitors need be expensive, unless you are going for a lot of very short coils and therefore need a high peak energy in each coil.
It has to do with reactance inductance of the coils. I did some simple simulations with LTSpice. As capacitance increases, pulse time (duration of time for the current pulse) increases. To get the pulse time back down to the required levels, the coils must be short. So far so good.. but high capacitances are expensive (stuff like 22000uF caps).
So what about using low capacitances? Well, as capacitance decreases, the pulse time decreases. To bring it back up to required levels, the length of the coil must increase (100m). Further more, to store enough energy, low capacitance designs must have high voltage.. which is risky (although that's not my main consideration )
That's my analysis of the problem.. please feel free to criticize and comment on it because it is possible that I've made a mistake somewhere..
dc42:
Given the parameters that mahela007 has mentioned, I think I would use two to four 2200uF 25v capacitors and one logic-level mosfet per coil. These capacitors can be purchased for about GBP 0.25 each here (e.g. RS Essentials range). Two of these charged to 20 to 25v will provide 10A for around 5ms as required.
Some very useful information there.. thanks a lot! However, the maximum energy that can be stored in each of those capacitors (2200uF and 20V) is 0.44J. Let's say I use about 10. (is 10 a reasonable number? I have no prior experience with coil guns). Even with 10 caps, I get 0.44 x 10 = 4.4J.
Since coil guns have low efficiency, (according to http://www.coilgun.info), I would still be able to fire a 10g projectile at about 6ms-1 :(.. I was aiming for something closer to 10ms-1
mahela007:
It has to do with reactance inductance of the coils. I did some simple simulations with LTSpice. As capacitance increases, pulse time (duration of time for the current pulse) increases.
That's true if you fix the coil design, i.e. change the capacitance keeping constant coil inductance and resistance. If you are prepared to change the coil winding, you can get back to whatever pulse time you want. For example, if you quadruple the capacitance but at the same time change the coil to use half the number of turns of wire of twice the cross-sectional area, you will have one quarter the inductance and one quarter the resistance, giving you four times the current and therefore the same pulse width (but four times the energy in the pulse).
What I suggest you do is:
decide on the pulse width you need (this is determined by the geometry of the gun and the speed of the projectile at that point)
decide on how much energy you want in each coil pulse
choose a voltage and capacitance to store this energy, bearing in mind what capacitors are available at reasonable cost, and that you want to keep the voltage and current in the range that you can easily switch with MOSFETs (e.g. not more than 30A or 100v)
choose the gauge of the coil wire to give you an inductance and resistance that gives you the required current and pulse width.
As I understand it, the acceleration occurs in the gap between one coil and the next. So, assuming that the gaps between coils are not too large, you want the current in each coil to peak when the projectile is about half way between the previous coil and this one, and to drop to near zero when the projectile is in the middle of the coil. However, I'm no expert in this area.
dc42:
That's true if you fix the coil design, i.e. change the capacitance keeping constant coil inductance and resistance. If you are prepared to change the coil winding, you can get back to whatever pulse time you want. For example, if you quadruple the capacitance but at the same time change the coil to use half the number of turns of wire of twice the cross-sectional area, you will have one quarter the inductance and one quarter the resistance, giving you four times the current and therefore the same pulse width (but four times the energy in the pulse).
Yes.. that's what I said.
dc42:
What I suggest you do is:
choose a voltage and capacitance to store this energy, bearing in mind what capacitors are available at reasonable cost, and that you want to keep the voltage and current in the range that you can easily switch with MOSFETs (e.g. not more than 30A or 100v)
As I understand it, the acceleration occurs in the gap between one coil and the next. So, assuming that the gaps between coils are not too large, you want the current in each coil to peak when the projectile is about half way between the previous coil and this one, and to drop to near zero when the projectile is in the middle of the coil. However, I'm no expert in this area.
Thanks for the help .. At first, I'm going to stick to a single coil design and see how well it works. As for the acceleration, you're very close to correct.. the projectile continues to accelerate right until it reaches the middle of a coil. At this point, the current should be switched off.