Need help solving a nasty power rail ripple from switching IC - Page 1
Forum section: electronics / projects

author: ttodorov
author_rank: Regular Contributor
timestamp: August 05, 2018, 05:30:35 am
content: Hi everyone,I needed to interface some 6V induction proximity limit switches to my 3V3 Arduino Due/GRBL CNC setup, so I built my own interface board with 74AHC14 schmitt trigger inverters and 4050 level shifters. My PSU is 24V, so I decided to use a switching IC to drop the voltage to 12V and then use linear regulators to create 5V and 3V power rails. For the switching IC I chose LM2593HV-ADJ, as I had many of them on hand (got them for free from my work, but never used them before)...My problem is that this IC is injecting way too much ripple in my circuit. The ripple is between 1V-1.2V and is affecting my digital ground. Level transitions from high to low for my limit switches and my E-stop or Z probe are not reliably detected, because the noise floor is higher than 0.9V! I have attached some screenshots: one is of my schematic for the power supply, the rest are captures from my oscilloscope - CH1 is at first my 12V rail, then a PWM signal that drives my spindle; CH2 is the noise on my Z probe (AC coupled probe).So what should I do to reduce the noise? Would a low pass filter after the C6 capacitor work? Would a 150kHz ferrite bead chip after C6 also prevent switching noise being injected into the ground plane, or is it possible to use another ferrite bead to isolate the LM2593 ground pin from the rest of the ground plane? I have so far tried increasing the C6 capacitor from 220uF to 470uF, but that did not help at all :-(

author: forrestc
author_rank: Unknown
timestamp: August 05, 2018, 06:00:34 am
content: Could you provide a picture or other information about the layout of the circuit? In switchmode supplies, this is critical, and there's a good chance that the problem lies not with the schematic, but with the way the components are hooked together on the PCB.

author: ttodorov
author_rank: Regular Contributor
timestamp: August 05, 2018, 06:52:04 am
content: Ok, here are 3 more screenshots. The first is a 3D rendering of the board, the modeled component dimensions are pretty much on par with the actual ones. The other 2 screenshots are top and bottom copper layers, where light orange color is the top ground pour, and the light blue color is the bottom ground pour.Let me know if there is any other information that I should provide, thanks!

author: forrestc
author_rank: Unknown
timestamp: August 05, 2018, 07:07:47 am
content: Quote from: ttodorov on August 05, 2018, 06:52:04 amOk, the first thing I see is that the output capacitor (C6 I believe), has a long ways for the ground to get back to the IC. See figure 24 in the datasheet athttp://www.ti.com/lit/ds/symlink/lm2593hv.pdf(pg 11). There are going to be fairly large currents passed from the regulator output, through the inductor, then through Cout and back to the regulator. The path on the negative side of the output capacitor seems to have to snake through half of your board, probably generating spikes/noise everywhere.There might be other similar paths. This is just the first one I noted which would make me nervous.It would have been better to rotate the capacitor the other way. I'd, as an experiment, remove C6, then flip it around and wire the ground lead directly to the side of the IC ground pad. This would result in the ground path from the capacitor ending up right back at the regulator. See if that improves things. And look for other similar paths which are long.

author: ttodorov
author_rank: Regular Contributor
timestamp: August 05, 2018, 07:38:41 am
content: Thanks! I will try rotating Cout (C6) and see what happens. In the mean time, would you have any idea, if ferrite bead chips would help? Obviously, I would need to redesign the board for them, but it looks like I will have to redo the layout anyway... What can I add filtering-wise, that would mitigate the noise - at least somewhat?Best regards!

author: ocset
author_rank: Super Contributor
timestamp: August 05, 2018, 07:41:28 am
content: With SMPS, a lot of the scope “fuzz” is noise coupled into the scope lead itself.Unhook the scope lead, and connect ground and probe tip of scope probe, and touch it to the circuit node and see if the fuzz is still there…..if it is, then its just noise induced into the scope leads.That said, those ICs that comprise the fet give you no chance to staunch the drain switching transition, because you cant access the internal fet or its drive circuit……….if you did have access to the switching fet, then you can actually then get away with poor grounding, as the switching of the smps is less violent..But yes, the main rules of smps layout are1…..try to not have power switching currents running through lengths of control ground.2….Keep power switching current loops as small in area as possible……remember the capacitor forms part of the loop.The attached is a layout guide to laying out smpsThe most noisy thing about an hard switched smps is the switching transition. If you can staunch that, then your smps is less noisy…….obviously slowing up the switching means more switching loss.Once I designed a 150w led driver, (three 50w ones on the same pcb) which fed off the output of a 48v offline meanwell PSU. When the gate series resistors were 1R, switching the led driver on literally resulted in the lab radio (a digital radio) going totally silent from having been on full loudness…..changing the gate series resistor to 4r7 stopped this.i wouldnt bother with ferrite beads in the ground in your case

author: veryevil
author_rank: Unknown
timestamp: August 05, 2018, 08:19:23 am
content: I would suggest some much lower esr output capacitors. Add some ceramic caps as close to output as possible. Try 10n, 1u and 10u in a row with the 10n closest then building to your Al elec cap. This will reduce high frequency noise.

author: ttodorov
author_rank: Regular Contributor
timestamp: August 05, 2018, 09:12:07 am
content: First off, thank you all for the input. I am going to redesign the PCB layout and shorten the ground loops where I can, especially C1, C2 and C6. I will also add more decoupling on the output.Rotating C6 and soldering the negative terminal to the tab of the LM2593 reduced the ripple by about 250mV.@treez, I did the test you suggested. There is still "fuzz" when I have the probe's ground clip connected to the probe's tip and then touch that to the 12V rail output. But... If you have a look at the attached screenshot, I have both CH1 and CH2 probes on, both ground clips are clipped to their respective tips, but CH2 is just lying on the table next to the board, while CH1 is touching the 12V output. If it were only noise coupled through the probe lead itself, wouldn't both channels show the same amount of fuzz?

author: iMo
author_rank: Super Contributor
timestamp: August 05, 2018, 09:24:07 am
content: For your inspirationby TI recommended pcb layout - Figure 37.

author: forrestc
author_rank: Unknown
timestamp: August 05, 2018, 09:31:33 am
content: Quote from: ttodorov on August 05, 2018, 09:12:07 amI also agree with veryevil: The ESR of those capacitors matter. Note the Nicicon PM series mentioned on the datasheet are described as "Extremely Low Impedance", which is another word for Low ESR. Not sure which ones you're using.I'm a big fan of TI's Webbench designer. It does a good job of specifying specific parts which work. There seem to be more than a circuit's fair share of gotchas involved in getting a SMPS to work correctly. But once you get it, it just works.One other thought is that if this is making it's way through the 7805 to pay attention to similar loops in the 7805 circuit, as the output of the 7805 across it's output capacitor should be rather noise-free... If it isn't, you could also be ending up with this noise on the ground of the 7805 circuit.

author: ocset
author_rank: Super Contributor
timestamp: August 05, 2018, 09:52:11 am
content: Quote...actually no because you have the CH1 tip closer to the swithcing "disturbance point".If you have the samae amount of "fuzz" with your test of the above post, then the "noise" is actually just "pickup"......coupled into the scope lead.I remember once, when i worked at Alcatel...the engineering manager tricked a load of young intern engineers into trying to filter out this "pickup", and they couldnt do it...then hours later he returned and told them that it had been a trick job and they should have known all the time that it was "pickup".Another point is i hope you are not using a "dangling ground clip" style ground on the scope probe...you should get one of the small "spring" tip things which reduces the loop area of the scope lead end.

author: iMo
author_rank: Super Contributor
timestamp: August 05, 2018, 10:15:37 am
content: Filters with small ferrite beads and large Al capacitors will not work. That noise is high frequency one, with pretty energetic content (due to the nature of dc-dc converters).A PI filter(s)  may help, with ~10uH quality inductor (for at least 1-3A saturation current) and 3 capacitors in parallel 1n||100n||10u (best all 3 are ceramic or ceramic multilayers) at each side of the L in the filter (EDIT: thus 6 capacitors in total per PI, with as short as possible leads - a high-frequency construction basically). You may try to put a filter into the gnd lead as well.

author: MasterT
author_rank: Frequent Contributor
timestamp: August 05, 2018, 02:14:58 pm
content: If I'm not mistaken, scope traces show 100kHz, same time TI LM2593 DS specify frequency as fixed 150kHz.I had a bad experience getting LM2596 based dc-dc converters from aliexpress in the past, troubleshooting low output current capability (less than 50% compare to DS) I discovered that IC works differently than common PWM (variable pulse width ) regulator. Instead IC is doing somekind burst mode regulation, and it makes me think that chip marked as LM2596 could be anything except genuine TI IC. And conversion frequency was way out of spec, 2-4x lower, that makes much harder to filter it out.

author: ttodorov
author_rank: Regular Contributor
timestamp: August 05, 2018, 06:35:38 pm
content: Quote from: MasterT on August 05, 2018, 02:14:58 pmFunny you should say that... I got the LM2593 parts for free from my work, because they were just throwing them out. At the time I did not ask why they were getting rid of them, and now it's too late - it's been 3 years since.But the frequency shown on the screenshots from my oscilloscope is only indicative of the frequency at the time I pressed the print button - it was jumping all over the place, oscillating between 16 kHz and 150 kHz. As it was already mentioned, it would be difficult to filter such range out with LC filter. I am left wondering, if my old company was ditching the chips, because they just didn't need them any more, or they got a bad batch, or the chip design itself is bad/unstable. Should I look for a better alternative, as I am resending the board anyway? Could anyone recommend a switching IC that can deliver 1.5A to 2A of DC output?Thanks!Sent from my XT1575 using Tapatalk

author: MasterT
author_rank: Frequent Contributor
timestamp: August 06, 2018, 04:31:09 am
content: https://www.mouser.ca/Semiconductors/Power-Management-ICs/Voltage-Regulators-Voltage-Controllers/Switching-Voltage-Regulators/_/N-668jt?Rl=668jtZerbbZ1z0wbyrZ1yxbqmiSGer88Z1yzvdtuZ1yvbdhdSGTThere are 2,939 items satisfying your parametric demands.

author: ttodorov
author_rank: Regular Contributor
timestamp: August 06, 2018, 07:57:44 am
content: Quote from: MasterT on August 06, 2018, 04:31:09 amRight! So which ones do you recommend?Sent from my XT1575 using Tapatalk

author: MasterT
author_rank: Frequent Contributor
timestamp: August 06, 2018, 08:17:14 am
content: Can't advise, my design experience limited to shopping on the i-net china market. Lowest price is the best option to start with, since pictures and description is misleading. And surprises and a lot of fun when modules arrived

author: ttodorov
author_rank: Regular Contributor
timestamp: August 06, 2018, 08:46:52 am
content: Quote from: MasterT on August 06, 2018, 08:17:14 amLOL - I feel ya! ;-)Had some "fun" experience with buying cheap AVR MEGA328Ps and some XMEGA chips for cheap from China.... I've heard some other people having similar issues with ICs like these too, but what I find incredibly more frustrating about buying from China, is the lack of proper documentation.

author: ttodorov
author_rank: Regular Contributor
timestamp: August 06, 2018, 09:03:09 pm
content: First of, a big thank you to everyone who chimed in on this thread and offered advice! After considering everything, I decided to not only redo the layout, but change components - most importantly replace the feed-in and Cout electrolytics with ceramic caps, and use a different IC. I decided to go with a triple output buck switching converter, actual part is A4490 from Allegro (manufacturer linkhttps://www.allegromicro.com/en/Products/Regulators-And-Lighting/Multiple-Output-Regulators/A4490.aspx). It looks like a very interesting part and I found it easy to design with. So I would appreciate it very much, if you would look at the attached screenshots of the new design and offer comments and critique, if you see anything wrong...A couple of things of note: One, the datasheet advises to minimize the ground loop between feed-in caps, inductor, flyback diode and output caps; and to preferably put the flyback diode on the back side of the board - so I used a lot of via stiching alongside attempting optimal placement. Two, the bottom copper is mainly ground pour, but every free square inch on the top will be ground pour as well. Hopefully, with a bit more via stitching, the current will find a short un-obstructed path out... Lastly, just in case anyone wonders, there is a big solder mask region on the bottom side under the converter IC, in order to leave the copper bare - for thermal dissipation. It is not much wider than the chip, since it is constrained by the diodes and traces, but it is tall, about 4x-5x the width of the chip.And while on the last point... The datasheet lists a few recommendations on page 14 about the board layout, mainly to reduce the GND loop between Cin, D, L, and Cout. Here is my question: As it is, I have placed the flyback diodes closest to the IC, rather than the respective inductor - is this better than placing them closer to the inductor, or should I move them?As always, thank you all for taking the time to read, contribute and help out!

author: bson
author_rank: Unknown
timestamp: August 07, 2018, 11:46:50 pm
content: Your decoupling caps, C12-C15, if they're involved in the switching, look woefully small. 0402, so 0.1uF? Try adding 10uF as well. This is pretty easy to test by just holding a 10uF axial TH cap against the pads and see if it helps things. It should.

author: ttodorov
author_rank: Regular Contributor
timestamp: August 08, 2018, 12:19:09 am
content: Quote from: bson on August 07, 2018, 11:46:50 pmI think you mean C11-C14? Well, C11 at 0.1uF is used only to bypass the internal circuitry (from what I gather looking at the functional block diagram in the datasheet) - things like soft start, undervoltage lockout, and reset/enable internal switches. C12 is 470nF and is only for the soft start. C13 and C14 are both 47nF and part of the charge pump, which produces the 550 kHz operating frequency of the IC. If any, only these last 2 would be involved in the switching. That's all I got from the datasheet and these are all fixed values - no alternative parts, no alternative values suggested, no formula to crunch...So if anything, only C13 and C14 need to be changed. As their value is 47nF, do I need to use a bigger package? I guess I could go to 0603, do you think that would be enough? I really appreciate your input!Thanks!

author: Phoenix
author_rank: Frequent Contributor
timestamp: August 08, 2018, 12:42:44 am
content: The capacitor values look OK to me. BUT C13 from VCP should be connected to VIN1 (called VBB in the datashhet) to add it's voltage on top of the input voltage. The charge pump is likely for the high side gate drive and therefore must result in a voltage above VIN.

author: ttodorov
author_rank: Regular Contributor
timestamp: August 08, 2018, 12:48:01 am
content: Shoot, that's something I goofed. In the schematic it is connected between VCP and VBB pins. I guess, I grounded it by roteThank you for the catch!What about the packages sizes for C13 and C14 - is it OK to stay with 0402, or should I move to a bigger ones there, as @bson suggested?Thanks!

author: ttodorov
author_rank: Regular Contributor
timestamp: August 08, 2018, 01:01:53 am
content: Actually, I guess that the question about size will resolve itself in favor of bigger packages. Turns out, 50V rated 0402 capacitors are rather (order of magnitude) more expensive, than say 0603 or 0805.

author: Phoenix
author_rank: Frequent Contributor
timestamp: August 08, 2018, 01:06:59 am
content: I think when he says small he means capacitance, I don't see a problem. But physical size will impact things like cost/availability/esr. They aren't "involved in the switching" however.Maybe you also want to tweak your thermal vias so they are more central in the pad (more effective). Something like thishttps://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS9cEe1tMJ6GZ7CNSSfY2pnzZUw5GLH73mO_gAmPcjqJO0U7FtQ

author: ttodorov
author_rank: Regular Contributor
timestamp: August 08, 2018, 01:54:20 am
content: Thanks for the fast reply! I will follow your suggestion. The thermal vias on the QFN are the standard 4x4 mm QFN with EP in KiCad. They used to be more centered, no idea why it was changed lately. I am using the master footprint library from Github, so I guess I will have to do my own version.Finally, given the cost of PCB manufacturing in China, I decided to spin a small board just for the power supply, in order to test out the IC and layout by themselves. I will report the results in about 7-10 days....

author: Pete F
author_rank: Regular Contributor
timestamp: August 08, 2018, 03:14:10 pm
content: Pardon my ignorance as I'm a bit old-school, but why didn't you just use an LM317 for that application?

author: ttodorov
author_rank: Regular Contributor
timestamp: August 08, 2018, 03:40:12 pm
content: Quote from: Pete F on August 08, 2018, 03:14:10 pmMy application does not support/allow it. The problem is heat and a lot of wasted power. The linear regulator will have to convert the 24V input to 12V, then from 12V to 5V, and run for a long time.....No idea about your experience level, and if you need it, but here is the longer explanation. This project is an interface board for a hobby CNC. Because it is made from aluminum extrusion and has a cheap air-cooled spindle, I am unable to take aggressive cuts, which means long run times for milling aluminum parts. Ideally, when you use high-powered linear regulators (.5A and up), you want their input voltage to be optimally 2-2.5V above their output voltage; but at maximum 4-6V above targeted output. For 200mA LDOs you want even less headroom, about .7 to 1.5V.... Anything more produces too much heat, and if it runs for long times it significantly reduces the regulator lifetime. There are a lot of papers online on why you should use a switching pre-regulator for a linear one, if you are interested. Sorry, if you already know this, and I am preaching to the choir. ;-)Sent from my XT1575 using Tapatalk

author: Pete F
author_rank: Regular Contributor
timestamp: August 08, 2018, 10:44:17 pm
content: That's why a resistor is used in front of the regulator, particularly for constant (or near constant) current applications such as yours. The resistor takes the heat, the regulator does the regulating. I didn't get why you needed 2A to run those few ICs.Cascading supplies off of one source, especially a noisy one, is likely to end in tears.

author: ttodorov
author_rank: Regular Contributor
timestamp: August 08, 2018, 11:27:03 pm
content: You are right, I don't need the amperage for the few ICs on the board, but for other stuff. This board supplies 12V to other boards and 5V to 6 induction switches, which according to specs, may take up to 200 mA per. The 12V will also power a LED string for enclosure illumination. I also have some other external low power stuff like 8 character 7seg display and hall effect sensor for spindle tacho, some relays, stuff like that. I definitely need more than an Amp for 12 and 5 volt rails....Sent from my XT1575 using Tapatalk

author: Pete F
author_rank: Regular Contributor
timestamp: August 09, 2018, 02:57:03 am
content: Yes. Hence why supplies are split off to regulated and unregulated sections as required. I highly doubt you need a tightly regulated supply for some of those functions, hence you quarantine the noisy and current hungry sections from the sections that require a clean supply. As I understand it you have simply cascaded one supply down from the next and mixed them all together. With all due respect I don't feel that is a very good solution. Regardless of whether the regulator is the source of the supply noise, mixing completely seperate supply requirements like that may possibly introduce problems in operation. CNC applications tend to be noisy anyway with stepper drivers etc.I would suggest you consider revisiting the basic topology and reserve the present regulator to supply non-critical requirements, and have a completely seperate linear supply (7805 or a LM317 if you really want to get serious about noise rejection) and source them directly from the 24V rather than cascading down and wondering why there's noise on the rail.

author: ttodorov
author_rank: Regular Contributor
timestamp: August 09, 2018, 03:52:25 am
content: @Pete F, thanks for your explanation and suggestion. While I am considering it, are you suggesting that I section out the 3 rails that I need, so they have each separate ground that returns directly to the 24V ground, or that I use some kind of isolation in the manner of an isolated DC-DC converter or isolation transformer and then do the linear regulators after those?As always, appreciate the input!

author: Pete F
author_rank: Regular Contributor
timestamp: August 09, 2018, 05:05:44 am
content: My gut feeling would be the former would be sufficient, but I think there would be others here more qualified than myself to answer that question. It would depend on where you feel the source of the noise was coming from. Your initial post suggested >1 V p/p IIRC, and that is massive. I'm waiting on some parts to repair a couple of linear supplies now and they're running at circa 150 mV noise .... and that's with a fault! The noise of linear supplies should be down in the floor of what we're able to measure in my experience.For the record I'm not a design engineer and was only ever a technician (albeit, without wanting to sound like I'm trying to blow my own trumpet, quite well qualified at the time), so please don't take what I suggest as any form of gospel. A design engineer should be the person to answer for details on grounding as that is a whole different can of worms. Personally I try to star ground what I can and split the grounds where I have noisy and "quiet" parts of the circuit. Having said that, the basic logic you're using shouldn't be too fussed about a bit of noise on the supply so I wouldn't think you'd need to take any more than standard design precautions in that regard.I will also declare that I'm not at all a fan of switching supplies unless they're really required. That is entirely my own personal bias and is undoubtedly not at all in keeping with modern practice. I came from a time when power was cheap and if things got hot ... you put in a larger heatsinkHowever I do still feel there is a place for linear regulation, especially where there's a low and predictable current drain, and there's nothing wrong with an LM317, where 2 resistors and a few capacitors will be virtually guaranteed a supply that's deadly quiet. I was have no hesitation in using a fixed voltage regulator in fact for your humble requirements, just don't mix it up with all the switching noise.

author: ttodorov
author_rank: Regular Contributor
timestamp: August 09, 2018, 06:13:39 am
content: Pete, thanks for the input.I already created a layout for the triple output switching IC and ordered the parts, and I am interested to see how it behaves. You are right that a little bit of noise would not be bad in my case, but over 1Vpp is indeed huge. With it I get false detection on some low to high edge transitions, which interrupts the cutting job and breaks bits and wastes marerial. I am sure it was my board that was so noisy, because without it there is virtually no noise in the system, and then I powered it on its own and checked it out with my oscilloscope. Too bad I can't run my CNC without it.But if the new version is still noisy as well, then I will go back to linear regulators only and will heat-sink them. My preference would be to work without all that heat, so I'll be really happy if the switching IC is performing up to spec. If it works - great! If it doesn't, I am not going to waste too much time on it, since I want to use my machine. With that said, yes, the option to use linear regulators only is still on the table.

author: Pete F
author_rank: Regular Contributor
timestamp: August 09, 2018, 06:58:51 am
content: >1V P/P noise on the supply rail would be completely unacceptable in my opinion, regardless of whether it was causing an issue in practice. I would expect to see a few percent of that figure to be honest. It strikes me as something terribly wrong and not just a design glitch. Do you have a circuit for this you can publish in pdf?

author: ttodorov
author_rank: Regular Contributor
timestamp: August 09, 2018, 07:13:10 am
content: Here it is:

author: uer166
author_rank: Super Contributor
timestamp: August 09, 2018, 07:34:43 am
content: Switching diode's ground source has to snake around all the way to the header and back through the GND plane. Make direct connection to switcher's GND as per example layout. No low-ESR ceramics on output either. Better layout+ lower ESR output caps might get rid of that crazy amount of noise, if it's real.Edit: attached example vs. your layout

author: ttodorov
author_rank: Regular Contributor
timestamp: August 16, 2018, 01:26:50 am
content: Ok, folks, for those who are still interested... Here is my report.JLCPCB delivered my boards this past Monday. I populated one, as fast as I could,... as far as I could. Turns out, I forgot to order some of the parts, so I had to wait some more for the delivery of the last components. Thank you, Arrow, for having free overnight delivery without minimum order value requirement! This almost makes me forget what pain it is to use your site!The test board schematic, layout and rendering are attached at the end of the post.I just placed the last missing resistor on my test board, and the result is far, far superior to the original design. After some measurements with no load, I am getting 80 mVpp ripple on 3V and 5V rails, and 120 mVpp on the 12V rail. I guess I need to put at least one more 10uF decoupling capacitor after the inductor. I am really happy with that result. Given that this version also uses less space compared to the original one, I am going to go ahead with that, and maybe use the free space to add optoisolators on the outputs to the microcontroller.Thank you all for your kind help!