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 ads by
Signing UpStep 1Overview of Operation
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.
| « Previous Step | Download PDFView All Steps | Next Step » |











































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.
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.
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.
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.
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.