The CoilGun
One of my favorite projects that I ever made.
Many years ago, when I was still in middle school, I started watching ElectroBoom and one of his video sparked my curiosity. The possibility to create a "gun" that runs purely on electricity trilled me. So I started designing one on my own, with zero experience in electronics and programming.
Here you can find the differents designs me and my friends have created in the last years:
Working principle
Definition
The coilgun is an electromagnetic gun based on magnetic propulsion. Using solenoids we can accelerate a metal projectile to high speed.
Coilgun Stages
Usually a coilgun is made of one or more stages, each one made up of:
- solenoid a.k.a. coil
- capacitor bank
- charger cirucit for the latter
- firing circuit
- and a bullet sensor
The Solenoid
The most important part of a coilgun its the coil itself. A solenoid is just a piece of wire, usually enamel copper wire, wound to resamble a cilinder.
By passing an electric current into the solenoid we generate a magnetic field that can attrack ferromagnetic objects insiede of it. If we cut off the current passing through the solenoid at the right time, the object inside of it will escape the coil with a certain velocity, proportional to the magnetic force applied to it.
The attraction can be calculated using this formula:
where B is the magnetic flux generated from the solenoid, μ0 is the magnetic costant of the material, N is the number of spires, I the current intensity and l the lenght of the solenoid.
When we talk about solenoids it's really important to consider how we wind it:
- use an appropriate wire gauge when building a solenoid, higher gauge means higher current that directly translates into higher magnetic flux
- always wind in the same direction
- use super glue to secure the wire so it doesn't unspool itself
- after finishing a layer in one direction, go backwards maintaing the winding direction
If we make mistakes during the winding, the solenoid will not work as intended. Usual problems could be coils shooting backwards or not shooting at all.
Power the solenoid
To power the solenoids we have 2 options:
- use high capacity LiPo batteries
- use high voltage capacitors
The difference between the two is that while batteries are able to discharge more times in a certain time frame and are easier to use, capacitors are way more powerful and can store much more energy.
The capacitors store a defined amount of energy, and Using a simple formula we can calculate the stored energy E:
where C is the capacitance of the capacitor and V is the voltage across the latter.
Switching Operations
To switch the capacitors on the coils you should use an electronic switch such as Mosfets or SCRs. Avoid using relays, they're too slow and in higher currents the contacts inside of the relay can get stuck. Also it's really important to use some kind of isolation to separate the high voltage side from the low voltage side, like octocouplers such as the PC817.
Bullet sensor
It's really important to have some kind of sensor to detect the bullet entering/exiting a stage for a few reasons:
- turn off the exiting stage and turn on the entering stage
- check if the bullet actually fired
The best sensor in my opinion is an infrared one, evenif I've seen mechanical sensors, like metal tabs at the end of the stage, been used in other designs.
© Christian Marotta.