Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Sound level detection using Microcontroller

Status
Not open for further replies.

cyberplayer

New Member
hi, Im sure someone can help me. Im designing a Sound level detector using an 8051. (ie. sound of breaking glass).
Ive got an 8bit ADC and an 8051 micro. Im currently using a potentiometer to simulate a threshold for the ADC but My bafflement is the Analogue bit,

Is it possible to sample the output of an amplified electret mic as a voltage level propotional to Sound going in?. (ie, is the output a voltage level or a frequency wave),

Are there example circuits you know about?

excuse my ignorance im a newbie in Analogue electronics.
 
as far as i understand ur question.- the adc slices(in time) the incoming voltage , and outputs each slices corresponding voltage . so a triangular wave i/p to an adc would give something like (for 180 degree) 0,1,2,3,4,3,2,1,0.
 
As you're looking for a threshold value, I would suggest you first need to rectify the incoming audio - check VU meter designs for suitable rectifier circuits.
 
a microphone would give you an AC signal ("frequency wave" as you call it), not a DC voltage. To get a DC voltage, you can use a simple 3-stage analog circuit: amplifier, peak detector, low-pass filter.

For the amplifier you can use a super simple, standard op-amp circuit (one chip and a couple resistors), for the peak detector: one diode and a resistor and capacitor, and for the low-pass: a resistor and capacitor. In the end, you're looking at maybe a dozen parts, though you might need a couple of amplifier stages depending on how weak the output of the microphone is (I've never worked with one myself)

I built a circuit just like this a couple weeks ago, only I was using line-level audio as my input so it didn't require much by way of amplification.
 
Last edited:
As a thought on a microphone "breaking glass" detector, keep in mind that a person talking near the mike or setting down a coffee cup on a surface next to the mike could easily make a louder noise than glass breaking across the room.

There are other possibilities for improvement. Mechanically putting a sensor on the glass itself. See if there might be frequencies particularly high in breaking glass and filter out everything else. DSP could probably distinguish it from all other sounds, but that would be one serious project.
 
as I understand it, a glass break detector is tuned for certain frequencies present in the sound of glass beaking. My guess is a spectral analysis of the the sound would show several spikes. I'd make band-pass filters for at least 3 or 4 of them and trigger when all of them have a preset level.

with a dsp, you could do an inverse FFT and then use a spectral finger print match but that may be more complex than need be.
 
Status
Not open for further replies.

Latest threads

Back
Top