A chronograph is a device used to measure the speed of a passing object.  In it's simplest form, this involves two sensors of some kind that 'see' the object, some device that can measure time, and some output to deliver the data to the user.

In this instructable, I'll be showing how I designed, programmed, and built a device like this with a couple extra handy features to make it more versatile than the one at your local paintball field.  But first, a little background...

I was experimenting with home made rocket motors (purely for weekend entertainment,) and a buddy and I started talking about optimizing the fuel mixture.  We quickly realized that we could never estimate the performance anywhere near accurately enough to be able to get any meaningful data about the effects of small changes to the fuel ratio.  The conversation then turned to measurement techniques.  It wasn't long before I was thinking sensors, counters, and LEDs!  The original idea was to use a counter driven by a 555 oscillator that starts when the rocket passes one sensor and stops when the rocket passes the second sensor.  Then simply display the status of the counter on a bunch of LEDs in binary...

OK, that could work, but I'd have to take a calculator with me for every launch.  Then there's the trade off between simplicity and accuracy.  A fast oscillator would be more accurate, but would require at least 2 or 3 counters cascaded to count all the pulses during the short time the rocket is between the sensors.  One counter can do the job, but only if the oscillator is slow enough that the counter doesn't overflow... I abandoned that idea immediately.

I had a few AVR Microcontrollers lying around (an arduino too, but building your own target system is better on every level.  I'll save that argument for another day...) and I realized that one of them could do the job perfectly.  And I wouldn't even need a calculator!  At that moment I started seriously designing this project and this instructable was born.

A Quick description of how it functions before we move on:

Two 12VDC photo sensors (projector/receivers with reflectors) detect the rocket, or kid, or ballistic fruitcake, or whatever you want to clock and send a signal to the two external interrupt pins on an ATMega328P through transistor buffers (we'll get into interrupts and stuff later, promise.)  The sensors I'm using are Omron E3F2-DS10B4-P1's.  These are easily the most expensive component, but I was able to borrow a pair of them for the developement and testing of this circuit.  Any device that can detect your target object and send a signal out will work fine though.  The circuit I show here works with the 12VDC from these sensors, but with a little modification it can also work at other voltages equally well.

The ATMega measures the time between the interrupts, reads the user defined distance between the sensors from some DIP switches, does all the math, reads the user defined output units (MPH, KPH, etc...) from more DIP switches, and finally multiplexes the output to three 7-segment displays through a single 74LS48 BCD to 7-segment decoder. 

Doesn't sound too bad right?  Well, all but the fruitcake anyway...

The sensors can be anywhere from 1 to 16 feet apart, and the output can be in miles/hr, kilometers/hr, feet/sec, or meters/sec.  The distance setting for the sensors allows the user to change the minimum and maximum measurable target speed without having to reprogram the chip.  This comes in handy when, after flying a rocket or two, the kids want to race their bikes...  There is still issue of timer overflow, and the variable distance is one way to somewhat get around it.  There is another way that I also used that I'll talk about later: timer prescaling.

This instructable is (hopefully) to be all inclusive.  Every step in the process will be discussed in detail from designing the hardware, to programming the AVR, to drawing the schematic and circuit board layout, to finally etching and soldering the board.  All of the software I use is completely free and very functional.  Atmel studio 6 is for the AVR development and ExpressPCB is for the schematic and board layout. Therefore, all screenshots and procedures will be based on these software.  There are other equally free and, arguably, more functional options out there, so choose what's best for you.  On the hardware side, I'll be using an AVR Dragon (~$50) for programming, a breadboard for prototyping, and hopefully a computer with a USB port goes without saying :)  

********A complete tools, materials, and parts list will be posted on step 11*******

By the way,  the AVRDragon requires at least a 6-pin ribbon cable to do the programming.  It'll need a 2x3 female header on each end (2.54mm.)

As for etching the board, I used a pre-sensitized double sided coper clad board (1oz, 1/2oz would be ok,)  some positive developer to remove the exposed photoresist, and ferric chloride to etch the copper.  I've never used the toner transfer method, so I'm not sure if the small traces would come out clean with that technique.

More on etching later.  First, lets just have a look at the schematic...

Step 1: Schematic and breadboard

This picture shows the schematic in its entirety.  In the next few steps we'll be looking at sections in more detail so that everything will be clear.  

You can see here that there is a 6 pin header included for programming (ISP6.)  This will be used for the initial development and programming of the AVR, as well as installation of any future firmware modifications.  in the next step, I'll start with the basic connections to make the AVR run and accept a program.  After that, we will build out to include all the I/O one piece at a time.  

If this looks complicated, don't worry.  I'll try to make it as clear as possible.  If it looks simple, go ahead and breadboard it sparky!

I've included a pic of the breadboard as it looked before some of the later options were added.  It's functional, but not complete.  It should give you a clear view of what things should look like.
the reason I ask I'd b/c the oehler 35p chronograph is the best a available for measuring bullet velocity but it's $575..you can buy their sensors for $45 apiece but they don't sell the control unit that displays vel. could a display be built for these sensors or would it take a specific interface or software to read the data from the sensors? http://www.oehler-research.com/cgi-local/SoftCart.15.exe/online-store/scstore/p-SS3.html?L+scstore+nyvm3497ff984098+1380622273
what are the velocity limits of your chronograph, what is the fastest and slowest speed it will measure, what is it's accuracy? could it be adapted to measure muzzle velocity of firearms? how much would it cost to build this buying everything, minus tools?
I designed this thing to be reasonably accurate in the 20-400Mph range. It will actually give a reading to 999 in any of the select-able units (Mph, Kph, etc...) but I have not calculated the amount of error at those speeds. It would be possible to increase the distance between the sensors and change the math accordingly to decrease error. The program as written allows for variable sensor distance as detailed in the -ible.<br> <br> There are a couple of problems when adapting this to measure objects moving as fast as (and as small as) bullets...<br> <br> First, you'll need another 7-segment display so numbers as large as 9999 can be displayed. For example, a 9mm round can reach speeds of 1250Fps which cannot be displayed on 3 digits. Even in Mph (852Mph) this is dangerously close to the 999 limit if the display. So, a 4 digit display is a must. &nbsp;This would require rewriting the program to handle the extra digit and reworking the board layout for the added hardware. &nbsp;I wrote a version of this program using a 4 digit display for someone a while back, but I never tested it and I never made a new schematic or board layout.<br> <br> The other problem is finding sensors that can reliably detect the passing bullet. The sensors I used would not be able to see something that small, so a different solution would have to be engineered.<br> <br> The sensors are easily the most expensive part in the project. (I assume an AVR programmer and PCB etching supplies qualify as tools...) The on-board components are fairly cheap and you could probably get everything less than $30. The screw terminals, displays, and the AVR chip are most costly. I didn't keep track of component cost because I had most of them in stock on my bench already.<br> <br> I built this mostly as a &quot;to see if I can do it&quot; project. It might be more efficient for you in time and money to just buy a ballistic chronograph. I've seen them for about $200. If you consider that my sensors run about $100 each... $200 isn't that bad...
When I have more Time I am going to read this more carefully.
You and I are both pressed for time. <br>I too would like to study and understand this excellent ible, <br>before the the next cool one to get posted. <br> <br>Happy Holidays to you <br>from Reno the 5th best family winter vacation town in USA this year, <br> <br>A
wow, so much great info here! will you be posting the rocket as well?
Thanks! I hope many people find something useful here.<br> <br> I'm not planning to post anything about the rocket because it has already been posted here, and&nbsp;I actually got the idea here.&nbsp; I am thinking about doing something dedicated to multiplexing microcontroller inputs with a 74LS157 IC, and maybe a frequency counter or whatever else I may come up with next.&nbsp; I'm not sure yet.<br> <br> The rockets&nbsp;are almost exactly what can be seen here:<br> <a href="http://www.instructables.com/id/How-to-Make-Small-34in-PVC-Sugar-Rocket-Engines/" rel="nofollow">http://www.instructables.com/id/How-to-Make-Small-34in-PVC-Sugar-Rocket-Engines/</a><br> <br> I didn't use the kit referenced in the video though, and my nozzle hole was smaller.

About This Instructable




More by mofoya:AVR Chronograph from concept to PCB Make your guitar's humbuckers switchable to single coils VHT Special 6 Ultra channel switching mod (inc. footswitch) 
Add instructable to: