So I made a switching regulator, and its way to noisy.. - Page 1
Forum section: electronics / projects

author: senso
author_rank: Frequent Contributor
timestamp: February 14, 2014, 03:53:47 am
content: Good evening folks, I have designed a small board to control a little robot, and it has a switching regulator in it, and when powered from my 6632B it is not THAT bad, but when using the usb cable(like when I need to program the micro in the board), its pretty bad(I think).The regulator that I'm using is an LM2700 and I just gave a light read to the datasheet, and used the TI power designer to get the component values, and it seemed to be just right.The regulator is supposed to have an input voltage that will vary between 4v and 6v(4x AA batteries) and should output 7v, those 7v volts are used to power the H-bridge and to power an LDO that powers the micro at 5v.Any input if I should see this much noise, and ideas on how to mitigate it, at least the LDO with 300mv in the output seems way too out of spec to be usable, with a 4.7v brown-out in the micro its borderline.The inductor is not the 10uH that are referred in the schematic, but instead a 56uH inductor from Coilcraft, with the 10uH it was even worse.Schematic:Board layout:And the scope from the input cap of the regulator:The inductor, if powered from the 6632B it doesn't exhibit that negative part of the waveform:Input of the LDO:Output of the LDO:Any tips are welcome,best regards.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: February 14, 2014, 04:23:22 am
content: Quoteneed this.

author: cellularmitosis
author_rank: Unknown
timestamp: February 14, 2014, 04:26:28 am
content: Can you ac couple your rigol and zoom in on the noise?I just recently dealt with switching noise of a slightly different variety (using a 555 to charge pump and use a few diodes and capacitors to generate a negative rail).I modeled a RLC filter in LTSpice which would have slaughtered the noise on paper, but when I soldered up it did almost nothing to that high frequency ringing.What solved it for me was adding a low ESR cap in addition to the existing cap in the RLC filter. Despite being much lower in value than the existing cap (4.7uF vs 100uF), the low ESR appeared to what mattered. It was a WIMA MKS2 4.7uF cap. I had ordered 10 of them to play with after I noticed Jim Williams mention them in several app notes.

author: c4757p
author_rank: Super Contributor
timestamp: February 14, 2014, 04:31:50 am
content: This is an easy one. Your grounding is ghastly. If you want to do a quick test, scrape off some soldermask around the negative terminal of the capacitor that's right next to your inductor, and also on the bottom. Connect the grounds together with a heavy strap and try again.Then do the same thing next to the grounds on the controller. (Yeah, drill a hole!)Edit - by the controller is even more important. Look at the ground path there:

author: nickm
author_rank: Regular Contributor
timestamp: February 14, 2014, 04:40:13 am
content: What exactly is the problem? The scopeshots don't show it too well. Are you have trouble with noise or switching ripple?If it is switching ripple the LDO isn't going to clean it up because it doesn't have PSRR up in the MHz where your switching harmonics are. You should figure out what switching ripple you expect using textbook equations. Boosts are going to have a lot of ripple because the inductor doesn't behave like a lowpass whereas in a buck it does. The best solution would be to add a post filter. Use X7R ceramics of course.If noise is the issue then look at layout and bypassing.Also you could be fooling yourself by using poor measurement technique. Don't use the ground lead with the scope probe. LT usually documents proper probing technique in their datasheets.

author: senso
author_rank: Frequent Contributor
timestamp: February 14, 2014, 05:08:37 am
content: Tomorrow I will try to get some better scope images, but when connected to the pc it disables the front panel, and using the Ultra Scope program is slow as molasses.The LDO might be oscillating, so I swapped the 10uF x7r caps for a pair of ceramics.c4757p the bigger round thing above the SMD cap is a piezo and not a bigger decoupling cap.I usually put vias to ground everywhere but it seems that I forgot to put some around the ground pad of the smd input cap...I will scrape some solder-mask to solder some probe hooks, because the inductance of the aligator is really present, saw that when I touched the lead and the noise got even worse.I have already used an LM2596 and indeed I used an extra L/C filter and the noise reduction before and after is evident.Thanks for the rapid responses.

author: Dago
author_rank: Frequent Contributor
timestamp: February 14, 2014, 07:02:04 am
content: Like c4757p said your grounding is almost non-existant. You need grounding vias near every negative terminal (tantalum, controller IC, IC decoupling caps). You could also try to reduce the loop size in other ways as well (packing the components closer together). You would also benefit from better decoupling, it looks like you currently have just one tantalum for the whole IC. You need to have ceramic caps right next to the IC input. It looks like you have ceramics for the IC but they are before series resistors which makes no sense. Put them after the series resistors (I'd also say ditch the resistors) as close to the IC as possible and put grounding vias on them.

author: hans
author_rank: Super Contributor
timestamp: February 14, 2014, 09:09:00 am
content: Grounding is indeed the key, use your bottom layer ground plane. Stitch the hell out of your board near every component that has a GND terminal. You don't pay anything extra for those via's, so use them (unless you etch your boards, then I'm sorry)Also, your caps are seem to be faced backwards. Their ground terminal faces away from the regulator GND pins, making a huge loop.Also for example; C19 decouples the output (the regulator tab) to GND. But you placed it on the opposite side of the LDO - not near the GND pin. So yes Eagle will shut up about "unconnected ratsnets", but it's not an ideal location. Imagine what paths current need to make (and what loop it creates).I don't think there is a path "under" the pins of the LDO package, so presumably it has to snake around your board to finish it's path.Aluminum caps don't do much at the range of switching regulators. Always add some ceramics.

author: free_electron
author_rank: Super Contributor
timestamp: February 14, 2014, 03:21:22 pm
content: Every pin need its own via to ground. Do not share via's. Like others saidBut, there is so ething else : you are using electrolytics as input and output caps.... Bad idea. They are waaaay too slow for the current pulses. Tack on a couple of 10uf ceramics. Especially at the input of the switching regulator, close to the coil. And immediately after the diode to ground.This is a boost converter so it ramps up the current through the coil using the transistor internally between SW and GND. Once target current is reached it turns that transistor off . At that point you have a very fast current that needs to be 'captured' and stored. That 470 uf is too 'slow' for that.

author: senso
author_rank: Frequent Contributor
timestamp: February 14, 2014, 04:59:09 pm
content: I'm still wondering why did I remove the vias, oh well, its the first board that I make that doesn't really work as expected in the first spin, so I take this as a learning experience.c4757p after a small night of sleep I now understand your drawing its the current loops and how much it has to travel to reach a connection to the bottom layer, put that way, its really awful.I will take all the given advice, and I will re-design the board and then before ordering I will post a couple images here so I don't goof it up again.For now it is working more or less ok to start developing some basic code.And one more thing, in my imense genius I used the two P-FETS as reverse input protection and though they migh also be used as a DIODE OR with less losses than with diodes, but the thing is that if I put 5v(or any voltage for that mather) in in the Vio it is also present in the V+ and vice-versa, the Vio comes from the USB(I know bad name, will correct it), and the V+ from the batteries, but if I have 6v from the batteries and plug the USB cable, nasty things will happen, so is this another design fail or I need to use a ideal diode controller IC to achieve a diode or with P-FETS?Best regards and thanks for all the responses.