Bullet sensor build help

By the time the micro sees the pulse and runs the code that says "I saw it", the bullet will be 100 yards downrange.

I think this is exaggeration. :wink:
A busy-polling loop even on an Arduino should detect the passage of the projectile before it has travelled it's own length, given a fast enough detector.
Besides, it may not matter about latency, as long as the latency is consistent.

AWOL:

By the time the micro sees the pulse and runs the code that says "I saw it", the bullet will be 100 yards downrange.

I think this is exaggeration. :wink:
A busy-polling loop even on an Arduino should detect the passage of the projectile before it has travelled it's own length, given a fast enough detector.
Besides, it may not matter about latency, as long as the latency is consistent.

The experiment I did years ago... the distance between the rifle muzzle and the point where we wanted the laser to fire was 12 inches. At Mach 3 (the muzzle velocity of the .222 cartridge we were using), the bullet travels that distance in about 300 microseconds. How many Arduino instructions can you execute in that time frame (remember every Arduino instruction is a layer of C code underneath). Maybe the code in pure ASM would work, but not C.

Conversely, a 4538 dual timer has microsecond "resolution" and has only nanoseconds of propagation delay between triggering and timing. And it's simpler and costs less. Adjusting the time delay is a simple matter of turning a potentiometer.

Simple is always better.

How many Arduino instructions can you execute in that time frame

4800

remember every Arduino instruction is a layer of C code underneath

Some are 1:1.
So, a bit read and a conditional jump.
Two instructions, three cycles, 187.5 ns.
A shade under two tenths of a millimetre at 900 ms-1

Edit: Sorry, bit test and unconditional jump, up to five cycles, 312.5ns, so just short of three tenths of a millimetre.

If you are going to attempt to detect the bullet using reflected IR, here is some advice:

  1. You need an IR emitter with high radiant intensity. The output of an IR emitter is usually quoted in mW/Sr where Sr is a measure of solid angle. Narrow beam emitters naturally have higher radiant intensity than wide angle emitters. So go for a narrow beam high intensity IR emitter (assuming the bullet path is predictable) such as http://uk.farnell.com/vishay-semiconductor/tsal5100/ir-emitter-2-6v/dp/1469615, not the sort used for TV remote controls. You may wish to use several IR emitters.

  2. For detecting events of this speed, a PIN photodiode is better than a phototransistor. The disadvantage is that it needs more amplification; however the rise and fall times are much faster, around 1us is not hard to obtain.

  3. Shield the detector from extraneous IR. However, scattered light from the muzzle flash may be a serious problem, even if the muzzle flash is well out of sight of the detector.

IIRC, my crono doesn't have an emitter, just detectors. I think it uses photoresistors, and watches for the drop in light caused by the shadow of the bullet passing over the sensor.

My crono is also about 20 years old; technology may have changed. Still works, though.

-j

Hello all, first off--I'd like to thank you for all the great suggestions! Some clarifications on what I'm trying to achieve; I'm not planning to use it as a camera trigger but as a target at a gun range which keeps score via the Arduino everytime a bullet is accurately fired into a given target area covered by the IR sensors (1 foot square or so).

@jackrae: I contemplated the sound sensor as well, however, I only want the device to trigger only IF the projectile passes within a defined target area. Also, if there are other people shooting in the area as well, there may be false triggers. What do you think?

@Krupski: I plan on having the sensors be placed at least 5-10+ yards/meters away from the muzzle; so we should be able to rule out muzzle flash. Was that the only thing that made your first attempt (with the IR LED and detector) fail?

@dc42: The bullet path will be predictable but within a square foot box/ring if you will. Great suggestions! The IR emitters in the link you sent are much cheaper and have an even faster rise and fall time than what I originally found! I think you're right that I should have multiple emitters to provide as much IR illumination as possible since the projectile is travelling so fast and is a relatively small object. Perhaps multiple detectors would further help as well? Would you suggest this photodetector: http://www.newark.com/jsp/search/productdetail.jsp?SKU=32C9136

@kg4wsv: very interesting that all your chrono needed was to watch for a drop in light. I'm wondering how far above the sensors the bullet can be as still be detected.

Yes, that photodetector looks a good one to me. You can connect several of them in parallel.

dc42:
Yes, that photodetector looks a good one to me. You can connect several of them in parallel.

Great, thanks! I order a dozen of each and will report back with my results. Thanks for the tip on Element 14; saved me over 50% off what I would have paid over at Mouser with better parts no less!

btw there are 2 ways you could attempt to detect the bullet:

  1. By illuminating the area with steady IR and looking for a fairly sharp change in the received IR.

  2. By modulating the IR and using a synchronous detector to look for received IR at the modulation frequency. Since the bullet will only be over the sensor for about 20us, you would need to use quite a high modulation frequency, say 500KHz (which is about the maximum possible, given the 800nS rise/fall time of the emitter). This approach should be less sensitive to muzzle flash.

I was originally planning on using the continuous illumination method and hoping to capture an IR reflection off the bullet as it passes up to a foot above the photo diode. Do you think this would work? Also, do you think that the 20us or so the bullet reflects above the photo diode would be sufficient to trigger a digital pin on an Arduino?

Also, do you think that the 20us

Think of it as 320 instruction cycles.

AWOL:

Also, do you think that the 20us

Think of it as 320 instruction cycles.

So at 16Mhz, the Arduino is capable of handling 16 Million cycles per second, right? Then I'd say it'll do, lol. Thanks, AWOL.

The straight-line speed is 16 million instructions a second, but like most things, bends (or branches) slow things down.

velocity101:
I was originally planning on using the continuous illumination method and hoping to capture an IR reflection off the bullet as it passes up to a foot above the photo diode. Do you think this would work? Also, do you think that the 20us or so the bullet reflects above the photo diode would be sufficient to trigger a digital pin on an Arduino?

The continuous illumination method is simpler so it's worth trying first. The best way to trigger the Arduino is probably to use a rising or falling interrupt, that way it can response to very short pulses.

The best way to trigger the Arduino is probably to use a rising or falling interrupt, that way it can response to very short pulses.

Ah, good idea. Thanks!

You probably need very bright light on a very reflective bullet over a very dark background to detect it.

Another approach is to use an aluminum foil and glue a sound sensor to it. The bullet would breach the foil and the sensor (pizeo) would pick up that breach. It needs a very quiet background.

very interesting that all your chrono needed was to watch for a drop in light. I'm wondering how far above the sensors the bullet can be as still be detected.

The window is a triangle about a foot or 18" tall.

I just visited the manufacturer's web site (not much hard data there), looks like some of their newer models include IR illuminators, so it's watching for a reflection rather than a shadow. The older passive models are still available.

-j

kg4wsv:

very interesting that all your chrono needed was to watch for a drop in light. I'm wondering how far above the sensors the bullet can be as still be detected.

The window is a triangle about a foot or 18" tall.

I just visited the manufacturer's web site (not much hard data there), looks like some of their newer models include IR illuminators, so it's watching for a reflection rather than a shadow. The older passive models are still available.

-j

Great! So this is essentially what I'm trying to achieve! Good to know the approach I plan to take is feasible.

Air gun bullet detector / sencor. I'll take pictures of air gun bullets and have therefore tested a lot Ir interupt, photo gates, laser triggers, piezo triggers and sound sensors. None of them are fast enough and stable enough for a modern air rifle. Then I came across this link which shows an old-fashioned transistor controlled interupt. It was a success !!

(I have no SCR, but it works just fine with a BC337 transistor instead of SCR).

http://www.hiviz.com/tools/triggers/triggers3.htm