Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I'm trying to design a circuit which produces a 17KHz pure sine wave from a speaker using the following components:

  • PIC16F1783 (microcontroller with DAC)
  • an LM386 amplifier and an 8-Ohm 1W speaker.

The power supply to the LM386 is 9v.

Since I have many constraints I'm not quiet sure about how to do it. I'm able to create the correct values in the DAC but then I'm not quite sure how to feed the LM386.

  • It says that the minimum gain is 20, does that mean I have to create a voltage divider before I feed the the amplifier? (1v*20=20 > 9v).
  • Is the network (0.05uF,10Ohm) at the LM386 output described in the typical application in the datasheet necessary?
  • Can the amplifier deal with 17Khz?
  • Should I put a decoupling capacitor in the output?
  • Should I put another resistor, or is the 8-Ohm speaker enough?

As you can see I'm pretty lost :( thanks for the help!

share|improve this question
2  
Provide a link to the LM386 datasheet, a schematic of what you tried, and explain exactly what bad or unexpected symptoms you observed. Unless a LM386 is a power amp, it's not going to drive a 8 Ohm speaker. –  Olin Lathrop Dec 30 '12 at 0:00
    
If you want a pure sine wave, you're going to have to filter the signal coming from the PIC. Fortunately, you need to reduce the signal level anyway. –  gbarry Dec 30 '12 at 1:11
add comment

1 Answer

up vote 2 down vote accepted

First, you WILL need to put a divider, or an amplifier with a gain of .05 before the LM386.

The minimum parts schematic you reference in the datasheet will work for you. The part has a DC offset of Vcc/2 at the output. The purpose of that matching network is two-fold. First, it keeps the DC contained to the output pin, away from the speaker. The second function is matching. Follow that schematic and you should be fine. The only thing to add that isn't on the schematic is a decoupling capacitor at the power pin. If you don't add one, you will get some very weird artifacts at the output.

The part will do 17 kHz easily, and can go out over 100 kHz.

I would try to find 12V to power it though. The part was originally designed for automotive use.

share|improve this answer
    
I'd actually change to another op amp. 9V and 12V are usually a bit inconvenient to work with, and there's no reason to use them except for older parts. Aside from that, most newer op Amps are much better than the old stuff. –  Gustavo Litovsky Dec 30 '12 at 1:21
1  
the LM386 is not an op-amp! It's about as good as anything else for driving a low impedance at 5 or 9 V... –  Brian Drummond Dec 30 '12 at 13:06
    
thanks! it helped me alot... a 10uF decoupling capacitor between the the supply and GND really made a difference –  Daniel Dec 31 '12 at 10:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.