Post navigation

How to Make a Coil Gun

Somewhere in the video I mentioned it was a “Rail Gun”, but it is actually a coil gun. They both work with magnetic force, but differently.

Here I describe the detail design of the coil gun, so you may turn away if you hate details:

Basically as we all know, when we turn on or energize a coil, it starts attracting ferromagnetic material, in my case a steal bullet I made.

The issue is that if we keep the coil on, it keeps attracting the bullet. So what happens is that the bullet accelerates towards the coil and as soon as the magnetic center of the bullet reaches the magnetic center of the coil, the force of the coil over the bullet becomes zero. But as the bullet has momentum, it passes the center, at which point the coil starts pulling it back and decelerating the bullet, or accelerate it back towards the center.

You see in the video that this results in the bullet oscillating as if it was attached to a spring, and eventually stops at the center.

So the best way to make sure the bullet reaches maximum speed is to turn the coil off as soon as it reaches the magnetic center of the coil. If the coil and bullet are both symmetrical, their magnetic center will be the same as their physical center.

There are two ways to do it: one is to perfectly time the turn-off moment of the coil, or another easy way is to use a sensor and detect when the bullet reaches a sweet spot to turn the coil off.

In some designs they just use capacitors and discharge them in a coil and the capacitor runs out of charge quick. This way the coil won’t have time to pull the bullet back, which is sort of like timing the coil.

The problem with all the timing designs in my opinion is that it is not possible to easily predict the required time to keep the coil on, as it depends on the bullet mass, coil field, original distance of the bullet from the coil and etc… and therefore the coil either turns off too early or too late, both resulting in a slower bullet.

So I believe to make the on time of the coil independent to all these factors, the best way is to have a sensor and detect the location of the bullet and turn it off on time.

In my design, to turn the coil off I placed an infrared (also known as optical) sensor to detect the tip of the bullet right where their centers meet, and this would turn the coil off using a simple circuit.There are other options for the sensor such as Hall Effect sensors, which can be much faster. You need a fast response time as any delay in response will cause the bullet to pass the center and result in some deceleration. Especially when you have many coils rather than one, the speed of the bullet in the final stages is super fast.

The following circuit is what I designed and made.

Circuit Schematic of the Coil Gun

In the circuit above I have added D1, which I forgot to show within the video. Not having this diode caused me grief and explosions which I didn’t capture on video!

This circuit is just a quick way of doing it for demonstration that came to my mind. It is by no means the best way to do it. Especially since the infrared sensor I have has limited response time (3kHz).

I purchased the parts from Digikey and here’s their part numbers for your reference (you may choose your own):

Q1 transistor is basically the switch that turns the L1 inductor on and off. When Q1 turns off, L1 will try to release the energy stored in it by continuing the current in the same direction. Without D1 this would cause the voltage at the drain of Q1 to jump to a huge number breaking Q1 and shorting it. This will short the supply through Q1 and will result in exploding Q1 and damaging the coil. Having D1, when Q1 turns of D1 turns on closing the loop of the current and protecting Q1. Another side effect is reversing the magnetic polarity of L1 that could help accelerating the bullet.

When the switch SW closes, it sends a high level voltage through the 1uF capacitor to the gate of Q1 turning it on. The 1M ohm resistor will help discharging the 1uF capacitor.

OP1 must be biased such that when the sensor is not blocked, the transistor output is at a low voltage below 0.4V to make sure Q2 is off, and when the bullet comes into the sensor blocking the infrared light, the optocoupler transistor output jumps above 0.7V turning the Q2 transistor on.

So Basically when the switch SW is pressed, the gate voltage of Q1 jumps, turning it on. This will attract the bullet into the coil and as soon as the bullet reaches the sensor, Q2 turns on pulling the gate of Q1 low and turning it off.

And it works as good as you saw in the video. There are some issues with this design though. If there is no bullet inside and the trigger is pressed, the gate voltage of Q1 drops as the capacitor at the gate is discharges by the 1M Ohm resistor. At some point this results in increment of the Q1 drain-source resistance, meaning a high power drop across Q1 that will blow it up. So there should always be a bullet. We can’t remove the 1M Ohm resistor because without it the gate voltage may never return to 0 volt.

Like I said, this circuit is only for demonstration and a better and faster circuit could work much more reliably. But the functional concept remains the same.

Now more coils can be put together in series, everyone with its own fast sensor. The bullet can be smaller and more light weight to help accelerating faster. Also there can be different ways to turn the series coils on and off. For example:

- They can turn on and off one at a time, as soon as the first coil turns off, the second one turns on and so forth.

- They can turn on two at a time. For example if we have 4 coils from L1 to L4, L1 and L2 can turn on together. As soon as the bullet reaches between L1 and L2, L1 turns off and L3 turns on, This way there can be better acceleration, but more power usage.

- All coils can turn on together, but turn off one at a time as the bullet passes them.

And the rule of thumb is: the more number of winding and more power over coil (voltage and current) the greater acceleration of the bullet. Also of course turning the coil off at the perfect spot is very important too.

I hope you like what you read. If not, please drop a comment and I will write some update when I can. Thanks and stay safe!

133 thoughts on “How to Make a Coil Gun”

Hey Mehdi…
The Q1 : IRF7739L2TR1PBF from International Rectifier
i can’t seem to find it at my local store. And buying online cost 9 times of this thing, ~$45!!!!
Do you know other components that works like this or maybe can replace this component???

You don’t necessarily need to use that part. any part with RDSon<5mOhm with a high power rating should work fine. In fact use some through-hole part with a package like TO-220 that you can screw on a heat sink. Your circuit will last much longer than mine! Here are a few examples:

It depends on your coil like how much magnetic force it can provide, also how heavy your bullet is. Of course the more power shoots the bullet further.Don’t start with too much power or your circuit may blow up.

Hi, I wanted to make the gun with 2 set of coil. Does my schematic is right?? I’m not very good at electronic stuff… And i also got some question….

What’s the V1 and V2 represent? Was V1 is positive and V2 is negatif poles???
What’s the thing that have layers of decreasing length of lines at the end of the transistor and the ’1M’ thing?
What’s the ’1M’?
And can you explain about making the sensor bias???

Hi there,
I don’t think it is that easy to cascade these. But assuming it is, then you have to repeat the two 1M and the 1uF for the second coil too.

V1 and V2 are two separate power supplies at different levels.

I’m not sure about which lines you are talking about, but L1 is the big coil, 1uF (Farrad) is capacitor and 1M is 1 Mega Ohm resistor. And for biasing look at Andrew’s comment below.
It might be tough to put it together as my directions are not super clear, as I assumed interested people would know electronics. So…Good luck!

Just because someone is interested in something doesn’t mean they know anything about the general workings of it. I have made many railguns and coilguns, and I still have no idea what most things do or how they work. So please next time give more explanation on the circuit drawings, but it would be better if you could explain your drawing here as soon as you can. Give a key for each part or something.

I watched other videos about coil gun. One of them, they use the sensor but not to switch of the coil. If the sensor detect the bullet,it will switch on the coil and close it. Do you have any ideas how to do it like that?

Hello!
First off, thank you very much for both the video and the article! I have tried doing this myself, but I stumbled upon a problem. The part of the circuit that just powers the coil works, I use a 12V car battery that can output even 80 to 90A. However, as soon as I connect the other part of the circuit, the one with the IR sensor, it doesn’t work. Here are a few pictures.
Any help would be greatly appretiated, if I make this prototype, I can assure you I will make a hell of a machine out of it!

As you can see on PIC3, the two thin green wires connect Q1 and Q2. This way it doesn’t work. However, If I just connect the green wires together, not touching Q2, it works, but then there is no connection between Q1 and Q2, and there’s basically 2 seperate circuits. And by it doesn’t work, I mean the iron bullet doesn’t EVEN MOVE. However if i connect the two green wires, then it does, but I don’t have the optical switch, so it’s useless. If anyone can, please help, I have tried allot of things.
Here’s what I mean: http://shrani.si/f/43/1t/2trRuI17/destructior-emg.jpg

Hello!
I can hardly figure out your connections seeing your pictures. So I’m afraid I can’t help, unless maybe if you provide some schematic. But if you connect them as I did, then the circuit should work, and then blow up!! The thing is that a car battery is too strong and can provide like 500A. If your coil resistance is very small and runs hundreds of amps, then Q1 can easily blow up. That’s what’s happened in my video where the circuit died. If the bullet doesn’t get to the sensor soon enough, then Q1 remains on for a longer time with high current and will make it blow. So either use a coil with small diameter and many turns to increase its resistance, closer to 1 ohm is better, or use a current limited supply.
Good luck!

However, if I disconnect the GATE from Q1 from the COLLECTOR of Q2 (picture below), the bullet gets pulled in, so it DOES work, but there’s not optical switch.
Like this:http://shrani.si/f/42/1/3NWrihRR/doesnt-work.jpg
But then obviously, the optical switch isn’t even connected, so it’s useless. Seperately, both parts of the circuit work. The OP1 actually changes voltages when something is blocking it’s sensor. They just don’t work TOGETHER!
But maybe my resistors on the OP1 are not the right kind. May I ask how many ohms the resistors from V2 to the OP1 have? Maybe you said somwhere, but I didn’t see it.

So, like I posted yesterday, this is when it works and when it doens’t:http://shrani.si/f/43/1t/2trRuI17/destructior-emg.jpg
The green wire representing the GATE of Q1 only being connected to V2 (when it works), and the red wire representing GATE of Q1 connected to both V2 and the Q2 COLLECTOR, so basically, your schematic (when it doesn’t work). My thought are, either I have the wrong Resistors on OP1 OR my Q2 is dead. Thoughts?

P.S The battery is a 12V, with 80-90A. It’s not that strong, the Q1 handles it very well, the only time it exploded was after I kept trying it out for like 10 minutes and then I accidentaly let the current flow for like another 10 seconds constantly, but I replaced it, works great now

Nevermind!
I put a 333 ohm resistor on the OP1. Only then I saw you answered someone’s quesiton to put a 1k and 23k ohm resistor , so I did that- WORKS PERFECTLY! Like a charm!

I made a quick video, I know it’s quick and stupid, but just a showcase. But I didn’t stop here, no way
I will make a MACHINE, and will try to combine around atleast 8-12 coil
I thanked you in the video, you gave me the idea and the schematics so it felt right, hope you don’t mind

looks like a good transformer. You should be able to use it. There is something I don’t like about the circuit I designed which I just recently realized is that the gate voltage of the transistor will drop slowly by the 1M resistor. I did that on purpose so that if there is no bullet and the transistor remains on, then this would turn the transistor off after some time to protect it. But I believe it will end up hurting the MOSFET rather than protecting it. The reason is that the gate voltage drop is so slow that at some point the RDSon of the transistor rises for a significant amount of time, and that results in a lot of power dissipation on it for a long time that will kill it. I may revise my design above. What I like to do is to make the falling edge of gate voltage also very fast to minimize the transition time. For that I can use a comparator to drive the gate.

Hey Mehdi, I’m a big fan of your site and love what you do. I’m about to finish my degree in computer engineering and am only just starting to ‘see’ how all components behave in a given schematic, though i’m still a bit crap.

I have a simple question: when Q1 turns off, does current flow through the closed circuit between D1 and L1 indefinitely (I don’t think so) or does the current dissipate while energy is still stored magnetically at L1 subsequently making the current at D1 and L1 0 A when L1′s stored energy is depleted ?

An answer will be really appreciated. Going to Iran tomorrow, hope i don’t die.

Sorry I didn’t see your question earlier! Your second guess is correct. The current starts flowing into the diode D1, but that current times the voltage across the diode starts dissipating lots of power which will quickly waste the energy stored in the inductor to zero.

There is no permanent current flow like that in nature as there is always power loss which will deplete energy.

you are truly a excellent webmaster. The website loading speed
is amazing. It sort of feels that you are doing any distinctive trick.
Furthermore, The contents are masterpiece. you’ve performed a great task on this topic!

I’m impressed, I have to admit. Rarely do I come across a blog that’s equally educative and engaging, and let me tell you, you have hit the nail on the head.
The issue is something that not enough men and women are speaking intelligently about.

I am very happy I stumbled across this during my search for something concerning this.

I’ve been exploring for a little for any high quality articles or weblog posts on this kind of house .
Exploring in Yahoo I ultimately stumbled upon this website.
Reading this information So i am satisfied to show that I’ve a very excellent uncanny feeling
I found out just what I needed. I most indubitably will make certain to do not
overlook this site and provides it a look regularly.

Hello there, just became aware of your blog through Google, and found that it is truly informative.
I’m gonna watch out for brussels. I will be grateful if you continue this in future.
Numerous people will be benefited from your writing.

Howdy! I know this is somewhat off topic but I was wondering if you knew where I could locate a captcha plugin for my comment form?
I’m using the same blog platform as yours and I’m having problems finding one?
Thanks a lot!

Hi Mehdi, I’m a high school student competing in a science fair, and you inspired me to build a coil gun for my project. I’ve managed to get a one stage coil gun working off of a capacitor, but I think the way you do it (with a constant flow of electricity that is turned off by an infrared sensor) is a better alternative. Is there a chance that you could tell me the part numbers of the components you used to wire the infrared sensor? I would really appreciate it. Thanks

Your video is amazing!
I tried to use a car battery (12V) for a coil. It blew up. I think the coil resistance is too low (0.3 Ohm). I’m ordering two resistors, 10 Ohm (72W) and 20 Ohm (50W). Do they work? What else should I take care?

where
u is the magnetic moment of the projectile.
dB/dx is the rate at which the magnetic field is changing along the x axis.

and,

(dB/dx) = – (I*pi*6*10^-7) (x*R^2*N) / [(R^2 + x^2)^(5/2)]

where
x is the position of the projectile along the x axis
I is the current
R is the radius of the current loop (the coils)
N is the number of coil turns

Note that this formula is designed for a coil of a length (L) of 0, but if R>>L, then this won’t give us any problems. But if R<L, then we should take the origin (x=0) to be somewhere close of the end of the coil. because this is where dB/dx will not equal zero

It might be possible. I haven’t done that though. One needs to set it up like you say and measure the sensing waveforms and see if they make sense. But if that works, it could be better and faster than the IR sensor.

So if you want to reduce your current from 100A to 10A, you need to increase the number of your turns by 10 time. You can choose thinner gauge wire and possibly achieve the same coil size, but smaller current.

To clarify, I just don’t understand why the bullet will want to go back and forth. I assumed there is a magnetic field in one direction only, and the projectile will simply just exit the coil. But I’m clearly confused about something.

I made a coil gun. Used a full spool of magnetic wire, and put a small projectile in it. The projectile still flies out of one end, however, if I were to put a longer object in, it will probably oscillate like yours did (right?). Meaning, the small projectile I put in gets decelerated in the second half of the coil, but it’s initial acceleration is much stronger, which results in it leaving the coil.

To summarize, why does the projectile want to be pulled towards the center? Can this be explained by some sort of physics law?

It is a simple thing. A magnetic field only pulls on a plain iron projectile. Same as the gravity that only pulls. So if your coil remains on, it continuously pulls the iron projectile. There is a center to the magnetic attraction, similar to the mass gravity, which is where the sum of all the magnetic forces is zero. For a uniformly shaped coil the magnetic center is the same as the physical center of the coil. The projectile accelerates towards the center as the sum of forces on the projectile is always a vector towards the center as long as the projectile is not at the center. as soon as it reaches the center, there is no force on the projectile, but the projectile will continue due to its momentum and passes the center, where the force vector is again towards the center. So the projectile will slow down, stop and go back towards the center and this is the cause of oscillation, similar to having a weight on a spring and pulling on the weight and watching it oscillate. There is friction that wastes the projectile energy and the oscillation gets smaller until it stops at the center where the sum of forces is zero.

Now in your case, the projectile exits on the other side, because I believe your coil is not continuously on and turns off and lets go of the projectile. If it turns off right where the projectile is at the center, that is the maximum acceleration and otherwise if it turns off earlier, it speeds up less than it could, and if it turns off later, it gets pulled back and slows down.

Is theoretically possible a variation of coil gun, where the projectile has diamagnetic properties (material reppelled away from magnetic field) ? I guess in that case projectile must be put litlle bit inside a coil first and a number of windings at the begining of the projectiles trajectory must be the biggest. then with lesser mumber of windings through the coils length to achieve smaller magnetic field
Coil would become sort of cone shaped because of that. I assume there would be no need for sensors

So my cousin and I are attempting to build a coil gun. So far we have built a small coil of 40 feet 22awg wire across 2 inches. We are powering the coil with 6 21000 microFarad 16 volt capacitors in parallel. Our current setup is working just enough to pull an iron nail and fling it about 1 foot away. We thought this was a little to week so we went on youtube to check around and found your little gun and were shocked at how effective yet simple looking it was. We were hoping if you had any tips to help us make ours more efficient.

Your capacitors likely won’t be able to hold the voltage long enough. Assuming the current is 10A fixed through the coil, and starting at 16V, the voltage drops to 0V within 0.2 seconds.

But if your nail is small enough the amount of energy might be enough. Then there is another issue, maybe the nail moves too fast and passes the center of the coil before the capacitors are fully discharged. If the coil is still energized, it will suck the nail back in, or at least slow it down. That’s why I use a sensor to turn the coil off in time.

Thank you so much for responding! In the case of capacitors then what should we upgrade to? should we look for a higher capacitance or voltage or both? we are looking in to timing the coils duration with an arduino.

The key is the amount of energy you can feed into the coil. The energy in a capacitor is 0.5 x C x V^2. So raising the voltage and capacitance raises the energy in a capacitor. Of course is also means a greater burst of current. I have seen people use many “Flash” capacitors, the kind used in cameras for flash. They can be charged some where around 300V. Get many disposable cameras with build in flash, take all their capacitors and parallel them up, and use one of their flash circuits to charge the entire pack. It may take much longer for the circuit to charge the whole thing up to 300V. When done, discharge it over the coil for a great impact! Just don’t touch the capacitors, they will shock you badly, that is if you survive!

Could then this be stated as some kind of parallel LC circuit with its own resonant frequency? And to go further, can I make elektromagnetical- mechanical (Cycloid )pendulum if I curve the tube of the coil? Of course then I should match elaktromagnetical resonant frequency with the mechanical resonant frequency of the “bullets” cyclodial path for greatest efficiency.

I’m using a big capacitor to supply the current and plan to charge it to several hundred volts. Can I use a boost converter to charge it? If so, should I include a series resistor on the charging side to limit the current through the inductor?

Yes, you can use a boost converter. Several hundred volts is a lot of volts. I assume the capacitor is not huge, is it? You don’t need a series resistor. If you adjust your booster PWM, it will provide a fixed current every period to charge the capacitor. But you must have high voltage components all over. Good luck!

just an observation:
I doubt the optical sensor is slow for this application. I think the magnetic field in the coil decays slowly after shutdown especially with the necessary D1, that current keeps flying around the coil as a coil does not like changes in current (just like your Capacitor doesn’t like changes in voltage). There is no way of shutting down that current as it will cause several KV on the Mosfet -you must have blown many as these are rated at 40V and you didn’t have D1 in your video!

One hack would be to wind another coil and place it on the output of the first coil but wound the other way so its NS is flipped from the first coil and wire this one between D1 and V1. Therefore the flyback current of L1 will flow through L2 and negate the decelerating power of L1!

I’m trying to make a coil gun, and before i start, i just want a little advice. For instance;
1)How do you make the IR sensor?
2)How many volts of electricity did you supply for the coil?
3)How did you make the bullet?
4)What is the length of the bullet and the coil?
5)If you put a barrel around the coils, does it have to be insulated?

1) you buy the IR sensor, not make it. Then you need to bias it properly. It is like a transistor, for a certain input current you get a certain output current. In normal condition the output is on, or like a switch it is closed. Then when something like a bullet goes in there, it opens.
2) I put 30V I believe, but that is not as important as the current I supplied, which was 70A or more.
3) I machined it in the machine shop at work.
4) the coil is around 4cm and the bullet is about 5cm in my case. It is not mandatory though.
5) you don’t need to isolate teh barrel, just make sure it doesn’t short anything!

Dear Mr Mehdi,
with your permission, i would like to make this my control and measurement lab project. if you can please mail me your address so we can talk about ways to modify this design. i hope to have your reply soon.

i am trying to build this coil for a gun and for door locks and i have wrapped 16 awg magnet wire around pvc with a 1/2 inch hole and bullet size i have used six 9-volt batteries in series trying to get any kind of magnetic pull on the bullet i have even tried supplying power to my 3 pound spool of wire and still no magnetic pull of any sort have been working on trying to get this work for a couple days and i am at wits end i dont know what im doing wrong please email me with some help i would greatly appreciate it thanks

First, 9V batteries cannot generate any decent current. Imagine I was using 70A, and the 9V battery can maybe generate 0.5A at best. If you instead use a car battery, you will get a huge pull, and maybe your coil burns too because those can generate even 500A. One thing you can do is to have a huge capacitor parallel to your 9V batteries so that the capacitor can handle the short spike of high current. Use camera flash capacitors. If you like to move a door lock, you don’t need great pull and acceleration. Then use many more turns of lower gauge wire and then you can generate good pull with much lower current.

You should vary the voltage across the coil. Basically it is the current that creates the magnetic field. The amount of current also depends on the voltage across the coil, the coil and switch resistance.

Hello, I just came across a startling video that had me quite speechless upon watching it. Now I admit it, I didn’t fully understand this video as I’m a physician and electricity is not my field of expertise, however I do know enough to realize this is not a hoax or bogus and has in fact validity… and I could not think of anyone better than you to send it to… surely you might enjoy watching this video… god speed

All I can say is that this person has little knowledge of electricity as most of his comments don’t make sense electrically. It is possible to capture ambient energy, but this circuit is not the way to do it. Also beside sun’s light source and wind (which is also created thanks to the Sun) all other ambient energies radiated in the environment are extremely low in energy. So, there is no secret in this circuit!

That’s a complicated problem. The optimum time you want to keep the inductor on would depend on the length, thickness and weight of the bullet as well as the current flowing into the coil, the resistance of the coil and many more things. A relay won’t be fast enough for multiple coils. Relays switch around 10 mS and that would decelerate the bullet.

You are correct. And there is an RC on the gate of the transistor, the 1uF capacitor and the 1M resistor. It does what you say, but it may turn it off too late. As I said, this circuit is not the best, but good enough for presentation.

Hello Mehdi, I love your videos and I hope you continue to make more. Informative and hilarious! As I understand it, you must have a bullet or else the coil will never turn off, which will cause damage to the rest of the circuit via over current. Would it be feasible (or wise) to attach an RC circuit to the base of Q2, causing it to turn off no matter what after a certain time? To be clear, could you have an RC circuit charge up when SW1 is pressed, but programmed in time that it would turn off the coil a little after the bullet should have passed? Just a thought, I am still very much learning.

You don’t need to change the resistor and capacitor on the gate of the FET. You just need to make sure you don’t raise V2 too much to break the gate of the FET, which is usually 20V max. You may need to tune the resistors of the Optocoupler to make sure the output still saturates.

I wanna ask you something. I really try to do this but 1uF block DC. then no current on 1M so, Gate voltage is nearly zero and source voltage also then NMOS is off. Isn’t it? Also coil resistance should be low then how can you deal with the over current

1uF blocks DC. But when you close the switch, the voltage on one side of the 1uF jumps, resulting on the voltage on the other side to jump too as the capacitor likes to keep the voltage across it the same. So this will rise the gate voltage of the MOSFET high. If the switch is held on the gate voltage will slowly drop as the 1uF discharges through the 1M Ohm.
The coil resistance is very small, but not exactly zero. For example my coil resistance is around 0.250 ohm. So there will be some current limiting anyways. If the FET can take large currents for short period of time, it will be fine like mine. Just make sure you have a bullet going to turn the circuit off and otherwise teh FET will blow. Like I said my circuit works, but is not the best way to do it.

I love the videos! Early in the written description you say ‘RF sensor’ and I think you meant ‘IR Sensor’.
I was also thinking you could switch polarity on the coil to then push the steel rod. Thanks for clearing that up!

Like I explained, discharging a capacitor will be similar to a timer. The coil may discharge sooner or later than when the bullet reaches the center. It would work, but won’t be the best. Also the capacitor current drops rapidly causing the energy of the coil during acceleration. But instead using a high power supply, you can make sure the power is maximum throughout the acceleration.

And I am here again.
Think I am thinking fundamentally wrong in that if run on AC it will ‘push’ on a half cycle as well as ‘pull’ in the first 1/2 cycle.
Whatever the polarity is I guess the bullet will be attracted to center.
Maybe a bar magnet then? And of course AC is not something very portable!

Will the gun work with considerably more turns and a lot less current?
70 amps is quite a power supply too. What do you use?

Maybe could use an ac supply where the voltage reversal does the switching?
It would mean the bullet needs to get to the center during a half cycle then be pushed out on the other half cycle. Not sure if I can work out the length of bullet and barrel for a 60 Hz supply. It seems the bullet is not critical here but the barrel very much so? It could maybe very much simplify the gun electronics although I can see a problem getting the bullet to start its motion in the right part of the sine wave!

The magnetic field is affected by higher current and higher number of turns. So if we can increase both, it would be great. But more current means a thicker wire so with the same number of turns, your coil size grows. I am using a wire , which is 16 AWG I believe. It can’t continuously take 70A, but it can easily handle a short burst of current. When you make a coil, it has a resistance. So for example if you have a 12V, it maybe able to only allow 50A even if your supply can allow 100A. So you will have to raise your supply voltage for more current.
I don’t thing you will get anything goo with AC. First the field will be alternating meaning an inconsistent power, and also if you are using a steal bullet, it doesn’t matter that the field gets reversed. It will swill attract the bullet back in.

Thanks you replies Mehdi.
I now what you mean trying to get a very large current through the wire’s resistance with a 12 v supply.

And appreciate now that if the coil is N or S it will still attract a steel bar. So reversing the current will not do any good after the bullet has got to the 1/2 way stage.
However if the bullet is a bar magnet and the coil polarity was reversed at the 1/2 way stage, could that not be used to advantage? It would be sensitive to the polarity of the coil.
Still needs a sensor that can detect the bullet though 1/2 way through the barrel. A pvc one could probably use a Hall effect sensor.
Dennis

It is possible to use a bar magnet and reverse the polarity. You would need to find sweet spots to reverse the polarity and also still time it well too. I haven’t done this before but I’m guessing it will not make things simpler. But you may achieve better acceleration.

Could it be that the circuit would work and give more velocity if there was just one coil but it was a lot longer.
Say a foot. Having thought about it though the bullet causes the sensor to switch off the current or ideally reverse the polarity. So the bullet would have to be a long one!
Unless the sensor could be a little over 1/2 way down the barrel and ‘see’ through it to the bullet. How about a Hall effect sensor?

The issue with a longer coil is that you still need to turn it off when the bullet reaches the center, which renders the second half of the coil useless. And also the very long coil will not necessarily put more force over the bullet, for example my bullet can’t be over a centimeter away from the edge of the coil or it won’t attract it at all. So in a very long coil, only maybe around 5cm (2″) of the coil has real effect on the bullet. It would be much more effective to have 6x 2″ coils and turn them on/off correctly, rather than a 1 foot coil.