Gas station without pumps

2012 July 11

Nerf gun analysis

Filed under: Robotics — gasstationwithoutpumps @ 13:52
Tags: , ,

In Nerf gun progress I mentioned that the students hooked up a small reservoir behind the solenoid valve on the barrel to a bigger reservoir using an air hose for their Nerf gun prototype. They were switching from a design like this

Simple Nerf gun prototype with a large air reservoir immediately behind the solenoid valve.

to one like this

Design for new prototype with a small reservoir behind the valve, connected via an air hose to a larger reservoir.

Last night after the glue had dried enough, my son and I tested the new prototype.  As I had feared, it did not work well.  With the 19 msec pulse for opening the solenoid valve, the dart did not even exit the barrel, and a second pulse got the dart out of the barrel but traveling slowly, even with 100 psi in the reservoirs.  We have not determined whether a longer pulse would work, but we did try reconnecting the large reservoir directly and determined that it still works fine, so the problem is not with the solenoid valve, computer control, barrel, or darts.

I still like the idea of having an air hose to a bigger reservoir and the compressor, so that the pan-tilt mechanism does not have to move much mass around, and I’d like to help the students continue with that idea.

So in today’s post I want to do a little engineering analysis to help the students figure out what went wrong, so that they can start thinking about the redesign.  The pressure in the little reservoir was just as high as before, and the solenoid valve opened as wide for as long, but not nearly as much air came through the valve.  The pair of reservoirs have more total volume than the large reservoir alone, but air flow through the hose is somewhat restricted.  We’ll have to use some physics and make some crude approximations to figure out what is going on.

First, we’ll need some dimensions:

component length (cm) diameter (cm) volume (mL)
barrel  68.5  1.5  121
reservoir  48.5  4  609.5
mini-reservoir  21  2  66
air hose  762  0.6  215.5

Note: I measured the IDs of the PVC pipes with calipers, but for the air hose I relied on the markings on the hose. All the lengths are approximate, as I did not attempt to accurately account for the plumbing connectors. I’ve given the length and volume numbers to more precision than they deserve, given the low accuracy.

When we were firing directly from the large reservoir, we had once measured a series of pressures after each firing (using the rather low-resolution gauge on the bicycle pump):

Plot of pressure drop, which is approximately linear with the number of times the valve has been opened. Note: these firings were done without a dart in the barrel.  If the back pressure from having a dart in the barrel makes a difference, these readings may not represent what happens when darts are actually fired.

The 2.87 psi drop can also be thought of as a 0.2 atmosphere drop per firing of the gun. I was surprised that the drop in pressure was so linear. I had expected the flow rate to be linear with the pressure, so that we would see an exponential drop in pressure, rather than a linear one. I guess that the flexible membrane of the valve acts as a pressure regulator—the valve does not open as fast or as fully against a high pressure difference as against a low pressure difference, so we get about the same flow rate no matter what the pressure.

Another possibility is that the air is moving fast enough through a small enough hole that we are getting choked flow, which also seems plausible. But in choked flow the mass flow rate through a constant size opening would vary as the square root of the absolute pressure of the upstream side, which does not seem to be the case here, so I think that the variable opening size seems more likely.

So how much air are we moving on each firing? The density of air in the room is about 1.2 kg m-3 or 1.2 mg/mL. Thus each firing is moving about 0.2 atm*1.2 mg/(mL atm)*609.5ml = 146 mg of air, for a mass flow rate of 146 mg/19 ms = 7.7 g/s.  Air flow is often expressed in volume units (converting mass flow to volume as if the air were at atmospheric pressure), so this would be a volume of 122 mL and a volumetric flow rate of 6.4 L/s (about 13.6 CFM).

Note that barrel holds about 145 mg of air, so our firing was moving just enough air to fill the barrel at atmospheric pressure. That also means that the acceleration analysis I’ve done in the past (based on the assumption of constant pressure behind the dart) is bogus.  The differential pressure on the dart drops linearly to zero along the barrel, so the total energy imparted to the dart is only 1/2 the initial force times the length of the barrel.  With an area of about 1.77 cm2, the force on the dart at 100 psi (6.9 bar) is 122 N, so the energy added to the dart is about 42 J, which should accelerate the dart to about 230 m/s (not taking into account the losses due to friction or to pushing out the 145 mg of air initially in the barrel). Of course, for that to happen, the dart would have to move down the barrel in 6 msec, not the 19 msec duration of the pulse, so this energy-based analysis is probably faulty.

It might be a good idea to figure out some way to determine how long it takes for the dart to travel down the barrel.  Perhaps we could put a microphone by the end of the barrel, and trigger the scope on the rising edge of solenoid pulse, to see how much later the air pulse leaves the barrel, with and without a dart.  The speed of sound in air at standard temperature and pressure is about 343.2 m/s, and to first approximation the speed of sound is independent of pressure, so I would expect the pulse of air to reach the end of the empty barrel in about 2 msec.  With a dart in the barrel, the air blast should be slowed down, though the microphone should still pick up the pressure wave in front of the dart about 2 msec after the dart starts to move.  There should be a loud blast just as the dart clears the barrel, though, which should be detectable on the oscilloscope.

For the little reservoir, if we were taking 145 mg of air from it, the pressure would drop by 145 mg / (66 mL * 1.2 mg/(mL atm)) = 1.8atm or 27 psi.  According to a web-based air flow rate calculator, our 25′ air hose should have a flow rate of 4.9 CFM (2.3 L/s) with that big a pressure drop, so replenishing the air in the little reservoir would take about 106 msec (I doubled the time at 2.3 L/s, because the flow rate drops as the pressure drops, though not exactly linearly).  That is long enough that we can probably treat the firing has happening entirely from the small reservoir.

My biggest concern is that when firing from the small reservoir, we’re not getting the full 145 mg (122 mL) of air we need to fire the dart.  Given that the flow rate was nearly independent of pressure in our test firings from the big cylinder, why does firing from the small reservoir make a difference?  I’m not sure.

  • Is it because of the behavior of the valve membrane as the pressure drops?  As the pressure drops the valve would need to open more to keep the flow rate the same, and there may not be time for that.
  • Is it a resonant effect of the length of the reservoir?   so the decompression wave traveling back from the valve should be traveling at 34.3 cm/msec.  In 19 msec there is time for several round trips of the decompression wave in the cylinder even for the larger cylinder, so I wouldn’t expect any resonance effects to be significant.
  • [Update  2012 July 11 16:45: The real reason!  The problem was not with the small reservoir at all, but with the orientation of the valve.  I was testing the gun (with the microphone) and with the solenoid pulling against gravity the gun was doing the same sort of feeble firing we saw with the mini reservoir, but with the big one! Turning the gun over so that the solenoid worked with gravity instead of against it fired fine. I don’t remember which way up we tested yesterday.  So I reconnected the small reservoir and tested again today, making sure that the solenoid was vertical in the right orientation (gravity assisting the solenoid).  The gun worked fine!  If we need to change the orientation, we may need to make the pulse longer, so that the solenoid can open all the way.]
  • [Update 2012 July 11 18:00: It stopped working again.  I think we need longer pulses.]

We should probably make some mods to the small reservoir so that we can pump it up directly from the bike pump and do a series of test firings like we did for the large reservoir, to see how much air is released on each firing from the small reservoir.  We could also measure how far the dart moves in the barrel on a single pulse, to get a different estimate of how much air is released.

2 Comments »

  1. […] Nerf gun analysis, I computed volumes for the reservoirs and made conjectures about why the gun was not working well […]

    Pingback by Nerf gun analysis, continued « Gas station without pumps — 2012 July 11 @ 19:04 | Reply

  2. […] Nerf gun analysis and Nerf gun analysis, continued, I looked at the pressure drop in the reservoir as the Nerf gun […]

    Pingback by Nerf gun on the oscilloscope « Gas station without pumps — 2012 July 11 @ 23:10 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: