Shop OBEX P1 Docs P2 Docs Learn Events
LM386 Propeller Amp help — Parallax Forums

LM386 Propeller Amp help

parts-man73parts-man73 Posts: 830
edited 2008-10-02 03:34 in Propeller 1
Attached is a schematic of the Audio amplifier that I just put together. I had done the same circuit awhile ago, but added the extra 4.7k resistor between the input and pin 3 of the LM386, and a second 4.7k pull down resistor from pin 3 and ground. The LM386 datasheet shows a 10k pot to adjust volume, I chose to use 2 4.7k resistors in it's place, to have a permanently fixed volume.

I thought the extra resistance would get rid of the distortion and clipping I was experiencing. Didn't help.

However, when I disconnect the wire between pin 2 ( -input ) and ground, the sound clears right up, and sounds good. What is going on here!

Another interesting twist. If I hold onto one end of a 4.7k resistor, and plug the other end into pin 3 of the lm386 as it's only input, I can hear a local AM radio station!!! I've had one of my children hold onto the resistor, with the same affect, so it's not just me. What is going on here???

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian Meade

"They who dream by day are cognizant of many things which escape those who dream only by night" - Edgar Poe
577 x 570 - 34K

Comments

  • T ChapT Chap Posts: 4,223
    edited 2007-04-08 23:03
    Here is what I concluded from the datasheet, slightly different circuit with gain. I think you just drew that for upload purposes but the lower 4.7 needs a junction.

    Post Edited (TChapman) : 4/9/2007 1:26:24 AM GMT
    578 x 373 - 33K
    386.jpg 33.3K
  • IanMIanM Posts: 40
    edited 2007-04-08 23:21
    Brian, with a 5 volt power supply and a gain of 20 (ie pin 1 and 8 not connected) the input should not exceed 250mv or else there will be clipping causing distortion. In fact it will clip before it reaches 5v. If the prop outputs 3v p-p then the input resistor divider should provide a reduction of at least 12 (ie 3/0.25).

    WRT picking up AM broadcast stations, when you touch the input, your body is acting as an antenna and there is enough gain in the amplifier to rectify the local AM station and enable you to hear it.

    Cheers, Ian

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ian Mitchell
    www.research.utas.edu.au

    Post Edited (IanM) : 4/8/2007 11:28:50 PM GMT
  • parts-man73parts-man73 Posts: 830
    edited 2007-04-09 03:10
    TChapman said...
    I think you just drew that for upload purposes but the lower 4.7 needs a junction.
    Yes, I see what you mean. I did draw it for for illustration purposes. The lower 4.7k in the voltage divider is connected to ground. I didn't notice until you pointed that out. But it is connected in real life on my breadboard.


    A little more experimenting... I measured the voltage at the union between the 1 uF cap and the 4.7k resistor. I kept getting a negative voltage. I got the idea of connecting the center of the resistor voltage divider to "- input" instead of "+ input". I then connected "+ input" to ground. I now get good sound quality with this circuit with little or no clipping.

    The question is... should I be getting a negative voltage from the RC filter? I don't have an o-scope to get a more accurate picture of what's going on.


    I appreciate the feedback so far, but please, any other comments so that I might understand it better?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian Meade

    "They who dream by day are cognizant of many things which escape those who dream only by night" - Edgar Poe
  • rokickirokicki Posts: 1,000
    edited 2007-04-09 03:19
    You're overdriving the input.

    Easiest change to make it clear: stick the pot back in where the pot should be. Play with the pot and you'll
    understand. You're simply giving it way too much signal for the gain you've set.
  • parts-man73parts-man73 Posts: 830
    edited 2007-04-10 14:06
    I tried Rokicki's suggestion, and used a 10k pot instead of fixed value resistors. I get the same results. I get better sound quality by feeding " - input " instead of " + input "

    I'd be happy leaving it that way, but I want to do it the "right" way, and I am going to have this made into a PCB.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian Meade

    "They who dream by day are cognizant of many things which escape those who dream only by night" - Edgar Poe
  • LeonLeon Posts: 7,620
    edited 2007-04-10 14:19
    Use TChapman's circuit, I think that's taken directly from the data sheet, and should work.

    BTW, the LM386 isn't a very good choice. The Philips TDA7052 is much better, and uses fewer components.

    Leon
  • parts-man73parts-man73 Posts: 830
    edited 2007-04-10 17:33
    I do believe my circuit is the same as TChapman's. I omitted the cap and resistor between pins 1 and 8. They increase the gain, which is the last thing I want to do. Without, it is set to minimum gain (20)
    Leon said...
    BTW, the LM386 isn't a very good choice. The Philips TDA7052 is much better, and uses fewer components.

    I actually considered a TDA7053A(stereo), and I may switch to that chip for my final design. Problem is finding them. I see that you are from the UK, I originally heard about the TDA7052 and TDA7053A from a different forum, oddly enough, that forum is based in the UK, those chips must be more popular over on that side of the pond.

    I normally order parts from both Mouser and Jameco, neither supplier has the TDA7053A, Jameco has the TDA7052, but the minimum order quantity is 2000 freaked.gif I did some more searching after hearing your reply, and I did find that DigiKey carries both. So that might be the way to go.

    I just hate to walk away from this without solving the problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian Meade

    "They who dream by day are cognizant of many things which escape those who dream only by night" - Edgar Poe
  • rokickirokicki Posts: 1,000
    edited 2007-04-10 18:26
    Hmm, so with the pot in the circuit, and the "volume" turned way way down, you don't get acceptable sound?

    If this is the case, I guess it's time to scope things. These LM386 circuits should be pretty foolproof.
  • T ChapT Chap Posts: 4,223
    edited 2007-04-10 19:08
    Is this a DIP that is beadboarded? Maybe rip the whole thing up, start over on a fresh part of the board. Doesn't add up.
  • parts-man73parts-man73 Posts: 830
    edited 2007-04-10 20:56
    I noticed in you schematic, the .05uF cap and the 10 ohm resistor on the output are switched as compared to mine. You show the capacitor connected to VSS and the resistor connected to pin 5 (output) Mine is exactly opposite. The datasheet shows it as I have it. Is the order of components important there?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian Meade

    "They who dream by day are cognizant of many things which escape those who dream only by night" - Edgar Poe
  • T ChapT Chap Posts: 4,223
    edited 2007-04-10 21:57
    Maybe there is not a big difference, the data sheet shows both configs. Mine is for use with gain. Your problem sounds like you are shorting the + input to GND somehow. That's why I suggested starting over in a new place.

    With power off, meter the + to GND and see what you get.

    Post Edited (TChapman) : 4/10/2007 10:59:24 PM GMT
    320 x 302 - 12K
  • cparkercparker Posts: 14
    edited 2008-09-27 21:37
    I have a similar circuit with the prop and the LM386. I'm developing an application where I want to play short sound effects lasting 5 seconds or so and have the speaker be as quiet as possible when no effects are playing. I'm using the Synth object to play simple beeps and such. Here is an example of making a simple beep.
    Freq.Synth("A",sPin,527)
    waitcnt(20_000_000 + cnt)
    Freq.Synth("A",sPin,0)

    I'm not sure it's valid to call Freq.Synth("A",sPin,0) passing in 0 as the frequency. It definitely stops the sound, but a few seconds later I get some strange interference. Would it be better to set the sound pin to input when I want silence?

    Thanks.

    CP
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-09-29 06:16
    @ parts man - My expieriences with the LM386 have been "adequate". While it can opperate from as little as 4 volts, I would recomend 6-9V power, and a 16 ohm load. At 5V, this amp will climb above 3%THD quickly while not delivering effective power to the load. I would also like to note that if you try to extrapolate more than 125 mW (at any Vss), you should REALLY consider a heat sink. A·220 transistor type would be adequate.·This amp WILL get very hot at power levels greater than 150 mW, to the point of thermal breakdown.·Also note the THD (Total Harmonic Distortion) graph in the documentation, they feature 3% as "low". This is not low, this is a higher rating than my 1000W class D at full power and 1 ohm load!

    Also the voltage supply varies with package, attention should be given with consideration to the part number in your hand. You may also need to include a decoupling capacitor to the input.

    My opinion, opt for something with a 1%THD rating, it'll give alot cleaner sound, maybe even without the heat. The LM386 is good for a radioshack science project, not something production.

    Hope this helps.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
  • parts-man73parts-man73 Posts: 830
    edited 2008-09-29 12:43
    *** NOTE - this thread is a year and a half old - it was bumped by someone with a similar question. My needs with regard to this subject were taken care of, but I appreciate your reply!
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-09-30 00:20
    oops, my bad

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
  • mparkmpark Posts: 1,305
    edited 2008-10-02 03:34
    Actually, RinksCustoms, did you have a part in mind? I could use a recommendation for something that's as easy to use as an LM386 but has better performance and works at 5V.
Sign In or Register to comment.