Arnov Sharma
Published © CC BY

My Basic Coil Gun Setup

Here's my minimal setup of a coilgun which uses a relay module to trigger the coil.

BeginnerFull instructions provided9,305
My Basic Coil Gun Setup

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Relay Module (Generic)
×1
Capacitor 1000 µF
Capacitor 1000 µF
each capacitor that I'm using has 4700uf capacitance
×1
UTSOURCE Electronic Parts
UTSOURCE Electronic Parts
everything above can be found here for a low price
×1

Story

Read more

Schematics

Schematics

Code

Code

C/C++
const int switchPin = 4;
const int Coil = 2;
const int Battery = 3;

int CoilState;

void setup() {
  pinMode(Coil,OUTPUT);
  pinMode(Battery,OUTPUT);
  pinMode(switchPin,INPUT);
  digitalWrite(Battery, HIGH);
}
void loop(){
CoilState = digitalRead(switchPin);

if (CoilState == HIGH) {
    // turn LED on:
    digitalWrite(Coil, HIGH);
    digitalWrite(Battery, LOW);
  } else {
    // turn LED off:
    digitalWrite(Coil, LOW);
    delay(2000);
    digitalWrite(Battery, HIGH);
          
  }
}

Credits

Arnov Sharma

Arnov Sharma

310 projects • 308 followers
Just your average MAKER

Comments