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.

DAC not able to sound my speaker. Please help

Status
Not open for further replies.
so what u r trying to say is that i have to:
1) make Vref of my DAC to be 0.15v.
No.
Simply turn down the volume control.

2) Make Vs of my lm386 = 5v. ( i have already done this)
If you want it to work with a full power output of only 0.14W.

3) Insert a capacitor of abt 0.1nF in between the DAC output and the variable resistor
Not 0.1nF (100pF) because it will pass only ultrasonic frequencies from bats. Instead use 0.1uF to 0.22uF to pass most sounds.

4) Change the feedback from the current config to the "-input" of the lm386?
No.
Remove your feedback because the LM386 already has its own negative feedback built-in.
 
Hi all, gundu is my groupmate. Btw we found out from other group that actually this schematic works (DAC from datasheet.pdf). May i know what is the difference between the schematic found in datasheet and ours(DACv1.pdf)?

*there are 2 wire we have made amendment marked out with annotations in our schematic(DACv1).

Please advise. Thank You
 

Attachments

  • DAC from Datasheet.pdf
    38.6 KB · Views: 158
  • DACv1.pdf
    612 KB · Views: 155
Tnecniv,
What are you doing?
You wrongly disconnected pin 2 and pin 4 of the LM386 power amplifier from ground and connected them to pin 5 instead so the LM386 WILL NOT WORK!
 
Tnecniv,
What are you doing?
You wrongly disconnected pin 2 and pin 4 of the LM386 power amplifier from ground and connected them to pin 5 instead so the LM386 WILL NOT WORK!

thanks audioguru.
so now i jus connected
pin 2 and pin 4 to grd.
pin 3 is input from variable resistor
pin 5 output to speaker
pin 6 = 5v
pin 1, 7 and 8 floating
 
sound is still very unclear. alot of "zzzzz" sound coming out, although placed the 0.22 uF cap between DAC n var resistor.

anything else i can do to clear up the sound?

i got another question. What is the Vref input of the DAC for? can it be used as an output and why?
 
This is the signal measured from the oscilloscope for the circuit, this is measured from our DAC directly without going thru the amplifier. we have included a voltage divider which include resistor 1k ohm and 10k ohm to the DAC Vref input making it equal to 0.5V.(sawtoothv1friday.jpg)

after going thru the amp this is the output i get. I dun understand why the min voltage has gone up to 2.5V from 0V after amplifying. (2011-12-02 20.29.27.jpg).
 

Attachments

  • 2011-12-02 20.29.27.jpg
    2011-12-02 20.29.27.jpg
    2.7 MB · Views: 158
  • SawtoothV1Friday.jpg
    SawtoothV1Friday.jpg
    3 MB · Views: 134
The signals from your DAC are extremely distorted. Distortion is high frequencies that sound like "zzzzz" which the LM386 amplifier is playing.
I think the input level to the LM386 amplifier is much too high which also causes severe distortion.

The 0.22uF coupling capacitor feeding the 10k volume control cuts frequencies below 73Hz but some of your signals are only 0.1Hz so the capacitor passes only the distortion.
 
The signals from your DAC are extremely distorted. Distortion is high frequencies that sound like "zzzzz" which the LM386 amplifier is playing.
I think the input level to the LM386 amplifier is much too high which also causes severe distortion.

The 0.22uF coupling capacitor feeding the 10k volume control cuts frequencies below 73Hz but some of your signals are only 0.1Hz so the capacitor passes only the distortion.

if i increase the capacitor value, nothing much will be able to pass thru rite? is there any way i can clear up the signal?
 
if i increase the capacitor value, nothing much will be able to pass thru rite?
Which capacitor?
Please learn about electronics. A small series coupling capacitor value passes only high frequencies. A larger series coupling capacitor value also passes lower frequencies. The formula for the cutoff frequency is extremely simple and you should learn it.

Maybe you are asking about the filter capacitor to ground?

is there any way i can clear up the signal?
Your micro-controller is making a distorted triangle wave.
Your power amplifier has its input signal level too high for its small allowed output signal level because its supply voltage is very low.
 
Which capacitor?
Please learn about electronics. A small series coupling capacitor value passes only high frequencies. A larger series coupling capacitor value also passes lower frequencies. The formula for the cutoff frequency is extremely simple and you should learn it.

Maybe you are asking about the filter capacitor to ground?


Your micro-controller is making a distorted triangle wave.
Your power amplifier has its input signal level too high for its small allowed output signal level because its supply voltage is very low.

i was talking abt the coupling capacitor. Thanks for the help.
i am sending in a triangle wave. yes its very distorted.
i dun understand what u mean by the input signal level being too high. i was told by my prof that the Vref of the DAC shld be ard 0.5 so that when the signal get ampilified by a gain of 20 there will be minimum saturation as the voltage of circuit is at 5V.
 
In post #22 you show two completetly different schematics:
1) The one on the left is from the datasheet and has an opamp.
2) The one on the right is yours that does not have an opamp and is wired completely differently.

Why don't you use the circuit from the datasheet and feed its output through a coupling capacitor and attenuator to the volume control then to your LM386 power amplifier?

The maximum output from an LM386 that has a 5V supply is 3V p-p when it drives an 8 ohm speaker. Therefore its max input is 3/20= 0.15V p-p.
 
In post #22 you show two completetly different schematics:
1) The one on the left is from the datasheet and has an opamp.
2) The one on the right is yours that does not have an opamp and is wired completely differently.

Why don't you use the circuit from the datasheet and feed its output through a coupling capacitor and attenuator to the volume control then to your LM386 power amplifier?

The maximum output from an LM386 that has a 5V supply is 3V p-p when it drives an 8 ohm speaker. Therefore its max input is 3/20= 0.15V p-p.

Sorry audioguru for all the mistakes. We have done the DAC and this is our current schematic however there is alot of noise and is overpowering our voice data. Is that any remedy to remove the noise? We placed a capacitor at the bypass pin 7 of LM386 because we were told that it helps to eliminate noise and its a must have.
 

Attachments

  • dac.JPG
    dac.JPG
    113.5 KB · Views: 148
Your new schematic does not have a coupling capacitor so the DC from the DAC is amplified 20 times by the LM386 which causes its output to saturate and produce severe distortion.

You added a capacitor between pin 1 and pin 8 of the LM386 which increases its AC gain to 200! Why??

The capacitor at pin 7 of the LM386 to ground reduces mains hum noise from the power supply. A 9V battery does not produce hum so the capacitor is doing nothing.
Please describe the "noise" that you hear. Is it severe distortion as described above?
If the circuit is built on a breadboard then the LM386 will probably oscillate at a very high frequency, get hot and produce severe distortion.

Please describe "voice data".
 
Hi audioguru i have uploaded my current schematic and the noise from my speaker. Please advise
 

Attachments

  • dac.JPG
    dac.JPG
    110.1 KB · Views: 184
  • Memo.zip
    139.8 KB · Views: 115
Thank you for correcting the many mistakes on your schematic.

Did you play a recording through the DAC or do you have a live microphone?
If the microphone can hear the speaker sound then sounds go around and around and the DAC produces digitized acoustical feedback howling.
 
Thank you. i am playing sound from the eeprom. i am able to hear the exact output that i want to but there is alot of noise tat is tagged to this as u have heard from the sound file i sent. what could be the reason for this?
 
I don't know why your DAC produces such a high amount of screeching noise. My CD and DVD players produce no noise.
 
I don't know why your DAC produces such a high amount of screeching noise. My CD and DVD players produce no noise.

haha. That is the same problem i am facing. other groups who are using this same schematic are producing clearer sounds than us. i have also changed the eeprom, dac and lm386 n still face the same problem.

i've attached a new sound file, in this i randomly changed the asm coding to ignore 0s when reading data from the eeprom before sending the data to the dac and surprisingly had a slightly clearer, but still very noisy, resulting sound
 

Attachments

  • Memo2.zip
    88.3 KB · Views: 109
I do not know what you are doing. There is a loud high frequency sound which might be your triangle wave. I do not know why you are using an audible triangle wave frequency.

When sounds are digitized then the sampling frequency is very high so it cannot be heard and can be filtered out leaving only normal sounds to be heard.
 
we are not using an audible triangle wave. We are reading data from the eeprom and sending it directly to the DAC.
the data from the eeprom is actually the sound file that we are trying to play . it is saved in .raw b4 being burnt to the eeprom.
 
Status
Not open for further replies.

Latest threads

Back
Top