Problems with noise spikes on power rail - Page 1
Forum section: electronics / beginners

author: mribble
author_rank: Regular Contributor
timestamp: October 06, 2017, 06:21:02 pm
content: I am using an audio amplifier with 100x gain and it is showing spikes like this every 100 ms.I figured out the issue is the system has a wifi module (esp8266) that is doing some processing every 100 ms. When I disconnected the wifi module then the audio amplifier worked as I expected. I looked at the power rail on the system and it was dropping about 0.1 V. Just to test I put some 1000 uF caps (system already had a 100 uF cap on power and 0.1uF/10uF caps at the esp8266 and sound module). After adding the 1000 uF caps I could no longer see noise on the main power rail, but I still saw the same issue after the audio amplifier. So there must still be some noise on the power rail, but I just can't see it on my cheap scope anymore. So the 1000 uF caps helped, but didn't solve the issue.What are some ways to deal with noise like this on power rails?

author: katzohki
author_rank: Frequent Contributor
timestamp: October 06, 2017, 07:04:00 pm
content: Well that you have local decoupling capacitors is good, (they arelocalright?) but you could really go "belt and suspenders" by adding some resistance in line to the amplifier. In the range of 10-100. You should also probe your input to that amplifier and check to make sure that noise is not on the input side. You can add filtering to your amplifier, though I understand if you have a reason to not want to do this. Since it's occurring at a rate of 10Hz, I think you could give a high pass filter a try and still get good audio performance.Since you're dealing with wifi (i.e. magic radio stuff), you may want to consider the layout and/or try some shielding.Another thought, what is the current being consumed? Are you running at or above the capability of your source and regulators?

author: mribble
author_rank: Regular Contributor
timestamp: October 06, 2017, 07:56:02 pm
content: Yes, the decoupling caps are local.When you say adding resistor in line to the amplifier you mean on the op amp's v+ line have something like the following, right?[3.3V] -> [50 ohm resistor] -> [Decoupling cap] -> [op amp v+ pin]I'm pretty sure power supply current isn't an issue. I was running off USB, but have the option to run off a 2A supply and I tried that. It had the same results and that should be way more power than is consumed. Also since I don't see voltage drops on the power rail that also seems to discount this.I tried wrapping things in tin foil to see if shielding would have an impact. My shielding experiment wasn't perfect, but after a bunch of tin foil I saw no change so for now I will assume this isn't the issue.One thing I was thinking about was adding an inductor to decouple the spikey current usage of the wifi chip. Do you think something like that might help? Or should I focus on filtering it on the op amp sides since I know the voltage rail drops are small.I think I'd have trouble seeing voltage differences with my scope on the input lines. I do plan to test these, but first I'll reduce the gain from 100x to 10x. Then if I'm still seeing significant distortion on the output I should be able to confirm it's on the input.If I designed a high pass filter to throw out 10hz, I'd be concerned that someone would change the wifi transmit frequency (this is configurable in software) to 50 ms and then the noise would be happening at 20 hz. That said if this is the only option that works I could probably remove everything over 50 hz. This isn't actually recording sound, but is rather using sound volume to trigger things and I don't think I need to worry about really low frequency sounds. That said I haven't done designed a high pass filter before. Is there a good reference?

author: mribble
author_rank: Regular Contributor
timestamp: October 06, 2017, 08:15:29 pm
content: Actually, would a high pass filter even work? The problem is a 2-3 ms voltage spike every 100 ms. So I think the filter would need to need to eliminate those spikes. Unfortunately that is around 500 hz which is an important frequency for audio. If this is wrong, let me know. As I mentioned I haven't design these low/high pass filters.

author: mribble
author_rank: Regular Contributor
timestamp: October 06, 2017, 08:33:30 pm
content: One more update (I need to go on date night with my wife after this one).I tried changing the gain to 10x and that greatly reduced the size of the spike. Now the spike is only a -0.25 V spike. I suspect if you know more about op amps this might help you know if the problem is from noise on the v+ line or from the op amp inputs. The voltage differences on the input lines would be so small (0.025V) I'd have trouble seeing them on my scope, but that is something I can try.

author: technogeeky
author_rank: Frequent Contributor
timestamp: October 06, 2017, 11:23:57 pm
content: Quote from: mribble on October 06, 2017, 08:33:30 pmAs a new owner of ahigh speed power supply, I do wonder if what you are seeing is a problem borne from a "slow" power supply. Surely a USB power supply qualifies as slow, but so also might your bench power supply. If the (about 3ms) event which is happening every 100ms is actually transmitting a wifi or other radio signal (and this could make sense? I thought only APs send 100ms beacon packets, but maybe clients do something similar), then the huge (relative to the idle) current draw could cause a voltage drop like this.A quick way to test this theory would be to power from an actual battery (which is even faster than a high speed power supply). Probably both with and without extra capacitors.As a quick rule of thumb for thinking about how fast or slow a bench power supply is, note that most (even high end) power supplies are rated to return to the requested voltage (after a pulsed load) after a period of something like 100 µs (or much slower)for a load change 50% - 100% of the current load. The aforementioned high speed power supply (and others like it) return to the requested voltage in less than 40 µsfor a load change of 1000%. And in practice they are often still faster than this. I presume an actual battery is even faster.In any case, this may be totally the wrong route to investigate but it should be a quick and easy test.

author: mribble
author_rank: Regular Contributor
timestamp: October 07, 2017, 10:08:16 am
content: I tried using batteries instead of a power supply and that did not help.Thanks for all the suggestions! Please keep them coming I will keep people updated on what I have tried.

author: mribble
author_rank: Regular Contributor
timestamp: October 07, 2017, 11:47:07 am
content: I tried using my power supply to power the wifi module (obviously just connecting grounds between of the power supply and my main circuit). That did solve the problem. So what this seems to indicate to me is that the power draw from this wifi module is affecting the rest of the system enough to cause my opamp issues.I think the solution to this is to add bypass caps and inductors (here's an article I read about that -http://www.designers-guide.org/design/bypassing.pdf). However, I don't really know how to size the rule of thumb on sizing the caps and inductors? My wifi module uses about 70 mA (3.3V) base and spikes to a max of around 300 mA. I'm also not sure if the ringing that paper mentions would be a problem for me or not. If you could just give me a range of components to try I could run some tests, but right now I don't even have a clue of what values I should choose. Are there any common ones on mouser/digikey that people use or anything special I should consider when choosing them? I want to hack together some tests before ordering new PCBs.Also I'll post the circuit I'm using for sound detection since maybe there is something there I could do to help with this issue. This circuit is very close to the max4466 reference circuit.http://glacialwanderer.com/files/2017/sound_circuit.png

author: mribble
author_rank: Regular Contributor
timestamp: October 07, 2017, 02:49:03 pm
content: I had this inductor at home so I tried it:http://www.mouser.com/ProductDetail/Murata/LQH32CN470K53L/?qs=sGAEpiMZZMsg%252by3WlYCkU9cBunQOYkmyxynrrck1O38%3dI put it on the power rail going to my wifi chip. Then on each side of the inductor I added a 10uF ceramic cap and a 100 uF electrolytic cap (so a total of 4 caps). Then I measured these voltage spikes:1) On the wifi side of the inductor I saw 0.12 V drop2) On the non-wifi side of the inductor I saw a 0.06 V drop3) On the opamp's output I saw a 0.25 V drop with the 10x gain (If I go back to 100x gain I'm sure this would be much worse)So it looks like the inductor helps, but is not enough. If anyone has rule of thumb suggestions for sizing an inductor here (or has other ideas on how to fix my issue) please let me know.

author: mribble
author_rank: Regular Contributor
timestamp: October 07, 2017, 06:49:48 pm
content: Actually, I took out the inductor and it doesn't seem to be affecting the opamp's output at all. It could be the case when I did that I also added some caps.I have just measured the output voltage spike on the opamp output with a non modified esp8266 module and the one I have with lots of extra caps. The voltage spike went from 0.40V to 0.27V.

author: David Hess
author_rank: Super Contributor
timestamp: October 08, 2017, 05:22:52 pm
content: Decoupling by itself will not solve a problem caused by a ground loop. Consider where the ground return currents are going. It may be necessary to implement a single point ground or to isolate the signal grounds from the power grounds.Your audio amplifier may have terrible power supply rejection. If that is the case, fixing the amplifier may be easier. Good audio amplifiers do not require regulated or low noise supplies.Implement RLC decoupling at both the WiFi module and the audio amplifier.

author: mribble
author_rank: Regular Contributor
timestamp: October 08, 2017, 05:29:47 pm
content: David, I've determined my PCB routing is pretty bad. This is the most complex board I've done myself and have learned a ton. I'll make sure the next version fixes a lot of the issues I've learned about and should help significantly with the rail voltage drops I'm seeing.I also found a solution to my audio op amp issue by using a different circuit (they had 2 reference circuits I used one, but the other was much much better about handling noise on the voltage rails).https://www.eevblog.com/forum/beginners/trying-to-understand-voltage-drop-issue/I've thought about adding RLC decoupling, but I think with my new layout plans and the better understanding of how to do good opamp designs I should be good.

author: TimFox
author_rank: Super Contributor
timestamp: October 08, 2017, 11:12:10 pm
content: You don't indicate your country. Are you in 50 Hz or 60 Hz territory?Sometimes, spikes like this are line-synchronous, which can be judged using the oscilloscope sweep in "line" trigger mode.I have sometimes seen problems like this coming from a zero-crossing switch in a soldering station plugged into the same outlet strip as the device under test.

author: mribble
author_rank: Regular Contributor
timestamp: October 09, 2017, 05:30:11 pm
content: I'm in a 60 territory. That said, I know that isn't the problem. The frequency of these spikes lined up exactly with the wifi transmit frequency. It is solved now. Thanks for all the help!