SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Variance
#113694
A project I've been considering as of late is a sort of interactive target (archery, shooting, darts, etc) that can triangulate the point of impact of the projectile in question. I was hoping to accomplish this using a PIC MCU (18F2550's are what I currently have on hand) and relatively inexpensive sensors. From the research I've done so far, I was thinking of using 4 accelerometers, vibration sensors, or microphones situated in the corners of the "target". Using the MCU, I would save a timer value for the instants at which each sensor experiences the acceleration/vibration/sound of the impact, calculate the phase delays between the sensors, then use these calculated values in some sort of algorithm to triangulate the POI on the target.

However, I've been having difficulty deciding on what type of sensors would work best for this application. Microphones are inexpensive, but there would be the issue of ambient noise, as well as other interference (such as the muzzle report and/or sonic crack of a gunshot). Because of this, I was leaning towards accelerometers or vibration sensors, but you all are much more knowledgable and experienced than I.

As for the software/math side of things,beyond finding the phase delays between the sensors, I'm somewhat lost on how I would go about triangulating the POI. Unfortunately, while my research has provided me with some theory behind what I hope to accomplish, I have found very little actual applications to which I can reference. Because of this, any direction that someone could provide would be extremely beneficial.

Thanks in advance for any advice or guidance!
By Kalagaraz
#113699
Variance wrote:A project I've been considering as of late is a sort of interactive target (archery, shooting, darts, etc) that can triangulate the point of impact of the projectile in question. I was hoping to accomplish this using a PIC MCU (18F2550's are what I currently have on hand) and relatively inexpensive sensors. From the research I've done so far, I was thinking of using 4 accelerometers, vibration sensors, or microphones situated in the corners of the "target". Using the MCU, I would save a timer value for the instants at which each sensor experiences the acceleration/vibration/sound of the impact, calculate the phase delays between the sensors, then use these calculated values in some sort of algorithm to triangulate the POI on the target.

However, I've been having difficulty deciding on what type of sensors would work best for this application. Microphones are inexpensive, but there would be the issue of ambient noise, as well as other interference (such as the muzzle report and/or sonic crack of a gunshot). Because of this, I was leaning towards accelerometers or vibration sensors, but you all are much more knowledgable and experienced than I.

As for the software/math side of things,beyond finding the phase delays between the sensors, I'm somewhat lost on how I would go about triangulating the POI. Unfortunately, while my research has provided me with some theory behind what I hope to accomplish, I have found very little actual applications to which I can reference. Because of this, any direction that someone could provide would be extremely beneficial.

Thanks in advance for any advice or guidance!
Microphone idea sounds like a good project to test out. Here's how I would test it. Put a microphone in all 4 corners and under a controlled test (with something that makes a sound at same decibels every time) measure microphone received decibels at closet point to microphone and farthest point from microphone on target.

For example: Say you have microphone in top right corner of a square target, put a buzzer in top right corner right beside microphone and measure microphones input (random numbers, lets say its 4 decibels). Then using same buzzer measure decibels at bottom left corner (lets say 2 decibels). Now we can tell how far arrow hits from microphone 2 decibels it's sqrt(width^2 * height^2) decibels away. If it's 3 decibels it's half that distance away. You'll have to map out the conversions of course, won't be even numbers like that :).

Do that for all 4 microphones (only 3 needs to determine point, use 4th for error correction just in case something makes 1 microphone give a false reading). Now imagine the distance read by each microphone as a radius and draw a circle with that radius with microphone in middle. Do that for all 4 microphones and there should only be 1 point where all 4 circles intersect, that's the point of impact.

To correct for ambient noise:

Add a vibration sensor then continually sample the microphone decibel levels, then when vibration sensor goes off grab the data 1 second before and 1 second after impact (gotta do before and after because different target materials may allow vibration sensor to go off before sound reaches microphones). Average the levels, and then use that to triangulate. You'll have to tweak the timings. Could be 2 seconds before or 2 seconds after or less. Also timings for sample rate, grab decibel levels every 500ms,400ms,300ms etc... higher sample rate, higher accuracy, higher memory requirements.

Of course, I'm an *** and will aim at your microphones...
By busonerd
#113704
How about piezo transducers - those things are quite sensitive: a simple amplifier, peak follower and comparator should do; [feeding a timer/counter, that is]

Re: Volume levels, I don't think volume levels would be an accurate way to measure impact position. Propagation time, as was originally proposed, would be much better.

--David Carne
By tician
#113756
I have actually been working a bit on a similar project using some of these: http://www.sparkfun.com/products/9196 to locate the impact of either a finger or airsoft bb on a sheet of plexiglass. Multi-use as inexpensive large format touch (more correctly 'tap') screen for my LCD monitor as well as interactive target practice (think 'duck hunt' with airsoft).

For finding a point using differences in time of flight between receivers, see:
http://en.wikipedia.org/wiki/Multilateration

The page numbered 45 (actually 48 of the pdf) lists one of the example uses as part of a scoring system for an electronic dart board. Only thing is, their use is with one sensor behind each individual segment of the target board (operating as simple impact switches instead of multilateration).
http://www.sparkfun.com/datasheets/Sens ... echman.pdf

He used some repurposed piezo speakers, but... http://www.instructables.com/id/A-posit ... -drum-pad/

[EDIT]
I cannot spell.
By Variance
#113800
busonerd wrote:How about piezo transducers - those things are quite sensitive: a simple amplifier, peak follower and comparator should do; [feeding a timer/counter, that is]

Re: Volume levels, I don't think volume levels would be an accurate way to measure impact position. Propagation time, as was originally proposed, would be much better.

--David Carne
David,
I had never heard of peak followers or comparators before, after looking them up, it definitely seems like a promising possibility. One of my primary concerns with this project idea has been the accuracy of the time samples, due to the speed of sound and lack of parallel ADC sampling on my MCU. Would you happen to have any bits of wisdom gained from personal experience with these types of circuits/chips that you could share?
tician wrote:I have actually been working a bit on a similar project using some of these: http://www.sparkfun.com/products/9196 to locate the impact of either a finger or airsoft bb on a sheet of plexiglass. Multi-use as inexpensive large format touch (more correctly 'tap') screen for my LCD monitor as well as interactive target practice (think 'duck hunt' with airsoft).

For finding a point using differences in time of flight between receivers, see:
http://en.wikipedia.org/wiki/Multilateration

The page numbered 45 (actually 48 of the pdf) lists one of the example uses as part of a scoring system for an electronic dart board. Only thing is, their use is with one sensor behind each individual segment of the target board (operating as simple impact switches instead of multilateration).
http://www.sparkfun.com/datasheets/Sens ... echman.pdf

He used some repurposed piezo speakers, but... http://www.instructables.com/id/A-posit ... -drum-pad/

[EDIT]
I cannot spell.
tician,
Very cool to hear that you're working on something similar in theory; how has your progress been? I appreciate the heads-up about multilateration, as most of the research I have been doing was on triangulation and trilateration, which didn't get me very far. Unfortunately, while I was able to work my way through the arduino code for that midi pad project, I got lost in the python. It seems like he's comparing the magnitudes of the readings to calculate a position? I'm not sure if that would be accurate enough for my application, or if my MCU would even be powerful enough to crunch through the algorithm.

The more research that I've done, the more it seems that sampling resolution/timing is the primary hurdle on this project. Because the sound would travel so quickly through the material of the target board (~3400 m/s for wood), even sampling at 10kHz could theoretically produce an error of over 30 cm...
By tician
#113880
Actually, now that I have finished reading through his code, I think he is using the piezos more as strain gauges than as sound wave pickups. The closer to a given piezo the user hits the pad, the more said piezo is compressed. The more it is compressed, the larger the voltage difference it produces at the analog input. I think he then uses the relation between the voltages of the four piezos (a function of their compression, and thus the location of the drum strike) along with calibration data to estimate the position of the strike.

I have not had too much time to actually test the sensors yet, but I have not really expected much of a voltage to be produced by the transmitted sound waves (going to start out by taping the entire film piezos to plexiglass with kapton, but this may not work too well). So, my thought was to use analog amplifier stages to get a usable (rectified/half sine wave) voltage to use with the external interrupt pins of a microcontroller. If this is actually possible, it would potentially allow the use of the main clock for timing. Of course, I have not actually tried any of this yet.
User avatar
By thebecwar
#113895
Are you trying to measure a bullet impact, an airsoft/bb impact or an arrow/dart? Since the kinetic energy expended in the target for each of these possibilities varies by several orders of magnitude it may be impossible to measure them all with one setup.

For something like an airsoft/bb impact you could always build yourself a scaled up 'touchscreen' using thin plexiglass. (As mentioned by tician)

You could also create a laser mesh, and measure the impact by which beams are broken. This way would allow your target to be made of expendable materials, and allow your target to be penetrated by the projectile. (A FMJ rifle bullet impacting a steel target is an amazing level of destruction.
By tician
#113916
If the piezo does actually sense the vibrations of an impact, the analog system I poorly described before (forgot about an analog comparator between the amplification/filter stages and the interrupt pin) should have only a minimum threshold for impact energy (based on amplification and comparator reference). Set it to detect the lowest energy projectile you plan to use and all others should register just as well. A big problem though would be the increased duration of echos after the higher energy impacts, but then you could just change the amplification/comparator reference and software limits (wait a minimum time between discrete impacts to hopefully ignore most echos not previously filtered) to match the new rounds.
I really need to start building this project, I have procrastinated enough already.


While a light based system would be ideal for sensing highly destructive projectiles, a high speed camera might be cheaper/easier and certainly more fun than a laser grid capable of detecting and locating a high velocity rifle round.

Using a single laser paired with a single photodiode for each index of an axis of the grid would get pretty expensive pretty quickly as you increase the size of the sensing area or its resolution. A 1cm diameter projectile through a 50 x 50 [cm] square sensing area would require a minimum 100 laser/photodiode pairs for x and y positioning. You could possibly reduce this number at the cost of lower resolution by using mirrors to cause the single beam to form a zigzag pattern to cover a larger area, but the cost of mirrors (and the pain of alignment) might cost as much (or more) than buying more cheapo laser pointers.