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..
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:
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.
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:
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.
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?
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?
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.