A ballistic chronograph is a device that records the velocity of a projectile. This particular chronograph I have made has only been tested with a paintball gun and it is relatively simple to make. I have also implemented a function that can record the rate of fire at which a device is firing.
Note:
Seeing as you will be using a device that shoots projectiles at high speeds to test this chronograph, use your head and be smart. Follow all safety procedures and guidelines that pertain to the use of the paintball marker or other device that you are using to shoot projectiles.
Remove these ads by
Signing UpStep 1: Electronic Requirements
Here is a list of the following electronic components required:
- 2x 47µf Electrolytic Capacitors
- 2x 0.1µf 0805 SMD Capacitors
- 1x 0.01µf 0805 SMD Capacitor
- 1x 0.01µf Ceramic Capacitor
- 2x 27pf 0805 SMD Capacitors
- 2x 10kΩ 0805 SMD Resistors
- 2x 2.4kΩ 0805 SMD Resistors
- 2x 470Ω 0805 SMD Resistors
- 1x 150Ω 0805 SMD Resistor
- 2x 100Ω 0805 SMD Resistors
- 1x 4.7kΩ Trim Potentiometer
- 1x 1N4148 Diode
- 1x LM7805 5v Regulator
- 2x TSOP4838 IR Detectors
- 2x IR Transmitters
- 2x Female 2-pin Molex Connectors
- 2x Male 2-pin Molex Connectors
- 1x 5-pin Header
- 1x MMMBT2222A General Purpose Transistor
- 1x 12MHz Crystal
- 1x Tactile Switch
- 1x Rocker Switch
- 1x PIC18F13K50 SOIC Microcontroller
- 1x 16x2 LCD Display
- 1x 9v Battery Clip
Most of these components I had already had on hand, but I would estimate the cost of this project to be around $30-$40. I have not shown any of the SMD components (except for the PIC) in the photo below.
Edit:
I have gone and posted print screens of some places where you can buy the components. Some components couldn't be bought as 1 or were cheaper in higher quantities, that's why you may see some extra parts in the pictures. Many of the parts can be bought at a good price at www.dipmicro.com. I will tag the cost of each product in the photos below. With all of these parts, not including the board, it came to $38.11 to purchase all the components for this chronograph with all shipping included except for the PIC18F13K50 bought at Digikey. Then it would be a couple more bucks for the PVC pipe. Also, if you want to save $3.39, you can buy 16x2 LCD Displays on eBay for $2.99 including shipping.














































Visit Our Store »
Go Pro Today »




Either fix it or delete this mess.
¿Como podria programarlo? Gracias por todo un saludo.
Gracias?
I will be building this and the layout files would help a lot.
Cheers
Cheers,
Regax
http://www.radioshack.com/product/index.jsp?productId=2906724
PIR Sensor Module then limiting it's field of vision to a slit.
it totally ment nothing to me
how about i buy that one of you ?? ;-)
Here is a nice program from Microchip that will narrow the results down to based on what you need in a PIC.
A pretty common chip that you could use would be a PIC18F2455, however you will have to modify the driver files for that device or else replace my driver files with microchips driver files.
Cheers,
Jeff
If you have better lighting when you take those electronic and tools pictures, it would look even more pro! CFL lighting works great. (coolwhite or daylight) You can also play with the setting of the camera before taking a picture.
Keep it up!
To decrease the intensity of the IR beams you can add larger resistance values for R4 and R5. Or else you may be able to decrease the PWM frequency from 38KHz to something a bit smaller, which will decrease the sensitivity of the IR Detectors. If you go too low though, they won't detect a beam at all.
Cheers
I like how easy and straight forward it is!
But I have a question, you write "The PIC is setup to run at 48MHz. It takes 4 cycles to perform one instruction..." I think one instruction is like one loop? One time going through the whole script? How did you find out how many cycles it takes to run the script. Is that a given characteristic of the PIC or is it depending on the length of your script and how complex it is?
Well thanks a lot.
keep it up
Shah
An instruction is like a command, it allows you to tell the micro what you want it to do. Normally, one would think that if this micro was running at 48MHz, it could execute one command every clock cycle, which is equal to 20.83333ns (1 / 48MHz). However, that is not the case. I won't go very deep into it, but due to the way that the microcontroller is built, it takes 4 clock cycles to perform one instruction cycle. That's how we get 12MIPS, (1 / (20.83333ns * 4 clock cycles)). Now every instruction that the microcontroller can use takes at least one instruction cycle, some take more.
For example, If I wanted to turn an 'active high' LED on that is located at RB0, I could write this:
PORTBbits.RB0 = 1;
That is 'C' code. This is a higher level language, which means it is easier for the programmer to use. All a C compiler does is it converts your "easier to read and write" C code into Assembly Language Code. An example of what the above C code would convert to in ASM (Assembly) is below:
BSF PORTB,RB5,A
This instruction tells the microcontroller "Set bit #5 on PORTB high", which would turn on the LED. If you look in the PICK18F13K50 data sheet (link added below), starting on page 309 is the detailed part of all the ASM instructions. Here you can see how many instruction cycles it takes to perform any of the listed instructions. The above "BSF" instruction only takes one instruction cycle, which is 83.3333ns with this projects configuration. So you could go and look at the disassembled C code for this project and figure it out by hand how much time a section of code will take to execute, or you could do like me and just use the MPLAB simulator.
Its kind of confusing to wrap your head around I know, but if you don't fully understand it, you can just use the MPLAB simulator and its stopwatch which will do all the calculations for you.
Heres a link to the datasheet:
http://ww1.microchip.com/downloads/en/devicedoc/41350c.pdf
Sorry for the long, confusing explanation. I don't know if this helped, I am a bit better at explaining things in person haha