Saturday, June 30, 2012

Pneumatic Rocketry

The United States Civil Air Patrol (CAP) was founded December 1, 1941 (six days before bombs fell on Pearl Harbor).  Up until that point US military pilots had been providing critical services around the country; services such as search and rescue, disaster surveillance, and transport of people and materials around the country.  With the growing war in Europe however it was becomming increasingly likely that the US was going to have to commit forces to the conflict.  Concerned that the roles served by military pilots to that point would be left vacant when the pilots were sent overseas a group of volunteer civilian pilots were recruited and trained to assume the roles.  After the war that group of pilots were officially placed under the budget of the newly formed United States Air Force as their Civilian Auxiliary.

My maternal grandparents were pilots with the CAP in the 1960s.  They lived in the Arizona/New Mexico area at the time and were involved in searches for missing planes and in flood and wildfire spotting for disaster response.  When I became a pilot in 2001 my grandmother suggested that I join.  A squadron was finally chartered in my area, and I joined the Civil Air Patrol as a Senior Member a few years ago. 

In the past half-century the mandate of the CAP has expanded significantly.  Today the focus of the organization is split into three main areas:  Emergency Services (disaster response/recovery, transport of materials/people, and search and rescue), Cadet Services (think Boy Scouts with planes), and Aerospace Education.  It's the last of these that my post this week covers.

Rocketry is one of the (many) subjects that CAP teaches as a part of our aerospace education program.  Our cadets get to build and launch solid-fuel rockets during their training.  An early precursor in their training however involves compressed air rockets.  Working on a similar principle the air rockets, launched from a platform containing a volume of compressed air, are a safer alternative to pyrotechnic rockets, and they can be launched with far less restrictive safety requirements (such as near a building or during dangerously dry weather).

The Aerospace Education Officer for my squadron is a former employee of NASA.  When she joined us she brought with her a pneumatic launch system developed by NASA educators exactly for the purpose of teaching rocketry.  Basically it's a sealed pressure-vessel made from 1-1/2 inch PVC which is pressurized by a bicycle pump or air compressor through a tire valve in one end of the pipe.  A ball-valve retains the pressure, and when the valve is opened the air rushes through a piece of 1/2 inch PVC pushing a paper rocket off the end of the tube.

There's a small design problem I've noticed with the NASA endorsed pneumatic launcher: the ball valve.  It's a magnificant piece of hardware for what it does.  It holds pressure very well, and when it's opened it causes little to no additional resistance to the fluid passing through (air is a compressable fluid).  Between "off" and "on" however no matter how fast the valve is opened there's a brief period during which the valve is only partially opened.  This allows air to escape at a much slower rate than it would when the valve is completely opened.  For most applications this is irrelevant, but when the air begins flowing in a pneumatic rocket launcher the rocket begins to launch before the valve is completely opened.  I haven't done high-speed video studies to confirm this, but I suspect that the rocket in most cases has been pushed off the end of the launch tube long before the valve has been completely opened.  Additionally, because of safety concerns an adult educator has to be the one to turn the handle launching the rocket.  It's exciting for kids to watch a paper rocket they've built get launched, but I bet they would have even more fun if they got to launch it themselves.

I had seen a post on Make Blog about someone who had made a home-built t-shirt launcher (similar to the ones used at sporting events).  It was charged (pressurized) by a carbon dioxide tank worn as a backpack, and it had an electric push-button trigger that opened a sprinkler system solenoid valve that dumped the pressure all at once into the launch chamber.  A solenoid valve is an electro-mechanical valve that uses a diaphragm rather than a ball-valve to regulate flow.  It opens almost instantly, and when it's open it allows low-resistance flow almost as efficiently as the ball-valve.  A single, hollow-core electromagnet (a solenoid) opens the valve when an electric charge passes through it, and the valve closes when the electricity stops.  A screw on top of the valve allows it to be opened manually if the electricity ever fails or if the user just wants to test the system without bothering to apply a current.

This is my set-up, unassembled.  Notice that there is no ball-valve.  The propane tank is just there for scale.  The brass device in the upper left corner is a pressure-relief valve.  It will open if the internal pressure exceeds 150 psi.  The PVC is rated to over 200 psi.

It's a black box with a red switch!  Doesn't it look ominous?!
My plan was to re-build the launcher completely from scratch, replace the ball-valve with a sprinkler system solenoid valve, and have a remote trigger of some kind that the students can hold and activate themselves.  I found the perfect trigger at an auto parts store: a toggle switch covered by a bright red plastic shield that has to be opened in order for the switch to be thrown.  I think it's intended for use with nitrous oxide systems, but I'm not certain.  It was perfect.  It was bright red, and it gave the impression of preparing to launch a missile like in old war movies from the '80s!

I assembled the PVC components in one afternoon.  The instructions on the cement I used to glue everything together recommended waiting a day before putting any strain on the joints, so with the down-time I began building the remote trigger.  One thing I was concerned about was battery life.  I was fairly certain that the solenoid valve would consume an enormous amount of electricity making for short battery life.  If someone left the firing switch in the "on" position for too long there wouldn't be enough charge left in the battery for more launches.  It's not hard to change a battery.  It's just unnecessarily wasteful.  I decided to build a timer circuit that would deliver electricity for a very short time and then stop even if the switch was still in the "on" position, saving the battery in case someone forgot to turn the switch back off.  For a timer I generally fall back on one of my favorites:  the 555!
This is the fully assembled launcher in launch configuration.
 The electronic components aren't attached yet.
I designed a timer curcuit using the NE555 in monostable mode.  An online calculator gave me the resistor and capacitor sizes I needed to time it for a half-second, and as I did with the feline behavior modification device I had previously built (in fact the circuits are nearly identical)  I used a faster R-C circuit to trigger the 555 as soon as power was delivered to the system.  It took me an hour to solder but several more hours to debug.  On my hand-drawn schematic I had reversed the positions of the trigger resistor and capacitor making the 555 run non-stop.  Once I had that problem ironed out I started assembling the timer, the trigger switch, and the power supply (a 9 volt battery) into a black plastic project box. 

The electronic components arranged so they can be seen. 
The red trigger switch is shown opened.
Here you can see how everything fits into the project box.  Obviously there isn't room enough for eight AA batteries.
At this point I discovered a problem in my design.  Some experimentation showed me that using a bicycle pump I could get the pressure in the launcher up to 70 psi with twenty pumps which was about as much effort as any reasonable person would probably want to put into launching a paper rocket.  It turns out however that the greater the difference in pressure between the high pressure side of the valve and the low pressure side the more energy is needed to open the valve.  The 9 volt battery I'd installed in the project box would fire the launcher if the pressure was below 50 psi, but if the pressure was any higher it just couldn't get the valve to open.  The difference in effect between 50 and 70 psi was very noticable, so I really wanted to stick with the higher pressure.  Some further experimentation taught me that 12 volts would open the valve at up to 100 psi (I really didn't want the pressures to get that high, but it was good to know), and I just happened to have an eight-cell AA battery pack in my random-crap box.  The eight-cell battery pack wouldn't fit in the project box though, so I had to re-design the circuit.

Ultimately I decided to keep the 9 volt battery in the project box to power only the 555 timer circuit.  That circuit didn't consume very much power, and I'd designed it to run on 9 volts anyway.  I only had to re-solder three connections on my circuit board to isolate the 12 volt launch circuit (It would have taken a few more to replace the 9V battery entirely).  The eight-cell battery pack I attached to the outside of the launcher with a pair of rubber bands so that the batteries could be easily changed when they got low.

I'm still learning the software I use to draw these schematics.  That explains the differences between this and my Feline Behavior Modifier.  The resistor-capacitor (RC) sequence is the simplest electronic timer.  The resistor slows the rate at which the capacitor charges resulting in a time that can be easily calculated.  I use them here to time the 555 and to trigger it.

I delivered the launcher at a meeting a few weeks later.  Our Aerospace Education Officer was delighted, and testing demonstrated that the device worked just as I had planned.  I should mention that I'm the Safety Officer of my squadron, and repeated testing of the launcher indoors (without a rocket on it) prompted some of the other officers to wonder if maybe they'd made the wrong choice in appointing me to the position of "Safety" Officer.  I'm not entirely certain I disagree.

What I learned:  I really need to spend some time thinking my projects through completely before I start assembling.  If I'd done the experiments testing how much power was required to open the valve at different pressures I would have known to design the timer circuit to run on 12 volts instead of 9 or at the very least I wouldn't have been quite so committed to putting a battery inside the project box.  I also need to think more critically when it comes to trouble-shooting.  When I had the components reversed on the schematic I wired the circuit the same way.  Rather than ever wondering if the schematic was wrong I just kept comparing the physical circuit to my hand-drawing and getting more frustrated because I couldn't figure out what was different.

All in all it was a good build.  It was 100% successful on the first launch, and nobody has been injured by it yet.  The entire project was completed in about two days, which is actually really fast for me.

A few things to note:  Around the country a few launchers similar to the one I built (using NASA's plans) have burst when pressurized even after years of safe use.  There are a couple reasons why this may be happening:  Since the launchers are used outdoors, presumedly during daylight hours, it's possible that ultraviolet radiation (from the sun) has weakened the plastic, lowering the burst point without warning.  Another possibility is that mechanical stress on the PVC, either from continuously pressurizing and depressurizing or just from normal wear and tear, has fatigued the PVC in much the same way a piece of metal will break if it's repeatedly bent back and forth.  No matter what the cause NASA has removed the designs from their web site and no longer recommends using this launcher for educational purposes.

Monday, June 18, 2012

A recurring source of inspiration.

Almost eight years ago exactly I was married to my lovely wife.  When we moved-in together she brought with her two cats, orange tabbys, brothers.  Although they're named after characters from the TV series Bonanza they have become known as "The Fat One" and "The Dumb One".  That's not to imply that the Fat One is particularly clever or that the Dumb One is particularly svelte, but it's a completely accurate description of the two brothers.  The Fat One outweighs a bowling ball, and the Dumb One could be (and has been) out-smarted by a grasshopper.

Cats adjust poorly to new homes.  It takes a long time for them to become comfortable in the new, unfamiliar environment.  Behavior issues often develop when an adult cat is moved.  These two idiots manifested their discomfort by turning the furniture into a surrogate litter box.  They pee'd or pooped on every upholstered surface to which they had access, but of particular interest to the two butterballs was my wife's papasan chair.  It seems they took turns making trips to the water bowl and back to the chair.  After only a month of repeated cleanings and efforts to appease or repel the cats there was no salvaging the cushion on the chair, and it had to be discarded to save the rest of the house from smelling like a dirty diaper.

Here they are in the chair in question.  Notice the size of the beast on the left is approximately that of a Thanksgiving turkey.

We replaced the cushion on the chair with a brand new cushion in the vain hope that if it didn't smell like cat urine they might not treat it the same way.  We moved the chair to a different part of the room hoping that they may forget it was there.  My wife even made a water-proof cover for it just in case the behavior continued.  Less than a day after the cushion had been replaced the accursed felines were at it again.  It took them less than a week to realize that the water-proof cover was just a cover, and first the Fat One and then his not-quite equally obese brother managed to slip under the cover and hose the cushion once more.

It was time for a new approach.

I collect random stuff.  When I go to a hardware or kitchen supply store I simply can't leave until I've looked at the clearance section, and more than once I've taken something home that I didn't need at the time with either the expectation that I might need it in the future or the hope that I could take it apart and learn something.  It shouldn't be a surprise therefore that I happened to have a motion-detector driveway light and a servo motor in my random-crap box.  I made a trip to the dollar store and Radio Shack to get everything else I needed.  My design: a motion detector to "see" the cats, a spray bottle to "discipline" the cats, and a servo to pump the trigger on the spray bottle.

It took a bit of experimentation get all the parts to work together.  I didn't want to have to build a servo-driver circuit in addition to everything else I was doing, so I modified the servo to be voltage driven rather than pulse-width modulation (PWM) controlled.  Servos are designed to only have 180 degrees of motion which would be just fine if I were using it as a servo rather than just a gear-head motor.  I modified it to make it turn continuously in either direction.  (I'll make a special post on how I modify and control a servo at a later time)  I made a special armature for the servo from a heavy washer and a small bolt since the factory armatures that came with the servo were light plastic that folded under the stresses involved.  The bolt stands straight out from the washer so that as the servo turns it keeps hitting (and depressing) the trigger on the spray bottle.

I didn't have to do much to the motion detector.  It's powered by mains current (110V AC house current), and when the passive infrared (PIR) sensor detects something the module passes mains current directly through to two light sockets (which I removed to expose the wires).  I had hoped to power the servo directly from the motion detector (through a step-down transformer of course), but the shortest time I could get the motion detector to go "high" (conduct current to the wires previously intended for the lights) was five seconds which was WAY more time than I wanted the spray bottle to be continuously spraying.

A 555 timer is a very inexpensive, sturdy, and reliable integrated circuit that can be used to deliver a direct current (DC) of 3 - 12 volts for a precisely controlled period of time that can vary from extremely short to surprisingly long (milliseconds to hours).  I use them frequently in my electronics circuits, so don't be surprised if they keep appearing in my blog entries.  I won't bother posting a full tutorial about 555s on my blog.  Quite simply there are many very well done tutorials elsewhere online.  I'll put some links to a few at the bottom of this post.

I had a 9 volt power supply that had previously powered a neck massager I'd purchased at a thrift store (and subsequently took apart to scavenge components).  The output wires from the motion detector I soldered to the primary winding of the transformer from the power supply so that each time the output from the motion detector went "high" (the motion detector detected something) the power supply could deliver a steady 9 volts to a 555 timer circuit.
I built a monostable circuit using a 555 timer, modified the circuit to trigger automatically as soon as it received power from the 9 volt power supply, and calibrated the resistor-capacitor (RC) series to run for about about three seconds (see the circuit schematic I used below).  At 9 volts the modified servo would rotate completely three times without a load.  I didn't want to risk burning-out the 555 timer, so to power the servo I had the output of the timer actuate an SPST solenoid through which the servo received power directly from the 9V power supply.

This is the whole system.  There is no schematic symbol for a motion detector, and I didn't feel like drawing out the entire circuit for it.  Some of these parts were simply what I had at the time I was building the circuit.   The capacitors in particular.


Long explanation shortened for the attention-span impaired: Motion detector detects something.  It passes 110 volts AC for five seconds to a transformer that steps the current down to 9 volts DC.  A 555 timer activates as soon as it gets power closing a solenoid switch for 3 seconds (instead of the full five seconds).  Electricity passes through the closed solenoid switch powering a gear-head motor (a modified servo) which pushes the trigger on a spray bottle two to three times in three seconds.
Astonishingly, it worked perfectly the first time!  I made a frame out of a piece of PVC pipe I cut and flattened, and I mounted the device on a camera tripod for stability and so the height of the sprayer could be adjusted.  The cats learned very quickly that getting on the chair meant getting sprayed with cold water.






I wish I could say that the intended result of the entire project (behavior modification) had been achieved.  Unfortunately while my contraption worked perfectly the noise made by the modified servo motor was obnoxious, and the massive field of view of the motion detector meant that is was regularly triggering when someone (human sized) walked behind the chair, around the chair, or pretty much anywhere in the same room with the chair.  My wife got into the habit of unplugging the device when she got home in the evening, and she would neglect to plug it back in when she left the room.  As a result what the cats learned was only that they couldn't get on the chair during the day, but in the evenings it was safe.

Project was ultimately a failure, but the device was a success.  That's better than many of my results.







Suggested links:

It's kind of like this: http://twolumps.net/d/20110330.html

555 tutorial - http://www.sentex.ca/~mec1995/gadgets/555/555.html

One way to mod a servo (not mine): http://www.instructables.com/id/How-to-modify-a-servo-motor-for-continuous-rotatio/

I love Wikipedia.  A quick lesson on motion detectors: http://en.wikipedia.org/wiki/Passive_infrared_sensor

Tuesday, June 12, 2012

Mea Culpa


Bad Blogger!  No followers!

I started this blog three years ago with the intent of documenting my projects.  Sadly, I'm terrible at documentation.  I really should be better at it.  I know how important it is to keep track of what you've done if only to keep from repeating your mistakes.  Unfortunately I'm one of those people who works on a project full-steam ahead sometimes without really thinking it through.  I don't want to stop (not even for meals) once I've found my momentum, and then I'm off to the next project occasionally without having finished the previous one.

What that means of course is that I have a bunch of half-finished projects sitting around collecting dust, and when I try to re-visit them I discover that I have no earthly idea what I was thinking when I was working on them originally.  Every now and then I find a scrap of paper with some cryptic doodle that I know was either a profound epiphany that occurred to me while at work or an attempt to solve a problem by drawing it out.  Unfortunately there being no organization in my workshop and no meaningful explanation on the scrap of paper their original value is mostly lost.

This changes now!

I will write something on this blog at least once a week.  If I can't come up with something pithy to say then it will probably be dry discussion of projects in progress or just my bench notes.  At least it will be something.

To say that I haven't been blogging as promised is not to imply that I've been idle.  I have in fact started and finished several projects since I created this account (started more than I've finished).  I'll try to make my first few posts a re-visit of past projects.  This will help me get into the habit of posting again, and since many of my projects have built on previous projects this should show how I've escalated from one disaster to the next (and how I've managed to repeat the same mistakes over and over again).