Low pass filter for electret mic + preamp

Thread Starter

khayrula

Joined Oct 19, 2023
5
Hi everybody!

I'm working on a project that detects specific sounds in my surroundings. I've connected an electret microphone to a preamp that I assembled myself and then to an ESP32 ADC. The ESP32 performs FFT within the 0Hz to 2kHz range and calculates the correlation coefficient using preloaded "target" spectrums as a reference. This coefficient indicates the presence or absence of the "target" sound.

However, I'm encountering the issue of aliasing, which results in numerous false spectrum components from sounds above 2 kHz. This severely decreases the accuracy of the used algorithm. Since there's no magic digital solution for this I need to cut or vastly reduce analog frequencies above 2kHz using LPF. And here's where I'm stuck - I've got to admit I'm clueless about it.(( All my tries with standard active filters/RC/LC filters were unsuccessful (output was corrupted and/or signals 2+kHz were still present). Please help me. I need some working scheme of a low-pass filter "attachment" that will work.

As the preamp I'm using a pretty standard scheme based on LM358 (please refer to the attached file) with the only change of R2 & R3 which are adjusted to receive 1.65V as Esp32 ADC max voltage is 3.3V while my power supply is 5V.

I would greatly appreciate any assistance you can provide. Thank you in advance!
 

Attachments

Audioguru again

Joined Oct 21, 2019
6,604
The lousy old LM358 DUAL opamp produces crossover distortion and hisss which produces lots of high frequencies.
A lowpass filter made with an L:M358 still produces crossover distortion and hisss.
If its 2nd opamp is not properly disabled then it might be oscillating at high audio frequencies.
Why not use a low noise and low distortion single opamp instead?
 

Thread Starter

khayrula

Joined Oct 19, 2023
5
The lousy old LM358 DUAL opamp
Well, what do you know! And I was trying to do both preamp and lowpass filter using one LM358.. ))
I've just checked what else I can use instead of lousy old opamp... What about NE5532P? Or single opamp is the only way for me to make this project work? As a single opamp TL071 would be ok?
 

LowQCab

Joined Nov 6, 2012
3,922
Using a Circuit that is running a single Op-Amp at ~100X Gain is likely to be problematic,
( and an LM358 might possibly be the worst choice You could make ).
It would be much better to run 2 Low-Noise, Op-Amps at ~10X each,
another bonus to this is having the possibility of multiple Filtering-Stages.

Your Ears are far better at discriminating the desired sounds that
are "down in the weeds" of noise, than any Electronic-Circuit.

What is the "Character" of the sounds that You are trying to detect ?
A detailed description is required.

Mechanical-Filtering may also be required.
.
.
.
 

Thread Starter

khayrula

Joined Oct 19, 2023
5
What is the "Character" of the sounds that You are trying to detect?
Sound of the attacking drone. One such drone struck the building where my family and I reside. I was fortunate that the impact occurred five floors above us. Drones are nearly inaudible from behind closed windows, especially with the background noise in the apartment. So, this project will serve as a kind of alert system. I'm not sure if it will be effective, but why not give it a try? The main challenge for me in this project is the analog aspect. I studied this during my early university years, but unfortunately, it was mostly theoretical, and, moreover, I can't remember much.
 

Attachments

Audioguru again

Joined Oct 21, 2019
6,604
I've just checked what else I can use instead of lousy old opamp... What about NE5532P? Or single opamp is the only way for me to make this project work? As a single opamp TL071 would be ok?
The old NE5532 is low noise and low distortion but has a fairly low input resistance for a record player preamp (remember vinyl records?).
I have used many TL07x opamps but their low noise is higher than the NE5532 but their input resistance is extremely high.

I think your idea to have an audio warning that a drone is coming will let you be warned of normal airplanes, ambulance sirens, motorcycles, noisy cars, birds chirping and wind noise.
 
Last edited:

LowQCab

Joined Nov 6, 2012
3,922
Modern Drones don't have "Pulse-Jet" Engines, like the old-school Nazi Buzz-Bombs,
and therefore, create sounds just like an ordinary Jet-Airliner,
so your idea will not work,
besides that, the best case scenario would give you "maybe" ~5-seconds of warning time.

There is absolutely no good reason to live in fear, ever.

Do not watch TV, for any reason, Period.
It's 100% propaganda.

Something more constructive and helpful would be figuring-out how to
get around the crazy Internet-Censorship in your area.
( possibly a VPN, Virtual-Private-Network )

There are absolutely massive changes going on Worldwide, all are positive.
.
.
.
 

Thread Starter

khayrula

Joined Oct 19, 2023
5
will let you be warned of normal airplanes
Modern Drones don't have "Pulse-Jet" Engines, like the old-school Nazi Buzz-Bombs
These drones are not like modern high-speed jets but rather very loud old-school Nazi Buzz-Bombs. Those kamikaze drones are cheap, relatively large, low-altitude, slow-moving, and emit distinctive, audible sounds from their engines and wooden propellers. We often refer to them as "mopeds" because of their unique noise. In the quiet of the night, you can hear them from perhaps up to 5 kilometers away or maybe even more. I've analyzed their frequency spectrum, and it has a distinct signature that's relatively easy to identify. The only challenge I've faced in digital processing was dealing with the uneven frequency drift caused by the Doppler effect, but I managed to resolve that issue. I agree that my idea may not work for high-speed cruise missiles (high-speed jet attack drones) because of short detection-reaction time, but for those "mopeds" - I believe it will.

I have used many TL07x opamps but their low noise is higher than the NE5532 but their input resistance is extremely high.
What about UA741? Looks like it is a pretty popular one.
 

Thread Starter

khayrula

Joined Oct 19, 2023
5
Audioguru, I believe I've found the preamplifier circuit (U1a) with a second-order Butterworth low-pass filter (U1b) you proposed to one person a long time ago. As I understand U5 is an amp for headphones. Is it possible to modify it for Esp32 ADC?
 

Attachments

Audioguru again

Joined Oct 21, 2019
6,604
What about UA741? Looks like it is a pretty popular one.
A very old 741 opamp design (1968) is popular because 80 years old professors are still promoting them.
They are so noisy that their noise level is not spec'd, they have trouble producing an output above only 9kHz, they need a supply more than 10V and their input and output swings are small.
 
Top