November 23, 2024, 06:13:34 PM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Double Barrel Air Cannon

Started by painnbt, September 27, 2010, 06:26:27 PM

Previous topic - Next topic

painnbt

ok so here we go

we have build a stand up air cannon with two barrels what i have is two air rams going to one valve that when power is on to valve one cannon is forward the other is back so basically need a function to turn on and off the valve to make cannons go in and out secondly i have another valve that will dump the air into the cannons when it opens up it should do this quickly when button is pushed timing is something i can mess with when i get this set up just make what ever you think would be a good starting point... the basically overall effect the cannons will move in and out while the air is going thru the cannon chambers at a rapid rate kinda like a machine gun would fire thank you in advance for your help hope to hear something at your earlyest time . ;D

gadget-evilusions

Not trying to be rude, but I could not make out what your trying to do. Your entire post was one sentence and was difficult to understand.
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

JackMan

Yeah, you're gonna need to supply more info on exactly what you want to happen. How are you going to trigger this? Do you want both valves to have the same timing? (firing and moving in sync?) How many times do you want it to fire each time it's triggered? You get the point, you need to give as many details as possible for someone to write you a program.

bsnut

September 27, 2010, 08:19:41 PM #3 Last Edit: September 27, 2010, 08:27:07 PM by bsnut
I have some understanding what you want do by leaving out the periods in your post :) But, as everyone is saying, we need details and with these details I can write a program for you. The details that, I need as a programmer is.

1.What is triggering the prop and how many triggers (mat switches, PIRs or push buttons)?
2. How many outputs (solenoid valves)?
3. How is the prop going to work (sequence of operations)

Once you provide this information, then I can write your program for.
William Stefan
The Basic Stamp Nut

JonnyMac

Like others, I'm struggling with understanding your request without the use of punctuation.  Even a simple period will help.  ;D

After reading it a couple times I came up with this.  When the button is pressed it will cycle the position valve on and off to move the ram back and forth.  At the forward position of the cycle it will briefly open another valve.  When the shot valve is opened the other is closed to make the ram retract.  The shooting valve is closed after 50ms and then there is a delay to let the ram fully retract.  At the end of the cycle the button is checked; if it's still pressed the cycle is run again.

' =========================================================================
'
'   File......
'   Purpose...
'   Author....
'   E-mail....
'   Started...
'   Updated...
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------


' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL  Sio             = 7                     ' SETUP = UP; no ULN
SYMBOL  Trigger         = PIN6                  ' SETUP = DN

SYMBOL  Shoot           = PIN2                  ' OUT2 = shooting valve
SYMBOL  Position        = PIN0                  ' OUT0 = position valve


' -----[ Constants ]-------------------------------------------------------

SYMBOL  IsOn            = 1                     ' for active-high in/out
SYMBOL  IsOff           = 0

SYMBOL  Forward         = 1
SYMBOL  Back            = 0


' -----[ Variables ]-------------------------------------------------------

SYMBOL  timer           = B2


' -----[ Initialization ]--------------------------------------------------

Reset:
  PINS = %00000000                              ' clear all outputs
  DIRS = %00111111                              ' make P0-P5 outputs


' -----[ Program Code ]----------------------------------------------------

Main:
  timer = 0                                     ' reset timer

Check_Trigger:
  PAUSE 5                                       ' loop pad
  timer = timer + 5 * Trigger                   ' update timer
  IF timer < 250 THEN Check_Trigger             ' wait for 0.25 sec input

Fire:
  Position = Forward
  PAUSE 250                                     ' wait 1/4 second
  Shoot = IsOn                                  ' fire short
  Position = Back                               ' recoil from shot
  PAUSE 50
  Shoot = IsOff                                 ' finish shot
  PAUSE 250                                     ' allow time for retraction
  IF Trigger = IsOn THEN Fire                   ' again if button pressed
    GOTO Main


' -----[ Subroutines ]-----------------------------------------------------


' -------------------------------------------------------------------------


' -----[ User Data ]-------------------------------------------------------



Jon McPhalen
EFX-TEK Hollywood Office

painnbt

..................................................... lol
thanks jon think you pretty much got the point. The two barrels will alternate in and out off one air ram when the valve is closed barrle A will be out barrel B will be in, and vise versa. While this is going one i want shots to be fireing thru the barrles with my second valve. This will operate off a push button. not sure if i need two push buttons or if i can just use one.

JonnyMac

I'm still a little lost in the configuration.  Can you spell it out, as if I were a teenager?  For example:

If button is pressed
  barrel 1 moves out
  barrel 1 shoots
  barrel 1 retracts

If button is still pressed...
  barrel 2 moves out
  barrel 2 shoots
  barrel 2 retracts

Go back to beginning.

Keep in mind that I'm at a serious disadvantage here (as are others wanting to help) in that I cannot see your prop.  If you could sketch up a diagram that would be helpful.  And... please don't assume that I know anything about pneumatics, etc.  What I know is electron control, and electrons don't care if they're moving three LEDs or solenoid coils.
Jon McPhalen
EFX-TEK Hollywood Office

painnbt

ill see if i can be clear. What i want to do is push a button this will make the barrels go in and out .

Now let me explain how the barrels operate. When there is power to the valve it sends air to the pneumatics causing one barrel to be in and the other one out. When power is off to the valve the barrel that was out is now in and the barrel that was in is now out. So by flipping power on and off to the valve it should make the barrels alternate going in and out.

Secondly when the button is pushed i want the gun to fire.

I have a second valve when power goes to the valve it will open and dump air into the barrels. So quickly sending power on and off to the valve should make a rapid fire out of the barrels.

i would like to be able to do this off one button but if i need two i will do so.

another thing this is my first project so i need to figure out how to put this board together wire the valves and  push button i do not have the push button yet but i need to get one if i can manage i will take pictures of the gun. all the help i can get would be great even if you want to call me or i can call you  i should have allowed for more time for this project but it was put on the back burner due to some issues that came up with the haunt this year .



JonnyMac

Here's a program update with constants at the top to adjust behavior.  If you will spend a few minute studying the code it should make perfect sense.

The Prop-1 documentation shows how to connect valves to the board.  For a normally open trigger button you will connect the button between the P6.W (P6 white) and P6.R (P6 red) wires.  Cut one end off our our six-foot extension cable (#805-00175) and solder a normally-open button between the white and red wires  (black is not used).  Plug the other end into the board's P6 header (note the WRB orientation markings on the board).

' =========================================================================
'
'   File......
'   Purpose...
'   Author....
'   E-mail....
'   Started...
'   Updated...
'
'   {$STAMP BS1}
'   {$PBASIC 1.0}
'
' =========================================================================


' -----[ Program Description ]---------------------------------------------


' -----[ Revision History ]------------------------------------------------


' -----[ I/O Definitions ]-------------------------------------------------

SYMBOL  Sio             = 7                     ' SETUP = UP; no ULN
SYMBOL  Trigger         = PIN6                  ' SETUP = DN

SYMBOL  Shoot           = PIN2                  ' OUT2 = shooting valve
SYMBOL  Barrels         = PIN0                  ' OUT0 = position valve


' -----[ Constants ]-------------------------------------------------------

SYMBOL  IsOn            = 1                     ' for active-high in/out
SYMBOL  IsOff           = 0

SYMBOL  B1Out           = 0                     ' barrel #1 extended
SYMBOL  B2Out           = 1                     ' barrel #2 extended

SYMBOL  RecoilDelay     = 50                    ' delay before barrel moves
SYMBOL  ShotFinish      = 50                    ' time to complete shot
SYMBOL  RecoilTiming    = 500                   ' 0.5s for barrel to recoil


' -----[ Variables ]-------------------------------------------------------

SYMBOL  timer           = B2


' -----[ Initialization ]--------------------------------------------------

Reset:
 PINS = %00000000                              ' clear all outputs
 DIRS = %00111111                              ' make P0-P5 outputs


' -----[ Program Code ]----------------------------------------------------

Main:
 timer = 0                                     ' reset timer

Check_Trigger:
 PAUSE 5                                       ' loop pad
 timer = timer + 5 * Trigger                   ' update timer
 IF timer < 250 THEN Check_Trigger             ' wait for 0.25 sec input

Fire_1:
 Shoot = IsOn                                  ' fire barrel #1
 PAUSE RecoilDelay                             ' shoot!
 Barrels = B2Out                               ' retract #1, extend #2
 PAUSE ShotFinish                              ' finish shot
 Shoot = IsOff
 PAUSE RecoilTiming                            ' finish recoil

Fire_2:
 Shoot = IsOn                                  ' fire barrel #2
 PAUSE RecoilDelay                             ' shoot!
 Barrels = B1Out                               ' retract #2, extend #1
 PAUSE ShotFinish                              ' finish shot
 Shoot = IsOff
 PAUSE RecoilTiming                            ' finish recoil

 IF Trigger = IsOn THEN Fire_1                 ' again if button pressed
   GOTO Main


' -----[ Subroutines ]-----------------------------------------------------


' -------------------------------------------------------------------------


' -----[ User Data ]-------------------------------------------------------
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

Quote from: painnbt on September 30, 2010, 09:52:42 AM
would a button like this work http://www.radioshack.com/product/index.jsp?productId=2062510

Use this one.  As I indicated above, you'll want to take one of our 6-foot extender cables, cut off one of the connectors, and then solder the wire and red wires to the N.O. button.  With that button it looks like you could screw it into a piece of PVC (thread the wire through first, in case the connector won't fit) -- this would make it easy to hold.
Jon McPhalen
EFX-TEK Hollywood Office

painnbt

jon looks like my back up valve is a 5.4 watts

gadget-evilusions

http://www.efx-tek.com/php/smf/index.php?topic=1480.0

As long as only 1 valve is on at a time, you would be fine. 5.4w at 12v would be under 500ma. If both valves are turning on at the same time you could blow the ULN.
Brian
Evilusions LLC
www.evilusions.com for all your pneumatic components

painnbt

we have had a change in this prop. We are now down to just one valve fire at a high rate of fire to put air into the cannon. I just need a mod to this and need to know how to alter the timing to adjust this fire rate as i test it out.