EPR Build Log

A place for general potato gun questions and discussions.
PVC Arsenal 17
Staff Sergeant 3
Staff Sergeant 3
Posts: 1762
Joined: Mon Mar 27, 2006 4:18 pm
Location: United States

Sat Feb 12, 2011 8:06 pm

Alright enough with the secrecy. Here is an early test of the automatic indexing system on my Electro-Pneumatic Revolver (EPR). The Arduino turns the 15 barrel assembly in consistent increments of 24 degrees, both in semi auto and full auto. Soon it'll be synched up with a solenoid valve and shooting actual ammo.

http://s237.photobucket.com/albums/ff15 ... t=run3.mp4
Last edited by PVC Arsenal 17 on Sat Feb 12, 2011 11:54 pm, edited 1 time in total.
btrettel
Specialist 3
Specialist 3
United States of America
Posts: 383
Joined: Sun Feb 03, 2008 4:40 pm
Contact:

Sat Feb 12, 2011 10:32 pm

Nice work.

This seems a little complicated for my tastes, but I can't argue with the results. I'm looking forward to the finished product.
All spud gun related projects are currently on hold.
User avatar
jackssmirkingrevenge
Five Star General
Five Star General
Posts: 26216
Joined: Thu Mar 15, 2007 11:28 pm
Has thanked: 576 times
Been thanked: 347 times

Donating Members

Sun Feb 13, 2011 12:15 am

btrettel wrote:This seems a little complicated for my tastes, but I can't argue with the results.
My thoughts exactly :)
hectmarr wrote:You have to make many weapons, because this field is long and short life
PVC Arsenal 17
Staff Sergeant 3
Staff Sergeant 3
Posts: 1762
Joined: Mon Mar 27, 2006 4:18 pm
Location: United States

Sun Feb 13, 2011 1:06 am

It's not "complicated" considering the objective and the means with which to achieve it. What you see so far involved little more than a dremel, saw, and a drill to make. That said, this approach is perhaps the best way to achieve rotary indexing. I've yet to see it done this effectively under those circumstances.

On top of that, no strictly mechanical system within reach of the average builder can compete with the versatility of a similar electronic system. This features select-fire, adjustable rate of fire, it can't be short-stroked, it doesn't consume anymore air than it needs to fire a dart, and it will support more than a full day's use on a single r/c truck battery.

And when compared with a dedicated circuit approach, the MCU offers a level of control that can't be beaten. The precise delays needed to fine tune the indexing and synchronize it with the solenoid wouldn't be practical without the coding to implement them.

The downside is the cost of course: about $40 worth of electronics. However, I would spend more time and effort going to a machine shop to have a cam system made. So once again this proves worthwhile and offers even more.


My hope is to promote the use of microcontroller based electronics in the spudgun and Nerf communities. They take difficult tasks and make them easy. They offer so much potential for our hobbies to grow. It's unfortunate that most people (myself included until now) shy away from electronics due to preconceived notions that they involve extensive knowledge to work with. That's simply not the case, especially with user-friendly open source prototyping platforms like Arduino.
btrettel
Specialist 3
Specialist 3
United States of America
Posts: 383
Joined: Sun Feb 03, 2008 4:40 pm
Contact:

Sun Feb 13, 2011 11:03 am

The complicated remark was not meant to disparage the work. Rather, I just wanted to say this is complicated relative to other projects. The complication is certainly justified if you note the benefits, especially given that this probably is the most straightforward way to do what you want as you've said.

I was actually thinking about electronic triggering for FANG4, but nothing with a microcontroller. I might change my mind.
All spud gun related projects are currently on hold.
PVC Arsenal 17
Staff Sergeant 3
Staff Sergeant 3
Posts: 1762
Joined: Mon Mar 27, 2006 4:18 pm
Location: United States

Mon Feb 14, 2011 12:25 am

I understand no harm was meant, and I only wanted to emphasize that the introduction of microcontrollers into this hobby does not necessarily entail knowledge or skill beyond that of the typical builder.

I recall a time when the basic DCV + QEV circuit was looked upon as sophisticated and only suitable for those with experience, but now it's as commonplace as the sprinkler valve. It's my hope that projects like this one will follow a similar trend, and it will begin sooner if more people are shown how simple it actually is (though still complicated in comparison to other things as you've said).


And I'd be quite curious to see what you come up with using similar methods considering your knowledge of programming and engineering far exceeds my own.
User avatar
POLAND_SPUD
Captain
Captain
Posts: 5402
Joined: Sat Oct 13, 2007 4:43 pm
Been thanked: 1 time

Mon Feb 14, 2011 12:55 am

I recall a time when the basic DCV + QEV circuit was looked upon as sophisticated and only suitable for those with experience, but now it's as commonplace as the sprinkler valve
That's because I devoted my life to spreading the gospel of the holy DCVs :D
(ohh and I admit I do include subliminal messages that will help me to conquer the world in all of my posts )
And when compared with a dedicated circuit approach, the MCU offers a level of control that can't be beaten
emphasize that the introduction of microcontrollers into this hobby does not necessarily entail knowledge or skill beyond that of the typical builder
I agree totally. One day they will be commonly used

ohh BTW good work
Last edited by POLAND_SPUD on Mon Feb 14, 2011 9:49 pm, edited 1 time in total.
Children are the future

unless we stop them now
User avatar
Crna Legija
First Sergeant 2
First Sergeant 2
Posts: 2333
Joined: Sun Jul 20, 2008 5:14 am
Location: australia

Mon Feb 14, 2011 8:20 am

i had a sudden urge to buy a dcv :?
'' To alcohol... The cause of, and solution to, all of life's problems.”
--Homer Simpson

Add me on ps3: wannafuk, 8/11/11 cant wait
PVC Arsenal 17
Staff Sergeant 3
Staff Sergeant 3
Posts: 1762
Joined: Mon Mar 27, 2006 4:18 pm
Location: United States

Wed Apr 06, 2011 12:34 pm

Since I've recently started planning for the second version of this project, I thought it may be helpful to post the full code used in the ARchangel. There will be very slight differences in the code used for the second version, but they're essentially the same.

To anyone who bothers to look at this in detail or try it themselves, note that certain delay times might make absolutely no sense. I can't recall whether or not I did any additional testing after the successful the trial runs. (Because, as I said, the delay times have a huge influence on the overall function of the gun so I did spend a lot of time finding the best values with some trial and error.)

Code: Select all

/**********ARchangel EPR Sketch**********/

//written for Arduino Uno with MOSFET power control
//handles rotary indexing and operates a pneumatic circuit
//full and semi automatic capable


int motor = 12;  //digital control for motor is on digital pin 12
int valve = 13;  //digital control for valve is on digital pin 13

int selector = 7;  //feedback from selector switch is on digital pin 7
int indexing = 8;  //feedback from indexing switch is on digital pin 8
int trigger = 9;  //feedback from trigger switch is on digital pin 9

//assigning start values to all switch states
int selector_state = 0;
int indexing_state = 0;
int trigger_state = 0;
int old_trigger_state = 0;  //will be used in semi-auto loop to detect transition in trigger state

void setup()
{
  //Setting motor & valve pins as outputs
  pinMode(motor, OUTPUT);
  pinMode(valve, OUTPUT);
  
  //Setting selector and indexing switches as inputs
  pinMode(selector, INPUT);
  pinMode(indexing, INPUT);
  pinMode(trigger, INPUT);
  
  //Apply no power to motor or valve at start
  digitalWrite(motor, LOW);
  digitalWrite(valve, LOW);
}

void loop()
{
   selector_state = digitalRead(selector);  //reading and storing value of selector switch
  
  
  //beginning of Full-Auto loop:
  
  if(selector_state == LOW){  //if selector is in "Full-Auto" position, the full-auto loop begins
  
    trigger_state = digitalRead(trigger);  //reading and storing value of trigger switch
    delay(10);
    
    if(trigger_state == HIGH){  //if trigger is pulled, loop runs
     
     //read and store state of indexing swith
     indexing_state = digitalRead(indexing);
     
     //if indexing switch is already high, turn motor until it goes low
     while(indexing_state == HIGH){
       digitalWrite(motor, HIGH);
       indexing_state = digitalRead(indexing);
     }
     
    digitalWrite(motor, LOW);
    delay(12);
     
     //turn motor until indexing switch goes high
     while(indexing_state == LOW){
       digitalWrite(motor, HIGH);
       indexing_state = digitalRead(indexing);
     }
     
    //shut off motor
    digitalWrite(motor, LOW);
    delay(20);
    
    digitalWrite(valve, HIGH);  //open valve
    delay(10);
    digitalWrite(valve, LOW);
    delay(50);
    
   }
    else{  //if trigger is not pulled, nothing happens
      analogWrite(motor, 0);
      analogWrite(valve, 0);
    }
  }
  
  
  
  //Beginning of Semi-Auto loop:
  
  else{   //selector state is LOW, so "Semi-Auto" loop begins
    
    trigger_state = digitalRead(trigger);  //reading and storing value of trigger switch
    delay(10);
    
     if((trigger_state == HIGH) && (old_trigger_state == LOW)){  //gun will only fire when there has been a transition from non-pulled to pulled
      indexing_state = digitalRead(indexing);
     
     while(indexing_state == HIGH){
       digitalWrite(motor, HIGH);
       indexing_state = digitalRead(indexing);
     }
     
    digitalWrite(motor, LOW);
    delay(12);
  
     
     while(indexing_state == LOW){
       digitalWrite(motor, HIGH);
       indexing_state = digitalRead(indexing);
     }
    
    //shut off motor
    digitalWrite(motor, LOW);
    delay(30);
    
    digitalWrite(valve, HIGH);  //open valve 
    delay(10);
    digitalWrite(valve, LOW);
    }
    else{  //if trigger is not pulled, nothing happens
      analogWrite(motor, 0);
      analogWrite(valve, 0);
    }
    old_trigger_state = trigger_state;  //old trigger state becomes current
 }
}
Edit: For anyone thinking of putting the control for something like a valve on pin 13 of an Arduino - don't. This pin likes to sputter between high and low when the board turns on for some reason. It led to some wasted CO2.
shardbearer
Private 4
Private 4
Posts: 85
Joined: Sat Apr 23, 2011 10:21 pm

Sun Apr 24, 2011 9:26 am

First, this gun is amazing. It needed to be done a long time ago.
Now to work.
How is the seal with the turret? On semi auto and "high powered mode" could you tighten the seal onto the turret before it fires, and would this be beneficial? Of course this would require some more work and another solenoid, and it would result in slower ROF.
How powerful is this blaster? Powerful enough to put a small inline clip on each barrel? Maybe an RSCB?

Edit: Whoops, kinda a necro.
User avatar
Technician1002
Captain
Captain
Posts: 5189
Joined: Sat Apr 04, 2009 11:10 am

Sun Apr 24, 2011 3:09 pm

Power sequencing may be in order for anyone thinking of using pin 13. First power the Arduino, then after a boot delay, enable the high voltage supply for the valves and motors.
PVC Arsenal 17
Staff Sergeant 3
Staff Sergeant 3
Posts: 1762
Joined: Mon Mar 27, 2006 4:18 pm
Location: United States

Sun Apr 24, 2011 6:18 pm

Tech- I'm slapping myself for not realizing that... :lol:

shardbearer- Thanks for the comments. The seal is achieved with a foam-rubber gasket around the air outlet. Considering the short barrel length and relatively low mass of the intended projectiles (nerf darts), I'm not too concerned with a loss of backpressure. It was something I was worried about before I started building the gun and I quickly decided it wasn't worth stressing over. In fact, this part will be left unchanged in the second version.

Inline clips are a possibility. I thought it would be cool to have the barrels reload themselves as they went around but I never got a chance to try it. There are limitations though. For example you'd want to prevent automatic loading when using full-auto mode or shooting at high RoF in semi due to possible misfeeds. There is also the trouble of loading just one dart into barrels that are 4 inches long.
shardbearer
Private 4
Private 4
Posts: 85
Joined: Sat Apr 23, 2011 10:21 pm

Sun Apr 24, 2011 11:56 pm

How were you thinking of reloading automatically? A gravity mag and solenoid, pushing darts into the barrels as they spin?

And then what's the point of having 15 barrels? A gravity mag and 2-3 would work just as well.

And what do you mean by the last sentence? That the darts would only fill the front couple inches?
PVC Arsenal 17
Staff Sergeant 3
Staff Sergeant 3
Posts: 1762
Joined: Mon Mar 27, 2006 4:18 pm
Location: United States

Mon Apr 25, 2011 2:41 pm

Somewhere on the side of the side of the gun would be a spring loaded inline magazine which (at some point) lines up with the empty barrels as they go around and inserts a new dart into them. Yes, if I've done that, I might as well have fewer barrels.

The trouble with having such a loading system is that you'd have to devise a way to insert just one dart into each barrel for every pass. If the barrels are 4 inches long and the darts are 2 inches long, the mag will try to fill the barrel with 2 darts assuming a detent is placed at the end of the barrel.
Attachments
rilm.png
rilm.png (15.34 KiB) Viewed 2937 times
Post Reply