Hi,
I am trying to make an electronic target. The idea is to use the speed of sound and TDOA (time difference of arrival) using an array of microphones to determine the location of the impact on the target. To do this I am using an AVR and hardware interrupts. By using the AVR clock in us and timestamping the interrupts I can determine the difference in time it took for the sound wave to reach each microphone. I have already figured out the math and programming aspect of the project.
I am looking for some guidance on the circuitry portion.
Originally I used an electret mic -> LM386 -> LV op-amp as a comparitor to produce a 5v TTL signal going to an intterupt of the AVR. This worked but the problem was that the interrupt for each microphone was firing 100s or 1000s of times per impact and it was really messing up the time stamps because the processor was flooded with interrupts. Unfortunately I don't have access to a scope but I think the interrupt was catching the rising edge of each cycle of the waveform generated by the impact sound.
My next step was to add a latch after the comparitor and before the AVR but it appears now that the latch is not getting latched properly, maybe because the signal is too fast? or maybe because the circuit is a mess?
If anyone can recommend a schematic that I could use I would appreciate it. I think all I really need is to be able to detect the impact (loud noise) and then set a latch that can be read by the AVR.
I think my circuit is going wrong in a few places but I don't know that much to put all the puzzle pieces together.
1. On the output of the LM386, pin 5, what is the circuit I need to put between that and the LM339 comparitor?
2. Should I use some sort of a peak detector circuit to hold the output long enough for the latch to catch it?
3. Do I need an envelope detector circuit between the LM386 and LM339 to smooth out and convert the AC signal into a DC signal that the LM339 can process?
Any sample circuits or advice would be appreciated. I am starting to feel like this project has me beat
I am trying to make an electronic target. The idea is to use the speed of sound and TDOA (time difference of arrival) using an array of microphones to determine the location of the impact on the target. To do this I am using an AVR and hardware interrupts. By using the AVR clock in us and timestamping the interrupts I can determine the difference in time it took for the sound wave to reach each microphone. I have already figured out the math and programming aspect of the project.
I am looking for some guidance on the circuitry portion.
Originally I used an electret mic -> LM386 -> LV op-amp as a comparitor to produce a 5v TTL signal going to an intterupt of the AVR. This worked but the problem was that the interrupt for each microphone was firing 100s or 1000s of times per impact and it was really messing up the time stamps because the processor was flooded with interrupts. Unfortunately I don't have access to a scope but I think the interrupt was catching the rising edge of each cycle of the waveform generated by the impact sound.
My next step was to add a latch after the comparitor and before the AVR but it appears now that the latch is not getting latched properly, maybe because the signal is too fast? or maybe because the circuit is a mess?
If anyone can recommend a schematic that I could use I would appreciate it. I think all I really need is to be able to detect the impact (loud noise) and then set a latch that can be read by the AVR.
I think my circuit is going wrong in a few places but I don't know that much to put all the puzzle pieces together.
1. On the output of the LM386, pin 5, what is the circuit I need to put between that and the LM339 comparitor?
2. Should I use some sort of a peak detector circuit to hold the output long enough for the latch to catch it?
3. Do I need an envelope detector circuit between the LM386 and LM339 to smooth out and convert the AC signal into a DC signal that the LM339 can process?
Any sample circuits or advice would be appreciated. I am starting to feel like this project has me beat