Going from through hole to SMT lm386 circuit, oscillations

Discussion in 'The Projects Forum' started by nristow, Feb 9, 2016.

  1. nristow

    Thread Starter New Member

    Feb 8, 2016
    5
    0
    Hi folks,

    We have an amplifier circuit that uses a lm386m-3 to a little 0.1 watt 8 ohm speaker. The board is completely through hole and has worked for years. Recently the components were changed to SMT, swtiching to a lm386m-1. The layout hasn't changed significantly. The circuit is used to amplify the signals of neurons in insects. We are looking at signals up to 1300hz. The circuit is powered from a 9v battery and the entire setup is not grounded.

    The issue is that when the SMT board is setup the same way as the through hole, just starts screaming. Its possible to reduce it somewhat by grounding the board, either by putting a hand on the battery or battery terminal. Plugging in an external speaker disconnects the input to the lm386 and the board works with no noise.

    So far have tried several boards, rf filter ahead of the ad623, different gains and filters ahead of the lm386, and changing the gain on the lm386 itself. We tried boards with ground pour, no ground pour, round corner traces, 4 layers, etc. Different boards have different behavior, but they are all noisy or need to be grounded. Sometimes the noise is just screaming, sometimes there is a voltage spike, like a capacitor discharging and the signal is completely lost. I'm hoping there is something simple that I'm missing, or if the smt version of these parts are that much different from through hole. The original through hole board uses ceramic capacitors and one electrolytic in series with the speaker. The smt board uses mlcc capacitors with an smt electrolytic in series with the speaker.
     
  2. RichardO

    Well-Known Member

    May 4, 2013
    1,228
    382
    I don't see anything obvious. This makes me suspect that the actual components used to build the SMT version are not what you think or that the PCB has a subtle layout error. Post the PCB artwork for us to look at...
     
  3. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,965
    743
    Have you got an Oscilloscope to view the circuit input and output?
     
  4. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,906
    2,158
  5. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    So the entire board has been redesigned to use SMT devices, and that is when the problem began?

    Please post a photo of both sides of the board.
     
  6. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    All audio power amplifier chips are notorious for an extreme sensitivity to power supply decoupling and ground path hygiene. Are your larger caps still electrolytic, or did you change to 10 uF ceramics?

    There are seven different application circuits on the datasheet, and every one has a DC path to GND for both inputs. Why is R9 DNP?

    ak
     
  7. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,124
    266
    Use an Exacto blade to cut the traces connecting the different parts of the circuit, then you can play with it and track down that instability.
    Or just remove the stage coupling capacitors. Re-test everything.
     
  8. Roderick Young

    Member

    Feb 22, 2015
    408
    168
    If I had the luxury of doing so, I would get an SOIC-8 to DIP adapter board, mount one of the new parts on it, and plug it into the old through hole board. If that doesn't work, I'd start considering whether I had a bad lot of parts. They came from a reputable source, right?

    Were both old and new boards generated by the same schematic? Is there any chance that in making the new board, some SMT component was assigned the wrong pinout?

    I'd also go node-by-node, and look at the corresponding signals on each board. If there are only a small number of components, I'd start swapping through hole components onto the new board (yes, could be a little messy), to see if it made any difference.
     
  9. nristow

    Thread Starter New Member

    Feb 8, 2016
    5
    0
    Thanks for the responses.

    Yeah the circuit was originally designed and produced years ago using through hole components. In the switch, the through hole components were replaced directly with the SMT components. The difference between the 2 schematics are C7 and R7 are swapped, R4 and C9 are populated to increase the gain. We used an LM386m-3 on the through hole version and didn't need the extra gain. The only electrolytic on both through hole and SMT boards is the 220uF C3.

    I've attached the board layout. There is a ground pour on both sides, but there is only one trace on the back for vcc/2 going to the RCA connector.

    R9 was never needed in the through hole board. I've tried several resistors from 100 to 100k ohm for R9.

    Tried a few things today. 100 ohm R9, electrolytic 10uf on C10, electrolytic 0.33uF on C5, electrolytic 220uF across battery terminals. Soldered a through hole LM386 onto one of the SMT boards, and get the same issue. It's difficult to probe the circuit using a scope. When hooked up to the experiment, grounding the board changes the output. If it would be useful I can probe different points with a scope. I usually use the phone app as the phone doesn't change the output as drastically.

    With the speaker connected, we get a lot of noise and the output is unusable, but we can hear the spikes. When the speaker is disconnected, we get a usable signal out of the audio jack. I have attached two images of the signal from the smartphone jack with the speaker disconnected. One is just background noise and one with signal.

    no input signal.PNG signal.PNG

    Also attached is a scope capture from the battery terminal with no input attached. The amplifier motor boats with no inputs.
    battery terminal 9v.png
     
  10. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,281
    1,230
    The circuit has really high gain so it is very important that the outputs can't even think about the inputs.
    I see a lot of plugs that might make some long trace runs. Make sure they don't come close to any outputs.
     
  11. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    That immediately alerts me. I would remove them and see if the problem goes away.
     
  12. nristow

    Thread Starter New Member

    Feb 8, 2016
    5
    0
    With the LM386 set at 20x gain, R9 and C9 unpopulated, the speaker is definitely quieter but the noise is still there.

    This is just really strange. We must have just the right selection of everything, layout, filter, gain, etc to make this circuit unstable. We have another board with the same layout, but different filter, gain settings and double ended inputs for recording EMG. Those boards work fine both through hole and SMT.
     
  13. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,281
    1,230
    I think someone suggested it before, but you could unplug from the AD623 and add like a .1Ufd. from 2 to 3 to see if it stops.
    If not lift the left side of c7 and ground it. If not do the same with c10. This should at least narrow it down to where the problem is.
     
  14. nristow

    Thread Starter New Member

    Feb 8, 2016
    5
    0
    Ah, I missed that. I will give that a try. Thanks!
     
  15. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,281
    1,230
    Might make the cap on pin 7 of the 386 47 Ufd.. That might help.
     
  16. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    This may have been mentioned, but I don't remember it. My experience with the LM386 is that if the supply voltage sags, the amplifier tends oscillate.
     
  17. nristow

    Thread Starter New Member

    Feb 8, 2016
    5
    0
    We were able to do more testing. A 0.1uf cap across the inputs, with no other connections does this when powered up:

    startup 0.1uf cap on inputs.png

    The yellow trace is the output of the AD623, pin 6 and the purple trace is the output of the LM2272 pin 7. When the inputs are shorted we can hear noise as normal through the speaker. A sine wave from a signal generator comes through. When hooked up to a specimen all we get is white noise, no spikes. Also with this input capacitor we don't get the odd ground behavior/instability that I describe below.

    Without the input capacitor we get the same issue as before. The circuit almost works, if we put the pins close together on the specimen everything works and is stable. As we spread the pins apart, the circuit becomes more unstable until it is useless. With the pins spread as far as possible (about 1 inch), we get the largest signal. The signals we are looking for are in the microvolt range. With 4x220 gain we are getting maybe 300mV output.

    I'm guessing this is all related, but this SMT version works great if we ground the board. Just hooking up a ground to the oscilloscope will give us a usable signal. Touching the board on the soldermask over the ground plane or anywhere on the battery makes the circuit stable and we get a nice signal. Not sure what this effect is or how to reduce/remove it.

    I have a new layout, it is our through hole board with components directly replaced by SMT components. I moved as little as possible. I thought the through hole version was close to the layout of the SMT, but I was wrong. The traces are completely different.

    Thanks again for the suggestions.
     
Loading...