Author Topic: Why is my SMT PCB so much worse than my breadboard layout?  (Read 10384 times)

0 Members and 1 Guest are viewing this topic.

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Why is my SMT PCB so much worse than my breadboard layout?
« on: August 28, 2016, 04:27:38 am »
I am working on a circuit that is supposed to be a multiple feedback band pass filter at 16900Hz. On my breadboard I get a reasonable approximation to what the math/theory expects, but when I moved my circuit to 0603 parts on a two layer board it gets much worse - especially at the low end. I would expect it to get better on a PCB, not worse! (Tighter loops etc).

Attached is an image with the expected response (blue), PCB response (green) and breadboard response (orange). Also attached is a of the layout, the real life pcb and the breadboard and schematic. (Ignore extra components on the breadboard, they're not connected).

Is there coupling going on in the board? I can't think of anything that would cause such a worsening in frequency response, especially at the low end.

How can I modify my design to get closer to the ideal frequency response?

All resistors are 1%, caps are 10% or 20% X7R.

Thank you.
Read about my stuff at: projects.matthollands.com
 

Offline singapol

  • Frequent Contributor
  • **
  • Posts: 420
  • Country: sg
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #1 on: August 28, 2016, 04:58:07 am »
I suspect the quality of the caps, for ceramics X7R is the cheapest and worst in terms of leakage you should use COG types but since this is not RF territory only about 16K hz. film caps such as polyester (mylar/MKT), polypropylene/MKP can do. For really accurate specs. perhaps polystyrene or silver mica ( through large size)..same with polystyrene but also subject to temperature/temp.co.
 
The following users thanked this post: MattHollands

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #2 on: August 28, 2016, 06:20:20 am »
Thanks for the responses!

But the caps in the breadboard are also X7R? Why does the transfer function look more like expected in this case?

Do you have any suggested information about where each type of cap belongs? e.g. any good application notes.
Read about my stuff at: projects.matthollands.com
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11640
  • Country: my
  • reassessing directives...
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #3 on: August 28, 2016, 06:36:17 am »
How can I modify my design to get closer to the ideal frequency response?
remodel you simulation to take into account capacitive coupling between each component's pad to ground plane, and readjust component values to get back what you want. looking at your schematic, i will start remodeling at node near label C25 and node near label AGND because that where higher impedance input is, capacitive coupling around 1-2pF each. my 2cnts ymmv.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Tim F

  • Regular Contributor
  • *
  • Posts: 107
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #4 on: August 28, 2016, 07:18:28 am »
I don't suspect the Q of the X7R of the caps to be a major issue for frequency response. The tolerance of the caps (and resistors to a lesser degree) will lower the Q and move the center frequency of your filter, as will parasitic capacitance of the board/layout and opamp inputs. One of the caps is probably 10-20% off nominal on the PCB build.

You shouldn't have a 10dB attenuation across all frequencies on the breadboard though. I would suspect the 6K2 being out of spec, the output impedance of the source to be high or another problem in the measurement setup.
« Last Edit: August 28, 2016, 07:21:24 am by Tim F »
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #5 on: August 28, 2016, 07:57:24 am »
I don't suspect the Q of the X7R of the caps to be a major issue for frequency response.

Do you see anything that could explain the terrible low end filtering?

You shouldn't have a 10dB attenuation across all frequencies on the breadboard though. I would suspect the 6K2 being out of spec, the output impedance of the source to be high or another problem in the measurement setup.
I just built another filter (same circuit etc), and I'm getting my peak at 40.5kHz! This is ridiculous I don't understand what is up with my filters.

My measurement process is: Power up board, connect sig-gen to input, connect channel one across input, connect channel 2 across output. Set frequency, measure input peak-to-peak, measure output peak-to-peak, change frequency etc.
Read about my stuff at: projects.matthollands.com
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #6 on: August 28, 2016, 07:59:15 am »
Also, if it helps,  I built a 60Hz filter on the breadboard and it was pretty bang on the mark. Haven't built it on the pcb yet though.
Read about my stuff at: projects.matthollands.com
 

Offline Niklas

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: se
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #7 on: August 28, 2016, 08:09:20 am »
Shouldn't R27 be connected to analog GND, same potential as the opamp's +input, instead of GND?
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #8 on: August 28, 2016, 08:40:47 am »
Shouldn't R27 be connected to analog GND, same potential as the opamp's +input, instead of GND?

I don't think it should matter - DC is blocked by the caps. However maybe it will put greater DC bias on the caps leading to greater variation in capacitance. The original thinking behind this is that AGND is generated by an Opamp at Vcc/2 and so I wanted it to be sinking as little current as possible.
Read about my stuff at: projects.matthollands.com
 

Offline chuckb

  • Frequent Contributor
  • **
  • Posts: 342
  • Country: us
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #9 on: August 28, 2016, 03:55:31 pm »
A few things to check
1. The Op Amp bypass capacitor is missing from the SMD pcb picture. That is critical for a high frequency opamp connected with test leads.
2. In a prototype application the hookup of signal generator, power supply, output monitor are all critical. Because of R27 grounding to the power ground (good catch Niklas!), the audio signals are traveling through the power supply lines. I would recommend having a single point on the pcb where all the power supply, signal generator and output monitor ground connections come together in one spot. And of course all that test equipment, except one, needs to be floating from power ground.

Good luck!
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #10 on: August 28, 2016, 08:57:33 pm »
Just to be clear, here are a couple more schematic details. Attached is an image showing how I generate AGND which is Vcc/2. The ground connection for all of my test equipment is the black circle on the output of the opamp (the board is floating). The sig-gen, input monitor and output monitor are marked with red circles.

If I understand what you're saying, the problem could be that the signal from the sig-gen is travelling through R24 and R27 and into ground, and then has to find a return path to AGND which is causing the problem? I see how this could be the case, but want to check I understand.

Also, to clarify - VAA is the same as VCC.
« Last Edit: August 28, 2016, 09:19:27 pm by MattHollands »
Read about my stuff at: projects.matthollands.com
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #11 on: August 28, 2016, 10:19:54 pm »
Totally off topic:  I would use solder paste and a cheap hotplate to solder these components.  Something like the unit I bought from Target:

http://www.target.com/p/elite-cuisine-single-cast-electric-burner-hot-plate-in-black/-/A-49124276

Put the board on the hotplate, set the dial to HIGH and watch until the solder flows.  When done, gently remove the PCB with a pair of tweezers and set it aside to cool.  Then worry about turning off the hot plate.

Why not take the radial lead capacitors from the breadboard and stick them down to the PCB?  Just to see...
Maybe try the resistors too.


 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #12 on: August 28, 2016, 11:48:31 pm »
Totally off topic:  I would use solder paste and a cheap hotplate to solder these components.  Something like the unit I bought from Target:

http://www.target.com/p/elite-cuisine-single-cast-electric-burner-hot-plate-in-black/-/A-49124276

Put the board on the hotplate, set the dial to HIGH and watch until the solder flows.  When done, gently remove the PCB with a pair of tweezers and set it aside to cool.  Then worry about turning off the hot plate.

Why not take the radial lead capacitors from the breadboard and stick them down to the PCB?  Just to see...
Maybe try the resistors too.

Yep my soldering is horrible! I probably will reflow solder for the final build but atm I want to build it slowly and debug my issues.

I have replaced the 1k3 resistor from GND to a through hole resistor to AGND to see the difference. Frankly, there's not much difference.

First image is the original response and second image is with the 1k3 to AGND.
Read about my stuff at: projects.matthollands.com
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2085
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #13 on: August 29, 2016, 12:12:35 am »
Shouldn't R27 be connected to analog GND, same potential as the opamp's +input, instead of GND?

I don't think it should matter -
It wouldn't matter if AGND was generated by perfect components, but I wouldn't be happy adding the response of U1A into the signal path.
What vaue is Vcc (or Vaa) relative to GND ?
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #14 on: August 29, 2016, 12:34:03 am »
Shouldn't R27 be connected to analog GND, same potential as the opamp's +input, instead of GND?

I don't think it should matter -
It wouldn't matter if AGND was generated by perfect components, but I wouldn't be happy adding the response of U1A into the signal path.
What vaue is Vcc (or Vaa) relative to GND ?

You're right, that is totally a reason to use AGND instead. VCC=VAA=12V. I have since replaced the 1k3 resistor to GND with a 1k3 (TH) resistor ro AGND and not experienced too much difference (look at my previous post).
Read about my stuff at: projects.matthollands.com
 

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #15 on: August 29, 2016, 01:24:41 am »
The pad numbering of the NE5532 on the PCB looks backwards compared to the datasheet.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #16 on: August 29, 2016, 01:45:06 am »
The input resistances of these NE553X are quite low, and vary between manufacturers, - which might have a damping effect on the filter.
.  That took much longer than I thought it would.
 

Offline Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3338
  • Country: ca
  • Place text here.
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #17 on: August 29, 2016, 02:02:28 am »
Say, is that flux residue?
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #18 on: August 29, 2016, 03:45:01 am »
The pad numbering of the NE5532 on the PCB looks backwards compared to the datasheet.


The IC is on the back side of the board. We are viewing it as if we are looking at the front side of the board and looking through the board to the back side - so everything is mirrored.

The input resistances of these NE553X are quite low, and vary between manufacturers, - which might have a damping effect on the filter.

You're right - all of my simulations so far had assumed infinite input impedance and infinite input resistance. I have done some more maths and simulation. Attached is an image showing the frequency response for input impedances of infinite, 300k (typical) and 30k (minimum). As you can see the 30k and 300k are practically on top of each other but have a good 5dB drop at the peak from the perfect case. This explains some of the missing gain! I would still like to see if I can improve it further. Do you have any recommendations for opamps with higher input impedance? Preferably low noise and pin compatible (although I'm respinning the board anyway so it doesn't matter too much).

Say, is that flux residue?

Say, yes. I guess you're hinting to me that that could be causing a problem... Extra stray capacitance?
« Last Edit: August 29, 2016, 05:31:42 am by MattHollands »
Read about my stuff at: projects.matthollands.com
 

Offline chuckb

  • Frequent Contributor
  • **
  • Posts: 342
  • Country: us
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #19 on: August 29, 2016, 03:49:46 am »


I have replaced the 1k3 resistor from GND to a through hole resistor to AGND to see the difference. Frankly, there's not much difference.

First image is the original response and second image is with the 1k3 to AGND.
[/quote]

I agree, it looks like the original connection with the 1k3 resistor GND works better. From your results it seems like the 1 kHz (-24dB) and 100 kHz (-16 dB) attenuation values are now inline with your expected results. The peak response is still 10dB low. Could this be capacitor matching issue?

Is there a 0.1ufd power supply bypass capacitor on the pcb? You may need a 10ufd cap also for this low frequency operation. This may help affect your peak gain.
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #20 on: August 29, 2016, 06:10:27 am »
I agree, it looks like the original connection with the 1k3 resistor GND works better. From your results it seems like the 1 kHz (-24dB) and 100 kHz (-16 dB) attenuation values are now inline with your expected results. The peak response is still 10dB low. Could this be capacitor matching issue?

Is there a 0.1ufd power supply bypass capacitor on the pcb? You may need a 10ufd cap also for this low frequency operation. This may help affect your peak gain.

I have a 10uF on the board near the power supply, I don't have a 0.1uF near the amp. I don't have any 0.1uFs, but I'll try a 1uF instead.

So one thing I have noticed is that my input signal is about -3dBu, which basically means that all of my readings are actually 3db too low, so that accounts for some missing gain. Plus, I am thinking of changing to the TL082 which has an input impedance of 1GOhm, this should give a few more dBu too.
Read about my stuff at: projects.matthollands.com
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8172
  • Country: fi
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #21 on: August 29, 2016, 08:03:28 am »
I vote for the X7R issue. Just fix it first (even soldering in the though-hole caps, it's well possible, just looks nasty), it's the most probable culprit. The fact that you are using X7R on the bread board doesn't matter - not all X7R are identical. Some are much worse than others (mostly depending on the physical size).
 

Offline MattHollandsTopic starter

  • Frequent Contributor
  • **
  • Posts: 313
  • Country: gb
    • Matt's Projects
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #22 on: August 29, 2016, 08:23:21 am »
I vote for the X7R issue. Just fix it first (even soldering in the though-hole caps, it's well possible, just looks nasty), it's the most probable culprit. The fact that you are using X7R on the bread board doesn't matter - not all X7R are identical. Some are much worse than others (mostly depending on the physical size).

I''ll hopefully get some time to try that tomorrow!

In the meantime, does anyone see anything wrong with my layout that could be causing issues? I'm running to a (personal) deadline (ie I'm leaving the country) and will need to order my second round of boards by September 1st in order to hit the deadline. Of course I will have more time to decide on components as digikey takes far less time to delivery than it takes to get boards in from China.
Read about my stuff at: projects.matthollands.com
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #23 on: August 29, 2016, 09:56:40 pm »
Well all I can do is simulate it.
After making very large changes (X10+) to the filtering and other parasitic components, I've also come to the conclusion that the input impedances of the op amps aren't the problem, they cause offsets but not the flattening.

Possibly it's something to do with the output impedance, - which probably also means the impedance of the v/2 virtual ground. If you were using a proper + GND - supply on the breadboard, and then swapping to the op amp virtual GND version on the PCB - that would be a suspicion.

Of course, other theories are available on request.  :D
.  That took much longer than I thought it would.
 

Offline Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3338
  • Country: ca
  • Place text here.
Re: Why is my SMT PCB so much worse than my breadboard layout?
« Reply #24 on: August 29, 2016, 11:11:39 pm »

Say, is that flux residue?

Say, yes. I guess you're hinting to me that that could be causing a problem... Extra stray capacitance?

No. What kind of flux? I can't tell from the picture. But if that's water soluble flux, it's conductive, and needs to be cleaned off immediately.
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 
The following users thanked this post: MattHollands


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf