S
S
stiger192016-03-28 15:15:29
Microcontrollers
stiger19, 2016-03-28 15:15:29

How to determine the distance using sound?

The task is to determine the distance at which the sound emitter is connected to the device on the STM32. I decided to use a frequency of 20-22 kHz. I see the device like this: we emit a signal, start a timer and wait until we hear it on the microphone. How can you determine with sufficient accuracy at what point in time a sound of a particular frequency appeared on the microphone?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GavriKos, 2016-03-28
@stiger19

To be honest, the question is not very clear. You take real-time data from the microphone, isolate the desired frequency (software - FFT, hardware - filters with capacitors), if the signal level at this frequency exceeded a certain epsilon - then here it is a return. For accuracy, you can not just send a signal once, but with some kind of conditional signature.

S
Sergey Sodin, 2016-03-29
@Syzd

I would look at the HC-SR04 ultrasonic sonar library for arduino. The answer or hint is there for sure.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question