Water Gun Race - Is it doable?

HI Guys,

I should start off by saying that I haven't really worked with Arudino very much, at the moment I don't even own one. However, I've been thinking of a project over the past week or so and have been wondering if it's possible using an Arduino. By "possible" I mean possible for a beginner like me to do. I have just about zero experience with circuitry however, I am a computer programmer so the programming part of the project shouldn't be much of an issue.

The project I'm wanting to pursue is a water gun race game, like the ones at a carnival.

Reference Images

The way it would work is as follows:

"Customers" pay to play the game: When that happens the operator would hit a button that "activates" the gun. This would probably activate a solenoid valve either 12V or 24V (maybe this one: http://www.lowes.com/pd_50161-74985-57100_0__?productId=1091027)

Once the game is ready to be played, the operator hits the "play button" which would start a 120V shallow well pump (something like this: http://www.homedepot.com/p/Wayne-1-HP-Shallow-Well-Jet-Pump-SWS100/203668878) that would begin pumping water from a reservoir to each activated gun (guns that aren't activated would be blocked by a closed solenoid valve that I mentioned before). I was thinking that the 120V pump might be able to be activated using a PowerSwitch Tail II (http://www.powerswitchtail.com/Pages/default.aspx).

When water from the gun hits its target, another solenoid valve would open and a secondary pump (that was activated when the game started) would begin to fill a clear tube with water. The tube that fills with water first is the winner, sound will play and a light would flash, then the water would drain and the game would reset.

Upon typing this post, the project seems even more ambitious than I had originally imagined in my head. Maybe some of this could be more mechanical instead to simplify the circuitry?

Thanks in advance

Sean

Sure, quite feasible. My only concern is that you are mixing a lot of water and mains electricity. You probably want to have the pumps and mains electronics separated by a few metres (off to one side and well-shielded; see if you an achieve IP67 for all the mains electronics) with just pipes and opto-isolated signals going between the play area and the mains/pumping area.

You should be able to run it all off the one pump and a whole bunch of solenoids. One solenoid per gun, one solenoid per filler, one solenoid to drain each bucket. Or you could use big LED bar-graphs to illustrate fill-progress instead of water, which means you need water only for the guns.

You will also need some means of detecting water hits on targets. I would suggest little lightly-spring-loaded metal plates with microswitches on them. Most watering solenoids are 24VAC and about 100-300mA, so you need a big 24VAC transformer and a relay to supply power for each solenoid; you can probably buy an 8-relay shield ready-made for the arduino. And some zener diodes to catch the switch-off transients from the solenoid coils; put a reverse-series pair of 50V zeners across each solenoid.

polyglot:
Most watering solenoids are 24VAC and about 100-300mA, so you need a big 24VAC transformer

Would this transformer work?

polyglot:
you can probably buy an 8-relay shield ready-made for the arduino.

Would this 24V 8-relay shield work?
http://www.nyplatform.com/index.php?route=product/product&product_id=760

Also, is an Arduino Uno beefy enough for this, or will I need a something like the Arduino Due?

I appreciate all the information you've give me so far, any more details and or insight on how I would go about doing this would be helpful.

Sean

Also, is an Arduino Uno beefy enough for this, or will I need a something like the Arduino Due?

Yes a UNO will be fine,you can always add more input / output if you run short.
The other questions depend on the number and current / voltage requirements of what you are using.
Whter sensors might be a problem. Yes you can get them but they continue to give a reading when they are wet.

Grumpy_Mike:
The other questions depend on the number and current / voltage requirements of what you are using.

Would it be more efficient and easier if I could find some latching solenoid valves to use instead?

Sean

Yes that would reduce the power consumption.

That transformer is fine, assuming you're in the US or somewhere with 115V mains. 100VA means it can supply about 4A, which means you can run about 10 solenoids (depending...) at once with no problems. Latching solenoids will save power, but for this project I don't see the point at all due to the additional control complexity (double the number of relays!). While solenoids consume a fair bit of current, they don't actually consume a lot of power: their power-factor is quite low because they're mostly inductive.

An Uno or Duemilanove is plenty powerful enough for this. If you get a 2A 5V switching power supply, that can run your arduino and about 15 relays (depending...) comfortably.

As for the relay board, get one that has 5V (not 24V) relays on it. That one seems to need a 24VDC supply, which is an additional unnecessary complication in your case. Note that I'm talking about the coil voltage, not the contact rating! You still need a mains-rated contact if you want to switch mains devices. Those relays are OK for switching power to solenoids but they're a bit too small/fragile for switching a high power, inductive load like a water pump. You'll need a relay board similar to that one for all the solenoids, plus a powerswitchtail to control the pump.

If you're running out of IO pins, you can of course buy a mega or you can use shift registers to synthesise as many input and output pins as you want - you don't have any stringent timing requirements here (no one will notice if there's 10ms of latency on any switch actions) so you have plenty of time to talk to shift registers or I2C port expanders - look at a PCF8575, MCP23008 or CAT9554 for inspiration; there are many similar parts available.

You haven't bought the stuff yet, so you still have choice of solenoids. It will probably be easier if you use 12vdc solenoid. You could even use the type used for drip irrigation you can get at any hardware shop. I hear clippard makes some nice small water valves.

You can drive a 12vdc solenoid pretty much the same as you drive a relay, low side switch NPN transistor and flyback transistor.

You mention using a reservoir. I take it this won't be connected to a water main system, but will be portable?

If it were me, I would probably not use a pump. I would probably use a pressurized beer keg. Probably would stay away from carbon dioxide and use nitrogen because I'm not sure how carbonated water acts when you shoot it. It might scatter and not form a nice stream. I'd probably use a nitrogen tank or bring my little air compressor. But if you don't have any experience with compressed air it's probably not the best option.

Remember, you only need a tiny narrow stream because the tube is filled by its own valve.

And don't forget about the tube emptying valve!

I suggest you start by deciding what sort of water pressure and maximum volume flow rate you need, then spec the water supply for that. If at all possible I would use low voltage DC for everything because mains voltage electricity plus water spraying about is a recipe for disaster. What ever else you do, if this thing is powered from the mains in any way make sure you power it through a residual current detector (RCD) isolator.

Assuming you want to allow multiple 'guns' to be used in the same game, I'd eliminate the solenoids and just give the user a hand trigger, the sort of thing commonly seen on garden hoses - and if it suits your game design, I'd aim to use standard garden hose spray heads with a suitable nozzle. That way you can turn on all the guns together by turning the pump on, or opening the valve to your pressure accumulator. I don't know how much water you plan to dispense per game, but an ordinary garden pressure spray container would make a convenient pressure accumulator.

The electrical and software side should be fairly simple, but you can't finalise it until you have sorted out the hardware side and decided what sort of pumps and valve actuators you need.

To detect water hitting the target, you could just use a paddle that operates a microswitch when a water jet impacts it.

To detect the water level in your measuring device, I would use a switch activated by a float. Make the float something visible and you can use that to show the progress of each player during the game.

PeterH:
I suggest you start by deciding what sort of water pressure and maximum volume flow rate you need, then spec the water supply for that.

This cannot be overstated.

if you have one nozzle, you could get high pressure and high volume.
if you have 10 nozzles, the flow could decrease to be unusable.

the end result should be that there is no change on any unit, regardless how many are in use.

the rest is beginners stuff to a large degree. solenoids and relays and switches and some programming.

it would be easy enough to buy a valve from home depot and connect it with a foot switch to try it out. get multiple nozzles and see how they change pressure with increasing quantity of nozzles.

I would highly suggest that you use a GFI and make sure the ground on the extension cord is working. do not consider that as your first line of protection. if it ever does trip, re-evaluate your installation to make things safe.

As everyone has said, it's very doable. However, I think you're complicating the hell out of it. Make it simpler on yourself!

A few things immediately come to mind:

A solenoid is easy enough to buy and operate, but they are often bulky and expensive. There are already digitally controlled hose manifolds for watering your lawn. Buy one of them for $20, open it up, and see what happens on the board when it triggers. Solder in wires and supply the voltages yourself!

Don't make a water column rise when the player hits the target. That's a much more involved process than you think it is; as the height rises, the pressure column builds and you'll need more force to raise it higher, resulting in a diminishing rate of rise. You can't just solenoid valve it, as then it will seek to equalize pressure and it won't raise beyond what's supplied in the pressure head. You'd either have to use a solenoid pump (which are a PITA to control) or a peristaltic pump (which are expensive, noisy, and aren't designed to move much water). My choice would be to have the target close a switch (a simple feather switch would work great). When that's closed, it completes a circuit to turn a small DC motor. The motor spins a long threaded rod ("Screw Drive") that you buy at Home Depot for $2. You have a little indicator ride a rail with a nut on the back... As the motor spins, the indicator rises along the screw! Have another feather switch at the top -- first one to hit the switch wins! (and it sets off lights/sounds/closes water gun solenoid/etc)

The electronics and coding aren't that hard. The mechanical aspect may be your toughest hurdle.

I think the water columb rate should be pretty linear if the source pressure is high enough. I imagine that it would be similar to charging a capacitor through a resistor. 2 feet of water is about 1psi.

The real issue is consistancy between the tubes for a fair race.

However, if you fill by pouring from the top the pressure issue goes away. You would still need a little valve on each to calibrate the fill rates.

EternityForest:
I think the water columb rate should be pretty linear if the source pressure is high enough. I imagine that it would be similar to charging a capacitor through a resistor. 2 feet of water is about 1psi.

The real issue is consistancy between the tubes for a fair race.

However, if you fill by pouring from the top the pressure issue goes away. You would still need a little valve on each to calibrate the fill rates.

I think the issue is that if you open a valve as suggested (not pumping it), the column will equal out as fast as possible, driven by the pressure difference across the orifice plate. As the pressure on the "score" column rises, the pressure differential will drop, as will the rate. Just rearrange the Bernoulli equation and you've got your volumetric flow rate, Q = A2 * sqrt(1/((1-d2/d1)^4)) * sqrt(2*(P1-P2)/rho), where A2 is the "score" pipe diameter, d2 is the orifice diameter, d1 is the input pipe diameter, and P1 and P2 are pressures on respective sides of the orifice plate. Graphing that you, you'll see that the rate of rise will be quite different over time as the pressures equalize.

Honestly I'm more of a fluids guy than an electrical guy, so I'm not sure how this compares to the equation for charging a capacitor through a resistor, though I'm familiar with the concept.

As for the relay board, get one that has 5V (not 24V) relays on it.

I had assumed that when it said "5V" it was referring to the maximum switch voltage (I believe that's what it's called). I see that I messed that up, I found this 5V relay shield instead http://www.amazon.com/SainSmart-8-CH-8-Channel-Relay-Module/dp/B0057OC5WK that should work, right?

It will probably be easier if you use 12vdc solenoid.

I'm open to using either 24VAC solenoids or 12VDC solenoids, which ever is easier and more efficient to control.

if you have one nozzle, you could get high pressure and high volume.
if you have 10 nozzles, the flow could decrease to be unusable.

the end result should be that there is no change on any unit, regardless how many are in use.

If I ditch the idea of the clear water tube filling up, would this still be an issue? As long as there is still enough pressure when all 10 guns are active to knock the target switch, it shouldn't matter. Correct?

There are already digitally controlled hose manifolds for watering your lawn. Buy one of them for $20, open it up, and see what happens on the board when it triggers. Solder in wires and supply the voltages yourself!

That sounds like a good option, but I did a quick Google search and could only find manual hose manifolds. Do you happen to have a link to some digital ones?

When that's closed, it completes a circuit to turn a small DC motor. he motor spins a long threaded rod ("Screw Drive") that you buy at Home Depot for $2. You have a little indicator ride a rail with a nut on the back... As the motor spins, the indicator rises along the screw! Have another feather switch at the top -- first one to hit the switch wins! (and it sets off lights/sounds/closes water gun solenoid/etc)

That sounds like the better option, I had originally thought that driving several motors would be more difficult than simply opening up some solenoid valves.

Sean

You learn something new ever day! That is definately not a simple linear function like the capacitor charging case.
I see a sqrt being taken of the pressure difference, so its not linear. Volumetric flow is what i would imagine to be the closest analog to electric current but here its behaving much differently. Very interesting.

In a capacitor being charged from a voltage source by a resistor the current is just a simple case of ohms law across the resistor from vcc to the current capacitor voltage.

SRegan:
If I ditch the idea of the clear water tube filling up, would this still be an issue? As long as there is still enough pressure when all 10 guns are active to knock the target switch, it shouldn't matter. Correct?

It'd still be an issue... He's saying the pressure to the guns would be equal. If you have a 25 psi back pressure and open up 1 nozzle, you've got 25/(area of 1 nozzle) of pressure coming out. That's gonna blast! If you've got 10 open, you've got 25/(10* nozzle area) of pressure. It might be kinda dribbly.

That sounds like a good option, but I did a quick Google search and could only find manual hose manifolds. Do you happen to have a link to some digital ones?

You don't evne need the main body, just the add on parts! http://www.amazon.com/Orbit-58874N-Extra-Complete-Watering/dp/B003LY4I2I/ref=pd_bxgy_lg_img_y

When that's closed, it completes a circuit to turn a small DC motor. he motor spins a long threaded rod ("Screw Drive") that you buy at Home Depot for $2. You have a little indicator ride a rail with a nut on the back... As the motor spins, the indicator rises along the screw! Have another feather switch at the top -- first one to hit the switch wins! (and it sets off lights/sounds/closes water gun solenoid/etc)

That sounds like the better option, I had originally thought that driving several motors would be more difficult than simply opening up some solenoid valves.

Have fun!

It'd still be an issue... He's saying the pressure to the guns would be equal. If you have a 25 psi back pressure and open up 1 nozzle, you've got 25/(area of 1 nozzle) of pressure coming out. That's gonna blast! If you've got 10 open, you've got 25/(10* nozzle area) of pressure. It might be kinda dribbly.

Is there any solution other than having an individual pump for each gun?

You don't evne need the main body, just the add on parts! http://www.amazon.com/Orbit-58874N-Extra-Complete-Watering/dp/B003LY4I2I/ref=pd_bxgy_lg_img_y

This project Ray's Hobby Projects: Minty Water Valve Controller seems to use the same valve, and from what I read it seems to be a 24VDC latching solenoid. I was told by previous posters that a latching solenoid would just over complicate things.

Sean

latching solenoid requires two signals. easy-peasy because at the end , one pulse, everything gets shut off. that is on additional pin for the entire project.

SRegan:

Is there any solution other than having an individual pump for each gun?

yes. get a tarp, get a hose. get a timer and start quirting. drain the tarp and measure how much fluid you need for one.
get a water heater of the proper galllaonage, (make up words as you go along) get an expansion tank. read up on how to charge the tank. the expansion tank will keep a somewhat consistant pressure and the pump running at the same time will replenish as you go. you this is all home depot stuff. you might be able to just get a large enough pump ( or use two) that will keep up.

best way is to get 10 nozzles, 10 houses and those 2 dollar shut off valves
http://www.dripirrigation.com/drip_irrigation_categories/75/drip_irrigation_parts/54
get 10 sweeper nozzles
http://www.amazonsupply.com/dixon-psn76-sweeper-nozzle-orifice/dp/B00835N7MM

try one, then two, then three…

get wet, have fun, figure it out.

How many guns do you need simultaneously? Is the number 10?

I'd start with an RV water pump. They are 12V and made to maintain pressure whether water is flowing or not. I once used one for a custom portable water sprayer and used two pressure washer wants with triggers on each one and could get some pretty serious flow with each connected through 30' of hose. When we adjusted the nozzles to shoot a stream, it was WAY more than you'd need for this game, so I suspect one RV pump could support a good many guns. At least five, and maybe up to ten. I'd bet you don't need more than two. They do take a good bit of current, though! So an option for power is to just use a decent sized car battery and just charge it between uses. Otherwise, 12V DC power supplies that can supply a LOT of amps can be expensive. You'll have to check specs to see how you want to go on that front.

The next best option is to just use a well water expansion tank. You won't need a huge pump, and in fact can probably use a single RV pump for this. It'll basically act as a big baffle and the pump will have plenty of time to recharge between races. You'll find these at Lowes. Not too large physically.

I see no problem whatsoever with your water column filling idea. It's not THAT complicated. I think with decent plumbing and the same sized valves that you don't have to sense your water level, just base the "winner" on cumulative time the valve is open and call it good.

I'd definitely go with the small plate on a spring loaded switch for the target. It'll just be annoying to make the switch waterproof-ish.

There are a ton of relay boards on eBay that are perfect for driving your valves.

If I were doing it, I'd make each gun have a coin slot and automate the money part, too. But I grew up in the coin op industry and have a pile of video game coin doors laying around. I did a sophomore project in college way back that was a 3 digit slot machine (just had 3 seven-segment LEDs that rolled at different speeds for different amounts of time to a number). You could put in from 1-9 quarters and then hit start. If you had any two numbers match, you got something like 2x the quarters you put in paid back in tickets from a ticket dispenser. If you got all three, you got like 5x your money in tickets. Those ticket dispensers are pretty easy to control as you simply apply power and then count pulses and stop power when you get however many pulses you wanted to dispense in tickets. FWIW.

--Donnie