Instructables

Chronograph for Air Cannon

This chronograph project consists of a sensor assembly and timer circuit box that can be used to measure the muzzle velocity of a projectile fired from an air cannon. 

I originally built this setup for use with a large air cannon with a 3" bore.

The sensor assembly is attached to the end of the air cannon barrel. It contains infrared sensors used to detect the passage of the projectile. A microprocessor measures the time it takes for a projectile to travel a known distance and displays it on an LCD. From this information, the velocity can be easily calculated.
 
Remove these adsRemove these ads by Signing Up

Step 1: Overview of Operation

Picture of Overview of Operation
Below is a block diagram of the timer box and sensor assembly system. The sensor assembly is shown at the bottom of the diagram, with a round projectile traveling through it. The functional blocks within the grey box are located on the PCB. The switches, connectors, and LCD module are mounted on the case of the timer box.

The sensor assembly consists of a length of 3” diameter PVC pipe, with the two IR sensor pairs mounted 6 inches apart. The sensor assembly has a threaded fitting on one end, which allows it to be easily connected to another threaded fitting on the end of the barrel.

The timing circuit initially monitors the first sensor, waiting to detect that the beam has been broken by the projectile. After the first beam is broken, the processor starts an internal timer to record the time that has elapsed since the beam was broken. The software then begins monitoring the second sensor. When that beam is broken, the timer will be stopped. The processor then displays the time elapsed between the breaking of the beams on the LCD.
jj.inc3 years ago
How do you get the files onto the chip, I have never done anything like this but really wan't a chronograph for, luck me, my 3inch air-cannon barrel. I also looked up the chip, but it says it is 20MHz not 4MHz, or are those separate things.
LargeMouthBass (author)  jj.inc3 years ago
You will need a PIC programmer to program the code onto the microprocessor. These can be ordered from many places. I got mine from a company called Melabs at www.melabs.com.

You can also build your own programmer, but I have never tried it. There are instructables on how to build PIC programmers.

The 20MHz spec refers to the maximum clock frequency that can be used. The chip also has an internal oscillator that can be used for the clock. The internal clock can be configured for a few different speeds, and this one uses the 4MHz speed. The internal clock generator can clock as fast as 8 MHz.

The internal oscillator is handy, as it eliminates the need for the external oscillator. One small drawback is that the internal oscillator is not nearly as accurate as a crystal or other external oscillator chip. The interenal oscillator can be off by as much as 2%, but I used it here because it still gives good results.
Thanks, I found a microprocessor with an internal crystal, would that be more accurate and get rid of the 2% or is still going to be less accurate. Also do you know where there are some good guides on learning the PIC language.
LargeMouthBass (author)  jj.inc3 years ago
The programmer from Sparkfun that you link to below should work.

When I was learning the PIC assembly language, I started with materials from Microchip's own site. At that time at least, they had some good material that covered alot of the detail of the 8 bit families of micros they offer.

Their site also has a large number of interesting application notes, some of which have assembly code with them.

And of course there are books and tons of other web resources. I have never read any of the PIC books so I can't comment. Many folks use C language tools for writing code, but I have never used C.

The PIC assembly language for the 8 bit micros has only 35 instructions, and the datasheet for each processor contains a section describing them, so the processor datasheets themselves are a good reference.
Thanks
jj.inc jj.inc3 years ago
I bet I have to get one of these right http://www.sparkfun.com/products/9667
jj.inc3 years ago
Will any 18 pin PIC micro controller work (with all of the files you have w/no modification)
LargeMouthBass (author)  jj.inc3 years ago
I can't say that they would work with absolutely no modification. Any PIC that you would plan to use as a subsitute would have to have the same features as those utilized in this program. I am using the Timer0 peripheral, and the 4MHz internal oscillator.

So there are several other 18 pin PICs that could be substituted with very minor changes to the code, and possibly some that could be used without any modification. I can't say off the top of my head if there are any that I am 100% sure can be used as direct subsitutes. If you are familiar with the PIC assembly language you could relatively easily modify the source code to a different PIC that met the requirements.
profpat3 years ago
this is nice, will try to modify it so that i may use it on airsoft or airguns! ty
kebmoore3 years ago
I have been thinking about building my own air cannon, and I want to be able to measure the performance of various valve designs I have in mind. I thought that a commercial chronograph might be the only solution, but now there is another option. Great job, and thanks for the inspiration.

By the way, have you considered making instrument packages to launch from the cannon? Something like an accelerometer with a data-logger to find out how much the projectile is getting “punched” by the launch. Maybe a timing circuit to trigger recovery devices or other activities. Launching potatoes and baseballs might be only the start.
LargeMouthBass (author)  kebmoore3 years ago
Yes, as a matter of fact I have pondered many different payloads I could launch from an air cannon. I am working on a rocket like projectile that will return via a parachute. Ideally I'd like the parachute to deploy on its own, with the nose cone and chute just falling out, without anything needed to eject it like with common model rockets. So far I can't get the chute to deploy conistently.

Another project I'm working on it similar to the chonograph. It is a special barrel for the 1.5" diameter gun, with photosensors located every 2" along the barrel. That way, I could get a reading of acceleration during lauch that I could use to evaluate the effects of valve, tank pressure, etc.

Lots of fun projects spawned by air cannons, but always too little time.