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.

Some help with mic preamp to vu meter

Status
Not open for further replies.
Sound level meter in dB

I need to take sound from the environment and display that sound intensity in terms of decibels from 0 to 120 db on an lcd screen that is controlled from the microcontroller.. 50 to 100 db would work also. And yes Sir my LEDS are dim..should I change my lm386 to an lm741? I can do that fairly easily..
The problem I have with my so called working circuit is interfacing to port A into the microcontroller..I do not have to worry about how the programming and all works for the microcontroller becasue that part is done. All I have to do is find a way to send eight bits of data to an atmega 32. That data should be read by the atmea32 to represent the environment sound. Here are three things I could do, with some help of coarse..

1: lm386 or opamp(lm741?) to an adc 0803(analog to digital converter) sending voltage values in binary (8 bits) form to the atmega 32, then its just information manipulation..using the db formula db=20log(v1/vref), where v1 is the voltage im getting at the output of my opamp...

2: lm386 or an opamp to the lm3915 and interface it with an atmega 32 microcontroller...which isnt working becasue Im guessing the lm3915 is logic low meaning it gives ground to turn LEDs on not a voltage which would be great..and also it is probably too fast for an o-scope and the atmega 32 microcontroller...(no cleary defined 1 and 0 but some sawtooth looking graph in o-scope)

3. lm386 or opamp(lm741?) directly to the microcontroller which has a built in a/d converter and then its just code from there.

Also im thinking of doing a cascaded lowpass and highpass filter for a bandpass filter with corner frequencies of 20hz to 20khz which is the human threshold of the human ear..


carbajal739



=============================================


audioguru: Why are you using an LM386 power amplifier instead of an opamp?
The display will look like a dim blur if you do not use one of the peak detector circuits shown in the datasheet for the LM3915.

Your micro-controller does not have an input. What do you want it to do?
 
Your LEDs are dim because the 2.2k resistor for R4 sets their current at only 6mA each and they do not have a peak detector circuit to match the reponse time of your vision.

You can use an opamp instead of an LM386 power amp for the mic preamp because it does not need power.
 
I need to take sound from the environment and display that sound intensity in terms of decibels from 0 to 120 db on an lcd screen that is controlled from the microcontroller.. 50 to 100 db would work also. And yes Sir my LEDS are dim..should I change my lm386 to an lm741? I can do that fairly easily..
The lousy old 741 opamp is 42 years old and has very poor performance for audio. Its max frequency is only 9kHz and it is too noisy. Use a TL071 low noise wideband opamp instead.

3. lm386 or opamp(lm741?) directly to the microcontroller which has a built in a/d converter and then its just code from there.
You need a low noise wideband mic preamp (A TL071 opamp is good) and a precision rectifier circuit that gives a varying DC level to the a/d converter in the micro-controller.

Also im thinking of doing a cascaded lowpass and highpass filter for a bandpass filter with corner frequencies of 20hz to 20khz which is the human threshold of the human ear..
A lowpass filter will reduce the sounds made by bats. It is not required.
A highpass filter will reduce wind noise a little.
 
tl 071

1)what do I connect to v+ and v- . v+ would be to vcc say 9v, how would I connect v- or how do I for example create a negative 9v for v-?

2)Can I use pins 2, 3, and 6 on the tl071 the same I did with the lm386s' pins 3,2 and5 the same as my schematic from above?

3) Are there any rectrfier Integrated chips I can use? Im not too sure how to do a rectifier circuit just yet and would appreciate some guidance.

thanks
 
The precision rectifier circuit (the best one uses an opamp but needs a negative supply) is shown on the datasheet for the LM3915 bar graph driver.
Here is an electret mic preamp that does not need a negative supply:
 

Attachments

  • Electret mic preamp.PNG
    Electret mic preamp.PNG
    5.1 KB · Views: 4,449
rectifer type

Which do I need for the input to the a/d on an atmega32 microcontroller from above;

1. Half wave peak detector

2. precision half wave rectifier
3. precision full wave average detector
4. or a precision full-wave peak detector?
 
vee and vcc

what can I do for v+ and v- for an LF 351? V+ say straight to 9v what about v- ie pin 4.. I dont want to assume its like the typical connection below in the picture becasue thats not a precision half wave rectifier like the data sheet from the lm3915.

Thanks in advance.
 

Attachments

  • for_uncle_scrooge_rev2.JPG
    for_uncle_scrooge_rev2.JPG
    44.6 KB · Views: 1,230
The LF351 needs a dual-polarity supply in that circuit.
In my Sound Level Indicator project (it is too complicated for you since it has an automatic gain control) I used an MC33172 dual single supply opamp and a transistor as the rectifier diode like this:
 

Attachments

  • precision half-wave rectifier.PNG
    precision half-wave rectifier.PNG
    12 KB · Views: 3,026
  • preamp and peak detector.PNG
    preamp and peak detector.PNG
    26.6 KB · Views: 2,735
question

1)
It seems better to use the tl071 circuit with a precision half-wave rectifier,
how can I get a -9v am I going to have to use two 9 volt batterries?

2)
I do have an mc33172n chip but how would I connect that the the tl071 circuit?

both of these for input to a microcontroller?
 
1)
It seems better to use the tl071 circuit with a precision half-wave rectifier,
how can I get a -9v am I going to have to use two 9 volt batterries?

2)
I do have an mc33172n chip but how would I connect that the the tl071 circuit?

both of these for input to a microcontroller?
My MC33172 circuit is a mic preamp (like the TL071 mic preamp) plus a precision half-wave rectifier circuit but not needing a negative supply voltage. That is all you need.

Or instead you can use a TL071 mic preamp plus an LF351 precision half-wave rectifier that needs a negative supply voltage.

Both circuits will perform the same. Select one.
 
tl071 and precision half wave rectifier

I choose the tl071 and the precision half wave rectifier..
I figured out how to give it a negative nine volt supply from an external dual power supply. I just have a concern of how to do that negative supply once im only working with bread boards or a pcb?
any suggestions?
 
Why don't you like my MC33172 circuit? It does not need a negative supply and it works perfectly in my project. It has more than 50dB range.
 
negative voltage

i dont have the parts in yet but i will. In the meantime,

for a negative voltage here is what i found. I tested it im getting negative 1 volt not negative 5 which is what im looking for. I found this schematic online through google.

My question is, what value of diode is supposed to be used based on the schematic any suggestions?

I would greatly apreciate it..
 

Attachments

  • scrooge_3.JPG
    scrooge_3.JPG
    12.8 KB · Views: 527
The 555 oscillator/rectifier circuit has two rectifier diodes and a 5.1V zener diode that limits its output voltage to -5.1V.
Maybe you connected the zener diode with backwards polarity.
 
-5

I tried the 1n4001 diodes again and im still getting -1 volts or so. what would you suggest to do to get a negative voltage?
 
Do you have the 5.1V zener diode connected with its cathode to ground?
What is the load on the -5.1V supply?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top