![]() |
Forum Index : Microcontroller and PC projects : Gunshot Locator System
Author | Message | ||||
redrok![]() Senior Member ![]() Joined: 15/09/2014 Location: United StatesPosts: 209 |
Hi Guys; I'm interested in constructing a "Gunshot Locator System". I've been thinking about this because I live in a rural location and hear gunshots all the time, maybe 20 or 30 on a weekend. I assume these are from hunters and target shooters. Don't get me wrong, I'm not fearful of this, just interested in the technology. My plan is to design the components and learn how it can be done. I like a project that is sufficiently hard to do to keep my interest and also have a useful application. Concept: 1. At least 3 sensors located several hundred yards apart. 2. Each sensor has a low cost GPS used for 1 second timing tic reference. The GPSs time tics are inherently synchronized with high precision no mater where they are located or how far apart they are. 3. Each micro, assuming a uMITE II, listens to the microphone peak detector and starts a timer. 4. When the GPS tic arrives the timer is stopped. 5. The timer values, probably from 0.0 to 1000.0mS, is sent to a central location where another uMITE interprets the data. 1000mS is about 1/5th of a mile, the furthest a microphone can be from the central reference mike. 6. The calculation for the gunshot is not unusually complicated. Its based on Multilateration, not to be confused with Trilateration nor Triangulation. I think the uMITE will do this math nicely. There are, apparently, many ways to do this depending on the required accuracy of the location. I'm not interested in the high precision required by law enforcement, just a general idea of the gun discharge locations. A complicated method uses audio recordings of the sound. A lot of information is embedded in the recording including the direction the bullets are fired by examining the shock waves of the traveling bullet. Also optical methods that capture the light of the muzzle flash. These seems over kill for me. The hard part of my concept seems to be the microphone fast peak detecting amplifier. I'm guessing the amplifier needs to have a kind of slow acting AGC, Automatic Gain Control, to get the background sound level to about 1/3rd. Then anything going sharply higher than 2/3rd trips the counter. I suspect the leading edge of the sound pulse would be a good reference point. (Although I don't have a good Idea what the envelope looks like yet.) I'm planning on using a UHF radio link to send the data back to the central site. They will all be on the same channel. Each will send data delayed by at least a multiple of 2 seconds from when the measurement was made. The data should contain the Sensor Number, GPS Lat/Lon, time sent, and timer value. I assume that there will only be a few hits per hour. The exception would be the target shooters who can empty more than 10 shots in a few seconds. No mater, I would catch the first shot, and ignore the rest. Lastly I could have a normal sound recorder at my central location, my house. It would record the general sound along with WWV, or some other, shortwave time station. This would be useful in weeding out the passing car, truck, or a fire cracker. I would like comments on this idea, see what you think! Any help would be appreciated. redrok |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
It should work. I have systems that use multilateration for positioning aircraft and recently lightning strikes. The lightning strike stuff is impressive. Hunters often fire two shots in quick succession. Hopeless shots! Around here they frequent a valley which echos a bit. You should be able to see the difference between shotgun and rifle. I know my dogs can. You could also look at direction finding using two microphones a few metres apart and comparing the phase of the two waveforms. A second setup at a distance would give the required second bearing. This method doesn't need precision timing and a lot of the work can be done in the analogue stages. Jim Edit: remember that the speed of sound depends on air temperature (and a few other things) VK7JH MMedit |
||||
kg4pid Regular Member ![]() Joined: 08/03/2015 Location: United StatesPosts: 50 |
I would be interested in what you come up with. Lots of gunfire around here at times. Sometimes it's me making all the noise. Between my black powder cannon and shooting Tannerite I have been known to shake a window or two. But more than once I thought someone was shooting on my property, but it turned out to be much farther away. Would be nice to know. The wind blowing just right can also have a hugh effect on how loud distance sounds are. I'm not a hunter, I just enjoy reloading and target practice. Max |
||||
crez![]() Senior Member ![]() Joined: 24/10/2012 Location: AustraliaPosts: 152 |
Perhaps GPS is not needed. With the speed of sound around 0.4 metres per millisecond the timing is not that critical. Perhaps the master unit can transmit a sync pulse for timing. |
||||
redrok![]() Senior Member ![]() Joined: 15/09/2014 Location: United StatesPosts: 209 |
Hi crezI had thought about sending a sync pulse every second or so to use as a timing tic for the slave microphones. However, this would require a radio receiver, in addition to a radio transmitter in each slave. 1. I don't like having to have have the master transmitter running all the time. 2. There are issues with switching from transmit to receive. The use of a $5 GPS chip is more cost effective and they all produce a very synchronous 1 Hz time tick accurate to a few uS of each other. I like the ublox NEO-6M. I "Dead Bug" wired directly to the chip and used a short wire antenna. There is a small supercap for backup that lasts for at least a week. I would think it would be hard to beet the GPS solution. Remember, this doesn't move and has plenty of time to get locked to the satellites. ![]() ![]() ![]() I've made some progress on the microphone sensor. 1. I have a plug-board test circuit working. It is based on an AGC, Automatic Gain Control, amplifier I got off the net. (Roff's circuit, post #10) This works well with a 9mm electrit mike I intend to use. 2. The circuit attempts to keep the output the same amplitude no mater what the sound level comes in from the mick. Of course, the original circuit is modified for my needs. I need to slow down the averaging of the AGC so I can detect a sharp high amplitude shot signal. redrok |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
This might give you some ideas... http://www.romanblack.com/SonicRanging/Sonic_Ranging.htm |
||||
Warpspeed Guru ![]() Joined: 09/08/2007 Location: AustraliaPosts: 4406 |
All you need is a simple radio microphone at each location with some AGC. Sound travels slowly, the radio path is going to be so fast in comparison, extra time delays introduced there are going to be negligible. All three sound sources monitored constantly, no GPS required. An amplitude threshold detector (above background noise) similar to oscilloscope triggering may be all that is needed. Three input capture channels into your microcontroller and away you go comparing the relative time delays. Cheers, Tony. |
||||
redrok![]() Senior Member ![]() Joined: 15/09/2014 Location: United StatesPosts: 209 |
Hi Warpspeed;I get it, using a separate radio link for each microphone is a possibility. I kind of dismissed this method for a couple of reasons: 1. I would need 3 continuously running links on 3 separate radio channels along with 3 separate radio receivers. 2. Continuously monitoring these 3 channels along with a 4th at the master station, my house, seems to me to be a bit complicated. 3. The power budget for running the transmitters may be fairly high. I'm expecting the transmit power requirement for 1 watt to be at least 2.5 watts or so. These remote microphones don't have access to grid power so would need to be solar powered. 4. Since this will probably be done on the 2 meter amateur band a station identification will also need to be sent every 10 minutes. My use of a GPS time tic method seems to me to be less complicated: 1. Each microphone does its own timing. 2. The GPS timing tic method hardly ever transmits data unless a shot is heard. 3. If a shot is heard I only need to send the time difference from the shot and the GPS tic. At 1200 baud this would take much less than a second to send. And then only a few times each day. Each sent data will contain the station ID, location, and timing in digital form. 4. Each transmitter will not overlap the others because they would use the GPS time so send data at different time slots. I don't mind this time delay, up to 10 seconds or so, because the microphone timing is in the sent digital data. In the big picture the most costly aspect of each remote station is energy consumption per day. Continuous transmissions would cost far more than the cost of a $6 GPS with intermittent transmissions. Back of the envelope calculations: Continuous transmission would be about 60WHr/day. Intermittent transmission would be about 0.5WHr/day. I'm planning on at least 2 remote microphones. Locations: 1000ft NNE 1400ft WNW and possibly a third 1500ft SW. (This one has a possibility of running on grid power.) I have a prototype AGC working. I need to test this in the wild. I suspect I need to add an audio band pass filter to reduce the extraneous noise. I don't have a good test simulator of a gun shot. I was thinking of using 2 strips of wood slapped together. Or a heavy leather belt slapped together. Both make a nice sharp sound. I have to try these to compared to a real gun shot signal. redrok AD0TJ |
||||
Warpspeed Guru ![]() Joined: 09/08/2007 Location: AustraliaPosts: 4406 |
2.5 watts ! You will be heard many hundreds of miles away. Unless they have changed the rules, on 70cm and above, a call sign is not required. Anyhow the speed of sound is around roughly 340 metres/sec at sea level. Even if your three microphones were only spaced 3.4 metres apart, the time difference would still be around 10 milliseconds. Your ears are only 200mm apart, and the directionality is still pretty good. The input capture on even the slowest crappiest microcontroller might have a time resolution of maybe 1uS. Cheers, Tony. |
||||
redrok![]() Senior Member ![]() Joined: 15/09/2014 Location: United StatesPosts: 209 |
Hi Warpspeed; You will be heard many hundreds of miles away. You may be thinking about Part 97 : Sec. 97.217 Telemetry telemetry transmissions, but I think they also have some form of id. Even if your three microphones were only spaced 3.4 meters apart, the time difference would still be around 10 milliseconds. Your ears are only 200mm apart, and the directionality is still pretty good. Measurement of the sounds bearing is not as accurate as one might think. I suspect the accuracy is in the 10 degree range. Even with a 5 degree accuracy bearing the final location would be kind of coarse at, say, 1 mile. At 1 mile the ambiguity would be on the order if 500ft depending on the geometry. Some of the largest errors are caused by reflections from objects relatively close to the microphones. Generally, Multilateration is relatively unaffected by the close in reflections. Both methods are affected by reflections that are distant from the microphones. Wind also plays a part, but wind error could be removed if the wind speed and direction were known. Multilateration methods are much better. Maybe 100ft at 1 mile depending on the geometry. It might be fun to make use of Triangulation at each station and send the bearing back along with the Multilateration timing data. redrok AD0TJ |
||||
Warpspeed Guru ![]() Joined: 09/08/2007 Location: AustraliaPosts: 4406 |
Reflections should not be an issue, because the fist steeply arriving wavefront will always be the direct path, and its also going to be the strongest. Licensed amateurs have one big advantage in that we are not as power limited as the unlicensed users using 70cm for garage door openers, remote doorbells, model radio control and similar applications that are very power restricted. Cheers, Tony. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |