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.
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.
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.
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.
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.
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.
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.
Shouldn't R27 be connected to analog GND, same potential as the opamp's +input, instead of GND?
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.
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!
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.
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-49124276Put 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.
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.
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 ?
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).
The pad numbering of the NE5532 on the PCB looks backwards compared to the datasheet.
The input resistances of these NE553X are quite low, and vary between manufacturers, - which might have a damping effect on the filter.
Say, is that flux residue?
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?
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.
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.
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 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.
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.
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.