Trying to understand voltage drop issue - Page 1
Forum section: electronics / beginners

author: mribble
author_rank: Regular Contributor
timestamp: October 07, 2017, 11:21:49 pm
content: I have an ESP8266 module which normally consumes 70 mA, but every 100 ms that spikes to 250 mA for 1 ms. I was seeing my entire voltage rail for the whole PCB drop by 0.1 V. Normally a small drop like that wouldn't be a big issue, but I have an op amp on the board that is amplifying this voltage drop and that is causing me issues.I already had lots of decoupling caps for every IC on the PCB, but I added a 1000 uF cap near the esp8266 for testing. This rounded the rail voltage drop from what looked like a 0.1 volt drop for 1ms square wave to a much more rounded wave, but even a rounded wave is causing the op amp issues.After I figured out what was happening I suspected the issue was that my power supply wasn't good enough (spoiler - after testing I don't think that is the problem). So I tried switching from USB to battery power (both going through my linear regulator). Neither of those fixed it. Then I bypassed the linear regulator completely and just powered the PCB with a big bench power supply. That also showed the same issue. So now I don't think the issue is my power supply.Looking at the PCB I'm starting to question my 3.3V rail trace layout. I used 0.012 mil traces for power and tried to keep them direct, but the board is about 4 inches so they are at least that long. I have a good ground plane. I'm wondering if inadequate PCB traces for the 3.3V rail would cause a power drop like this? I shared the PCB here incase anyone wants to take a look (kicad):http://glacialwanderer.com/files/2017/CA6.kicad_pcbCan anyone say would would cause this kind of a power drop (where the whole rail drops by a small voltage for the duration of the large load)? Even better is there a way I could isolate the power drop to just the esp8266?

author: Brumby
author_rank: Unknown
timestamp: October 07, 2017, 11:27:09 pm
content: Quote from: mribble on October 07, 2017, 11:21:49 pmHow is this being done?Does the op-amp have an input monitoring the supply line - or is the op-amp picking up a drooping supply to its own power pins - or is there something else at play?These are the sort of problems that result in separate supply and ground circuits being used for analogue and digital sections of a board.

author: rstofer
author_rank: Super Contributor
timestamp: October 07, 2017, 11:27:44 pm
content: Try adding in some wires in parallel with the traces. Big wires. I can't look at your board file but I'm betting that your 3.3V rail is the culprit.Try putting the bulk capacitor at the far end of the rail. Or capacitors on each end.

author: mribble
author_rank: Regular Contributor
timestamp: October 08, 2017, 12:01:13 am
content: Thanks!Brumby,I don't know what "op-amp have in input monitoring the supply" means. Could you explain that since if there is a relatively inexpensive way to fix this on the op-amp I'd be happy to do that. The answer to your question though is that the op-amp is picking up the drooping supply on it's own power pins and on the input (I've seen both have drops corresponding to the drooping 3.3V rail on my scope). It is a pre-amp for a microphone and I use voltage dividers to set the reference voltage to vcc/2. Previously I did try using a separate power supply for the op-amp and that did fix the issue, but that isn't a viable real fix. When I used a scope I could see small voltage dips that corresponded to the bus drop on both v+ and the input to op-amp. I don't fully understand that since I would think if the input to the op amp shows a dip in voltage then just using a separate power supply for the op amp wouldn't fix the issue, but it did.rstofer,I already added some big caps around the system and as I said if I add enough I can round the corners of the voltage droop. Adding thick wires will be a bit of a pain since the board is pretty complex, but I will try that for the high current paths. Could you explain why this would be causing the drops? The traces aren't getting warm and so I can't see what would be causing this kind of current drop under load (if they go hot I could see that impacting resistance which could drop voltage). If there is an explanation for this kind of thing I'd love to hear what it is.

author: wraper
author_rank: Unknown
timestamp: October 08, 2017, 12:14:55 am
content: Quote from: mribble on October 08, 2017, 12:01:13 amIf you do something like on the picture below, there is your problem. You need to filter power for microphone and voltage divider like on second picture. If divider is not part of the signal path but separate virtual ground, then you can add capacitor from divider output (opamp input) to GND. And your problem is not voltage spikes on power rail but that you are injecting the noise from power rail into the small signal which is then amplified.

author: DimitriP
author_rank: Super Contributor
timestamp: October 08, 2017, 12:18:18 am
content: Quote0.012mil?Here is a trace width calculatorhttp://www.4pcb.com/trace-width-calculator.html

author: lem_ix
author_rank: Regular Contributor
timestamp: October 08, 2017, 12:20:00 am
content: Your 3v3 rail seems very thin (12 mils) and badly routed to me. Make it thicker and don't daisy chain everything like that. So much free board space.

author: IanB
author_rank: Super Contributor
timestamp: October 08, 2017, 12:25:29 am
content: Quote from: mribble on October 07, 2017, 11:21:49 pmHow thick are your power traces? If you want a stiff power supply, remember that electric circuits arecircuits-- and it's no good having a good ground plane if you don't also have a good power plane!Quote from: mribble on October 08, 2017, 12:01:13 amIt's nothing to do with getting hot. All current paths have resistance, and if the current paths are small (thin, narrow) they have higher resistance. Increasing the current flow through a wire or a PCB trace increases the voltage drop along that path by Ohm's Law. It's as simple as that. If you don't want voltage drops when there is an increase in load, then use thicker wires or thicker traces. That's simply how physics works.(And that's in addition to other advice given in this thread.)

author: wraper
author_rank: Unknown
timestamp: October 08, 2017, 12:36:54 am
content: QuoteIn case somebody (like me and most people) don't have kickad, he would not bother to install one. Post a picture or PDFif you want your problem solved.

author: lem_ix
author_rank: Regular Contributor
timestamp: October 08, 2017, 12:45:18 am
content: Not much of a kicad user so dunno if it's possible to export pdf so I'll leave that to someone else but here's a part of the pcb and 3v3 rail. Zoomed out i can barely see it :SEDIT: brainfart just 3v3 highlighted new pic under

author: lem_ix
author_rank: Regular Contributor
timestamp: October 08, 2017, 12:56:21 am
content: And the whole thing gnd plane not shown.EDIT: because of brainfart... top missing too just 3v3 highlighted. 3 AM sorry bout that...

author: mribble
author_rank: Regular Contributor
timestamp: October 08, 2017, 01:51:31 am
content: My preamp circuit is below. It is basically the suggested circuit for the max4466 opamp that I'm using.It has filtering like you suggested for the mic's power, but I don't see any there for the voltage divider. That said I've added a bunch of extra caps to the my circuit and it hasn't really helped things. The problem is the voltage drop lasts for 1 ms so caps and caps won't handle long term drops like that.Attached schematics and main board pcb. The esp and sound pcbs are pretty simple and plug into the main board (I can provide those pcbs if you want, but they aren't that interesting).According to trace calculator I'm fine with my trace widths. My traces are not warm to the touch.That said I can make all that better on the next board. My concern is I still don't understand why thin traces would cause my voltage to drop and stay dropped until the load current went down.PCB file was too large so it is here:http://glacialwanderer.com/files/2017/mainBrd.svg

author: IanB
author_rank: Super Contributor
timestamp: October 08, 2017, 01:56:10 am
content: Quote from: mribble on October 08, 2017, 01:51:31 amDid you even read my post? Electrical conductors have resistance, therefore when they carry current they drop voltage. When they carry more current they drop more voltage. If your power traces are thin they will amplify the problem. This is basic Ohm's Law. What is it that you do not understand?If you want to mitigate the voltage drop, you should not use thin power traces and not wind them across the board. You should use big fat traces and keep them as short as possible. If you have blank space on the board, then flood it with a power plane and take short thick traces from the power plane to the devices that need it.

author: lem_ix
author_rank: Regular Contributor
timestamp: October 08, 2017, 02:28:00 am
content: In addition to the above post there's less parasitic inductance in case of a wider trace over a plane.

author: wraper
author_rank: Unknown
timestamp: October 08, 2017, 08:32:21 am
content: As I said, noise from power rail goes directly into voltage divider and microphone (C1 too small). Even if you reduce noise on power rail by 10 times, it will still leak into the signal path. Therefore you need to filter it locally for microphone and voltage divider.

author: wraper
author_rank: Unknown
timestamp: October 08, 2017, 09:14:07 am
content: It would me more suitable to use circuit like on the first page of datasheet / page 9 (I added values) with the difference that microphone and divider are powered directly from Vcc, not through internal switch. Also using separate voltage regulator for audio amplifier is a good idea when you have digital circuits producing a lot of noise on the power rail.

author: wraper
author_rank: Unknown
timestamp: October 08, 2017, 09:26:25 am
content: To somewhat mitigate it without changing current layout, increase C1 to 47uF and increase C2 to 0.1uF.

author: Brumby
author_rank: Unknown
timestamp: October 08, 2017, 12:40:03 pm
content: Quote from: mribble on October 08, 2017, 12:01:13 amYou didn't give any indication as to what the op-amp was there for, so I was just tossing up some ideas to prompt a more detailed response. What has been presented since makes that statement obsolete.

author: mribble
author_rank: Regular Contributor
timestamp: October 08, 2017, 01:36:02 pm
content: IanB, it turns out I only read the first part of your post. I went back and yes you did answer my question. In fact using a trace width calculator I verified that my voltage drop is roughly lining up with with ohm's law. Thanks!Wrapper, thanks for the suggested changes to the amplifier circuit. While I don't have all the values you listed, I can try something like that with different component values and see how it works. Will let you know how that goes.You folks are AWESOME! Thanks for all the great help.

author: Damianos
author_rank: Frequent Contributor
timestamp: October 08, 2017, 03:22:38 pm
content: Except of increasing the value of C1, it would be a help if you break the R3in two parts and putting there one more filter capacitor.For example in 100kand 900kparts, adding a capacitor from the point between them to ground. Due to the high resistance values the capacitor does not need to be big.

author: mribble
author_rank: Regular Contributor
timestamp: October 08, 2017, 05:02:40 pm
content: Wraper, I tried your circuit by modifying one of my extra PCBs (actually it didn't require that many changes) and managed to find or make values similar to what you suggest for everything. I can no longer see any of the spikes from the power supply showing up on the output of the op amp. There could still be something there, but it has to be 0.02 V or less for me to not see it on the scope. I even changed your 20K resistor to 2K to increase the gain and still saw no noise on the scope. I don't think that resistor change increase the gain by 10x as I was expecting, but it is sensitive enough for me. Is that just a limitation of my actual microphone or is there some reason the gain doesn't increase linearly?Damianos, since this new circuit works so well I'll just go with it and won't be trying your latest idea, but I do see where that could improve my previous circuit.Thanks everyone!

author: wraper
author_rank: Unknown
timestamp: October 08, 2017, 10:46:07 pm
content: Quote from: mribble on October 08, 2017, 05:02:40 pmOutput resistance of microphone is quiet high, expect around 1k. When you decrease 20k resistor, input resistance of amplifier drops as well. This reduces signal amplitude at microphone. If you need more gain, you should increase 200k resistor instead. Or revert to original circuit and do as Damianos suggested.

author: Vtile
author_rank: Super Contributor
timestamp: October 08, 2017, 10:58:23 pm
content: Quote from: IanB on October 08, 2017, 01:56:10 amAnother solution is to go with higher nominal voltage devices (ie. 50V :p), but it seems to be totally out of fashion as the nominal voltage seems to be going down to 0.7V.This problem also relates to my signature and why Dave spokes about the starground.

author: mribble
author_rank: Regular Contributor
timestamp: October 09, 2017, 05:32:49 pm
content: Quote from: wraper on October 08, 2017, 10:46:07 pmOk, I will look into that. Thanks for or all the help!