5 stage coilgun

5 stage coilgun to fire 1/4" ball bearings

Public Chat
Similar projects worth following
this is my third attempt at this project, this time I think I have enough knowledge to push it forward. The first was a two-stage coilgun that used 2200uf capacitors charged to 100v and fire the projectile. the second was the same with some extra stages, however, I ran into issues with the circuit and shelved it.

This time around I've decided to utilize an atmega328 on a custom board dev board I designed to switching relays for each stage through some 2N5551 transistors. The entire circuit board is designed to be powered with a 75c 1300mah 4s lithium-ion battery which is just should be just enough.

I know I would have better results if I were to have some kind of sensors to tell where the projectile was, but this is going to be more of a "proof of design" than a completed project. As the project progresses I plan to add notes here about what I've learned.

just a 5 stage coil gun using relays and an atmega328. here are some videos of the final project


this is the code operating this project, "mk3" because I made some less impressive coilguns before.

ino - 957.00 bytes - 07/07/2018 at 04:48


  • Finished, Final Results

    Matthew James Bellafaire07/07/2018 at 04:47 0 comments

    and that's it, a short and sweet project. the end result of this is that I was able to get a 1/4" ball bearing to travel 14 inches horizontally with a 2 inch elevation of the barrel. not exactly the most stellar results, but i'm glad i did it, and as a proof of concept it works. 

    the timing was kind of a pain, here was my basic setup

    since I don't have any feedback, I just had to start with one coil at a time and move my way through, finding (roughly) what timing got me the furthest distance. I feel like the project could work better if I put even more time into getting the coils to fire perfectly, but i'm satisfied with the way it is now. 

    and here's the coilgun is working!!!

    onto the next project!

  • Extra Coil and Isolation - Circuitry completed

    Matthew James Bellafaire07/06/2018 at 23:20 0 comments

    the circuitry for this project is now complete. Since this project uses relays to power the coils i decided there wasn't a good reason to keep the micro-controller and transistors on the same circuit as the coil's themselves. This resolved an issue i was experiencing where the micro-controller would reset for seemingly no reason. It did however add another set of batteries to deal with, but i can live with that. now all that's left is to work out the timing to fire the 1/4" ball bearings that this coilgun was designed for. 

  • how this got started, and basic design

    Matthew James Bellafaire07/05/2018 at 19:29 0 comments

    so this is really a project that was born of boredom, i was sitting around one morning and i just wanted to do a project. so i took something I've tried many times. after a few hours of soldering i ended up with a buggy protoboard prototype that seemed to look right. I wrote the code for it in about 20 minutes and gave it a shot... and it worked! twice.... added some flyback diodes to every coil in the circuit and tried it again with better results. i drew up a schematic to illustrate how each stage is wired and how i have it connected to the micro-controller.

    the micro-controller diagram is a bit messy, it uses an Lm7805 linear regulator with a 330uF electrolytic cap and a 22pF ceramic cap on the output. other than that most of the circuit real-estate is composed of the relay circuit which is above, each pin connects to the 2n5551 in its respective circuit. 

    and that's basically all this mess of wires is 

    also, the micro controller and the 2n5551s draw from different 5v regulators, the 7805 powers the micro controller while the collector of each transistor is powered by the Vout of a AMS1117. i don't exactly remember why i did it, but it's more work to fix it than leave it. 

View all 3 project logs

Enjoy this project?



Byron wrote 07/12/2018 at 17:34 point

Magnetic force is proportional to the field GRADIENT, so you could about double the force by collapsing each coil's current after the ball passes.  Due to the coupling between adjacent coils, this discharge and charging the next coils current will be faster in this case.  Also, the field at the end will not rob you of your velocity by attracting the ball back toward the gun after it passes the last coil.  Second, the ball is accelerating, so you could relax your timing issues by spacing the coils quadratically along the barrel... x(t) = 1/2 a t^2.  Finally, a good conductor (i.e. copper) could be pushed ahead of the coils much stronger than a ferromagnetic ball can be pulled into the coils due to eddy currents in the steel.  If you utilize this advice, you will need MUCH more mass in the gun to absorb the recoil; this mass will need to support the coils very thoroughly and will need to be an insulator.  A ferromagnetic insulator would be better still.  CAUTION:  Eddy currents will heat the copper in this case.

  Are you sure? yes | no

Joe Perch wrote 07/12/2018 at 02:28 point

I understand. Thank you for the response.


  Are you sure? yes | no

Joe Perch wrote 07/11/2018 at 18:01 point

I am curious why you would put the transistor (2N5551) on the high side of the coil. Wouldn't it work better on the low side?

Also, are the relays really needed? Couldn't you drive the coils with transistors directly (might need a different transistor)?

  Are you sure? yes | no

Matthew James Bellafaire wrote 07/11/2018 at 23:55 point

The transistors would have worked better on the low side, i honestly sat down one morning and just started soldering and it worked so i kept it. 

as for why the relays, they were what i had on hand. i only had a few MOSFETs i could have used in their place, but i'd be using them all. also a couple TIP120 transistors which wouldn't have been able to stand up to the current i wanted to put through the coils.

all the choices i made basically boiled down to what parts i had on hand since i didn't feel like waiting on parts for this project. 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates