Arduino drive Paint Ball gun Solenoid

hi, i have been working on a project to run my e-trigger from an arduino. the problem im having is driving the solenoid. the original trigger used a 9v battery and a mosfet+capacitor. its a 6800uf 16v capacitor. the problem is im having trouble making a circuit thats capable of firing the solenoid. also the original trigger is full auto. can someone please help me thankyou!

i need help building a circuit with the cap and mosfet thats can deliver enough current to fire the solenoid semi/ and full auto. im having trouble making a circuit that can get enough current from the 9v battery to the solenoid. the original trigger system worked fine off the 9 volt until i fried it by accident. i cant get the solenoid to "move" but it dont have enough power to trip the sear pin.

Hi,

Can you please post a copy of the existing cap/mosfet/battery circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

This way we can give you accurate circuit guidance.

Thanks.. Tom... :slight_smile:

i cant figure out how to uplaod pictures on the site. i can say the positive side of the solenoid was tied to the caps positive side. its a 6800uf 16v caps. and a P3056LDC mosfet. i have burned out the mostfet. before i burned up the board, i could send 5 volts to the first pin on the mosfet and the gun would fire. seemed like the FET worked the ground. it would stay high on the FETS output pin untill trigger was pulled then it would be 0.00v

some pics

Hi,
Use the Arduino to control a relay that has its normally open and common terminals connected to the two switch pins.

Can you tell us your electronics, programming, Arduino, hardware experience?

Tom... :slight_smile:

i dont know a whole lot about circuitry. basically i had fried my solenoid driver that consisted of those parts, now i need help building one. i have the code working, before i fried the driver, i could hookup my arduino to pin one “far left” pin on the mosfet and send it 5 volts and it worked perfect, now i need to build one from the ground up. please help me lol thankyou

what would be the best way to rebuild this part of the circuit. as in what kind of mosfet/transistor? and aslo im afraid the cap runs out fo juice when i go full auto. is there a solution to this by using a higher uf cap?

what can i do to keep the solenoid running in full auto. right now i have a n channel mosfet connected t the arduino and it will run the solenoid. however when i go to full auto, which isnt that fast, after like the 3rd cycle on the solenoid it runs out of power? idk what to do

Hi,
Check the voltage on your battery as you run on auto, see what voltage it gets to when it stops.
The caps are supplying the instantaneous current to pull the solenoid, but the battery has to keep charging them up.

Tom... :slight_smile:

hi. i have gotten the voltage on my 9volts down to 2.0 volts. how come i dont have this problem with their circuit?

also i i hit the semi auto button after about 10 shots the solenoids voltage drops so low that it dont responed even a little bit. if i let it sit 5 seconds i can get 10 more shots. u can hear it slowly loosing current if you listen closely. do you think the solenoid is hanging open too long and using too much current? sure dont seem like it. but then what makes their circuit soo much different,?>

for the most part. i hooked the caps positive and neg to the battery with good cable. then i soldered one solenoid pin directly to the caps positive then the other solenoid wire to the mosfets drain. then mosfet source to ground and gate to arduino. i used a pull down resistor on the gate.

is it possible for me to get you to lookup the p3055ldc and recommend a mosfet similar so i can buy a couple. im not sure what im looking for. the p3055ldc is a n channel logic level enhancement mode field effect transistor. i have no idea how to spec something like this. and the solenoid has no writing on it at all. but i know on my poser supply the solenoid measured between 1-4 amps..i think the mosfet i was using was just a regular mosfet.. which may explain the behavior.

here is a quick glance of the code im using. its really messy and not done. but its enough to trigger the solenoid. do you think the solenoid may be staying on too long according to the code? thanks again

const int button = 6;
const int led = 0;
int bounceTime = 50;
int holdTime = 250;
int doubleTime = 500;

int lastReading = LOW;
int hold = 0;
int single = 0;
int LEDstate = 0;

long onTime = 0;
long lastSwitchTime = 0;
const int solenoidpin = 5;
const int triggerswitchpin = 7;
boolean running = false;
const int  buttonPin = 2;
const int ledPin = 13;
const int RED_PIN = 9;
const int GREEN_PIN = 10;
const int BLUE_PIN = 11;
int buttonPushCounter = 0;
int buttonState = 0;
int lastButtonState = 0;

void setup() {
   pinMode(button, INPUT);
 pinMode(led, OUTPUT);
 digitalWrite(led, LOW);
  pinMode (12, OUTPUT); //LASER
  pinMode(RED_PIN, OUTPUT);
  pinMode(GREEN_PIN, OUTPUT);
  pinMode(BLUE_PIN, OUTPUT);
  pinMode(buttonPin, INPUT);
  pinMode(ledPin, OUTPUT);
  pinMode (solenoidpin, OUTPUT);
  pinMode(triggerswitchpin, INPUT);
  digitalWrite(triggerswitchpin, HIGH);
  Serial.begin(9600);
  digitalWrite(RED_PIN, HIGH);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(BLUE_PIN, LOW);
  delay(100);
  digitalWrite(RED_PIN, LOW);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(BLUE_PIN, LOW);
  delay(100);
  digitalWrite(RED_PIN, LOW);
  digitalWrite(GREEN_PIN, HIGH);
  digitalWrite(BLUE_PIN, LOW);
  delay(100);
  digitalWrite(RED_PIN, LOW);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(BLUE_PIN, LOW);
  delay(100);
  digitalWrite(RED_PIN, HIGH);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(BLUE_PIN, HIGH);
  delay(100);
  digitalWrite(RED_PIN, LOW);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(BLUE_PIN, LOW);
}
void loop() {
   buttonState = digitalRead(buttonPin);
  if (buttonState != lastButtonState) {
    if (buttonState == HIGH) {
      buttonPushCounter++;
      Serial.println("on");
      Serial.print("number of button pushes:  ");
      Serial.println(buttonPushCounter);
    } else {
      Serial.println("off");
    }
    delay(50);
  }
  
  lastButtonState = buttonState;
  if (buttonPushCounter == 0) {
    if (digitalRead(triggerswitchpin) == HIGH)
    {
      digitalWrite(RED_PIN, HIGH);
      digitalWrite(GREEN_PIN, LOW);
      digitalWrite(BLUE_PIN, LOW);
      delay(20);
      digitalWrite(RED_PIN, LOW);
      digitalWrite(GREEN_PIN, LOW);
      digitalWrite(BLUE_PIN, LOW);
      digitalWrite(solenoidpin, HIGH);
      delay(9);
      digitalWrite(solenoidpin, LOW);
      while (digitalRead(triggerswitchpin) == HIGH) {
        digitalWrite(solenoidpin, LOW);
      }
    }
    else if (digitalRead(triggerswitchpin) == LOW)
      digitalWrite(solenoidpin, LOW);
  }
  if (buttonPushCounter == 1)  {
    if (digitalRead(triggerswitchpin) == HIGH)
    {
      digitalWrite(solenoidpin, HIGH);
      digitalWrite(RED_PIN, LOW);
      digitalWrite(GREEN_PIN, HIGH);
      digitalWrite(BLUE_PIN, LOW);
      delay (20);
      digitalWrite(solenoidpin, LOW);
      digitalWrite(RED_PIN, LOW);
      digitalWrite(GREEN_PIN, LOW);
      digitalWrite(BLUE_PIN, LOW);
      delay(80);
      digitalWrite(solenoidpin, HIGH);
      digitalWrite(RED_PIN, LOW);
      digitalWrite(GREEN_PIN, HIGH);
      digitalWrite(BLUE_PIN, LOW);
      delay (20);
      digitalWrite(solenoidpin, LOW);
      digitalWrite(RED_PIN, LOW);
      digitalWrite(GREEN_PIN, LOW);
      digitalWrite(BLUE_PIN, LOW);
      delay(80);
      digitalWrite(solenoidpin, HIGH);
      digitalWrite(RED_PIN, LOW);
      digitalWrite(GREEN_PIN, HIGH);
      digitalWrite(BLUE_PIN, LOW);
      delay (20);
      digitalWrite(solenoidpin, LOW);
      digitalWrite(RED_PIN, LOW);
      digitalWrite(GREEN_PIN, LOW);
      digitalWrite(BLUE_PIN, LOW);
      delay(80);
      while (digitalRead(triggerswitchpin) == HIGH) {
        digitalWrite(solenoidpin, LOW);
      }
    }
    else if (digitalRead(triggerswitchpin) == LOW)
      digitalWrite(solenoidpin, LOW);
  }
  if (buttonPushCounter == 2) {
    if (digitalRead(triggerswitchpin) == HIGH)
    {
      digitalWrite(RED_PIN, HIGH);
      digitalWrite(GREEN_PIN, LOW);
      digitalWrite(BLUE_PIN, HIGH);
      delay(20);
      digitalWrite(RED_PIN, LOW);
      digitalWrite(GREEN_PIN, LOW);
      digitalWrite(BLUE_PIN, LOW);
      digitalWrite(solenoidpin, HIGH);
      delay (20);
      digitalWrite(solenoidpin, LOW);
      delay(20);
    }
    else if (digitalRead(triggerswitchpin) == LOW)
      digitalWrite(solenoidpin, LOW);
  }
  if (buttonPushCounter == 3) {
    digitalWrite(solenoidpin, LOW);
    buttonPushCounter = 0;
  }
  int reading = digitalRead(button);
 if (reading == HIGH && lastReading == LOW) {  //FIRST PRESS
   onTime = millis();
 }

//released
 if (reading == LOW && lastReading == HIGH) {
   if (((millis() - onTime) > bounceTime) && hold != 1) {
     onRelease();
   }
   if (hold == 1) {
     Serial.println("held");
     digitalWrite(led, LEDstate);
     hold = 0;
   }   
 }
 lastReading = reading;

 if (single == 1 && (millis() - lastSwitchTime) > doubleTime) {
   Serial.println("single press");
   digitalWrite (12, LOW);
   single = 0;
 }
}
void onRelease() {

 if ((millis() - lastSwitchTime) >= doubleTime) {
   single = 1;
   lastSwitchTime = millis();
   return;
 }  

 if ((millis() - lastSwitchTime) < doubleTime) {
   toggleLED();
   digitalWrite (12, HIGH);
   Serial.println("double press");
   single = 0;
   lastSwitchTime = millis();
 }  

}

void toggleLED() {
 if (LEDstate == 0) {
   LEDstate = 1;
 } else {
   LEDstate = 0;
 }
 digitalWrite(led, LEDstate);  
} 
 
void invertLED() {
 if (LEDstate == 0) {
 digitalWrite(led, 1);
 } else {
 digitalWrite(led, 0);

  }
}

Tom george is correct.
The battery has insufficient current to pull in the solonoid by itself.The capacitor only has enough charge to operate it briefly. There may also be a resistor between the battery and the capacitor with the fet on the capacitor side.
Really you need to derive a proper circuit diagram to be sure.
The fet you use has to be able to handle the discharge current of the cap.

i too believe tom. but tha dont explain why it works fine if i just tap into their circuit at the mosfet. or just use their board which i cant do anymore. play ask if you need some more picture of anything. im not good at drawing circuits. however, you can sort of see how they had it going. with their board i could get 200 shots easy all one after another just by holding the trigger. all from a 9volt?!?!?!?!?!?!!@$#5^

  • i could draw the circuit i used, but its just the most plain mosfet circuit. this is the circuit i went by just to get started but it dont work well right now. but theirs did? i attached a picture of the mosfet circuit i used. except i didnt use that diode. their board did have a combination of zeener diodes?

notsolowki:
but then what makes their circuit soo much different,?>

Probably a resistor between the supply and capacitor otherwise each time you fire the mosfet you short out the battery.
The diode is essential to avoid destroying the fet.

Boardburner2:
Tom george is correct.
The battery has insufficient current to pull in the solonoid by itself.The capacitor only has enough charge to operate it briefly. There may also be a resistor between the battery and the capacitor with the fet on the capacitor side.
Really you need to derive a proper circuit diagram to be sure.
The fet you use has to be able to handle the discharge current of the cap.

please exscuse my knowledge but one of the wires to the solenoid "the positive" was soldered directly to the cap. so your saying the current cant leave the mosfet? that explains why it would heat up quick.

right now i am using the the 6800uf 16v cap that came with the gun, do you think i could benefit from a higher uf cap, and also how can i find out what kind of fet i need. i like the one that cam with it. im not sure how special it is but its a logic level enhanced mosfet. id like to buy some parts so i can continue. can you guys recommend anything? i dont want to even try anymore until i know i have a mosfet that can handle the current. thanks again