RFC: Switching mode power supply schematics

From DIY contraptions to sophisticated FreeEMS-specific designs! Plus general hardware development!
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

Re: RFC: Switching mode power supply schematics

Post by nitrousnrg »

The oscilloscope is a Phillips PM3055, 50MHz, with a 100MHz probe, and it was warm. The issue was in the power supply, too much noise. Doing the same thing in the car gave some much better measurements:

After the 5v MCU regulator, with 500mA load:
https://picasaweb.google.com/lh/photo/c ... directlink

The setup was:
5mV/Div, 5uSec/Div, AC,
https://picasaweb.google.com/lh/photo/t ... directlink

And, with the board disconnected, same setup.
https://picasaweb.google.com/lh/photo/E ... directlink

You can see there is no noticeable AC difference between on/off. The latter seems a bit worse, but is probably because of a long exposure and a shaky hand. I almost couldn't tell which is which seeing the scope with my eyes.

This makes half of the testing. So far I tested the MCU side, aimed to supply no more than 500mA, since it only supplies the MCU. Anyway, the regulator can flow 1A.

Next step is to test the switchable regulator, and make it regulate 5v at 1A. In that situation the SMPS will be flowing 1A+0.5A. When that goes ok, I'll push both regs to try to fry something.

I saw the SMPS ripple in the diode-inductor node, it was clear, but only some mV in amplitude, and I didn't pay much attention to it. Next time I will. The track that has this ripple is nearly 13mm long, the layout is an exact copy of the evaluation board that ST provides. What concerns me a bit is the use of ground planes without thermal reliefs for the resistors and caps pads.

So far, I'm quite happy with this IC.
Marcos
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: RFC: Switching mode power supply schematics

Post by Fred »

OK, so the electro was not part of the test circuit, it was part of the supply to it. You say you vary the supply and the output quality varies. That is indicative of lack of power supply rejection. A better test might be to inject a known quantity of noise into the power supply at different frequencies using a not-on-charge battery as the supply, and putting the noise into it on top. Then you can add X V @ Y Hz and see what the regulator setup is capable of removing and what it is not capable of removing. You could repeat the tests for something like the lm2940 reg, too, for comparison, if you wanted. Just some ideas for you. Current testing seems a bit arbitrary and you seem to be ignoring the fact that it doesn't seem to filter it's input source very well.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

Re: RFC: Switching mode power supply schematics

Post by nitrousnrg »

Mmm, lets add some info:

Connecting the probe in the leads of the 10ohm load, and connecting only the ground terminal of the power supply (0v connected 15v disconnected) the noise was there. That behavior got better when I changed the probe for a better one, so its not a problem of the SMPS, but of the external setup. Oh, I dont have a good signal generator, but the uni does, maybe on monday (I have an exam tomorrow) I can do a noise rejection test.

Anyway, the PS was calculated to supply 2A, and so far it worked at the 25%. Pushing it harder will show us some ripple at some point.
Marcos
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: RFC: Switching mode power supply schematics

Post by jharvey »

Cool, cool. I see the board proto includes the hybrid USB footprint. I'm curious, have you had a chance to check if it's close to right? I have the USB connectors, and I checked them against the printouts but couldn't check them against the physical holes.

Oh, also can you measure the uH of the resistor? It looks like a wire wound device, and it probably has a higher inductance than we would expect from the MCU, which will be mostly capacitive. You may want to put a cap in parallel with it.
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

Re: RFC: Switching mode power supply schematics

Post by nitrousnrg »

Oh, I missed this one.
jharvey wrote:Cool, cool. I see the board proto includes the hybrid USB footprint. I'm curious, have you had a chance to check if it's close to right? I have the USB connectors, and I checked them against the printouts but couldn't check them against the physical holes.
The thing with the footprint, is that the mfg has a very poor quality, Its the best in nearly 300km around, and yet he can't do a proper soldermask, or less than 10mils tracks, or even do the right holes to the board. For this one, I asked him to just not do any hole, since its a waste of time for both of us (macro pictures later).
jharvey wrote:Oh, also can you measure the uH of the resistor? It looks like a wire wound device, and it probably has a higher inductance than we would expect from the MCU, which will be mostly capacitive. You may want to put a cap in parallel with it.
I can't measure it easily. There is an ancient Q meter in the uni, but I don't remember how to operate it. Anyway, these days I tried a couple of resistors with same result. After that, I put my Puma as a load instead of the resistor, since I can't find any carbon resistor around, and the result was the same.

All the tests were performed in the car, the lab power supplies used before created some nasty ground loops that screwed all the measurings.

There is a very brief 8MHz noise on the vertices of the ripple wave, caused by the fast change in the tantalum capacitor current. At those high di/dt, the ESR and ESL start to play an important role in the output signal, and the current variation generates the voltage seen in the output.

I suggest this reading, that turned to be a good reference and explained lot of the things that were happening in there.
http://www.maxim-ic.com/app-notes/index.mvp/id/653

In general, the problem was having a big tantalum and no way to stop those high frequencies. There are 0.1uF cereamics in that node but they're far away from the problematic tant, so following maxim's suggestion, I installed a couple of ceramic caps close to the tant, a 0.1ohm in series, 0.1uF to ground RC filter and it improved a bit, although is hard to measure. I'm waiting for an order that has some little 1210 shielded inductors (~1uHy) to replace the resistor.

When I got to that point, everything I tried didn't seem to help, until I found that the ground line had the same noise seen in the output (!). And not the ground at the battery, I was measuring the ground of the probe directly, with that ground connected with the ground of the board. Again, it was some nasty current loop happening somewhere, like with the lab's supplies.

Once I realized about that, I ran the same setup with my puma and its linear regulators, and the noise in the ground was the same, which reminded me to the phantom and harsh noise mentioned by maxim. A strange thing, though, was that I see noise in the puma's ground and not in the 5v line (there is noise, but it doesn't look the same, so I'd say its because of the MCU and the fact that that board has a pile of 0.1uF everywhere.), when in the SMPS i see the same in the 5v line and in the ground.

I'll post some pics of the scope later. To me, the SMPS with an extra RC (or better yet, an LC, if tests turn out well) is a very good setup.
* One can see a reasonable ripple in the SMPS output, but that ripple is eliminated by the linear regs.
* Without the extra filter, there is a very narrow 8MHz harsh noise that pass through the linear regs.
* My tools proved to be not enough to do these kind of tests, but so did the tools from the university. All I can say is that I can't see a valuable difference between the linear and SM.
* The input of the SMPS has noise, I want to put the same LC filter of the output, plus the suggested cap from the mfg.

So, I feel confident enough to move towards th SMPS, and I'll start to layout that part of the board on my spare, internet-less time. Pictures soon!
Marcos
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: RFC: Switching mode power supply schematics

Post by jharvey »

Yeah, those pesky ground loops can be a bugger. Using your scope as a differential often fixes such issues, but turns a 2 channel into a single channel, and a 4 channel into a 2 channel. So if you end up buying a scope some day, I'd recommend getting more channels before getting a fast scope.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: RFC: Switching mode power supply schematics

Post by Fred »

jharvey wrote:I'd recommend getting more channels before getting a fast scope.
Or an isolated ground model! I hate fixed ground scopes, they're horrible to use.

Another option is an isolating transformer.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: RFC: Switching mode power supply schematics

Post by jharvey »

Isolation transformers add load to the signal your looking at and choke the RF, often loading it down such that it doesn't accurately indicate how the circuit actually operates. There are a great many scope probes out there that try to product less than a couple pF of load, such that they can be more accurate. Un-grounded scopes are unsafe to use, as the ground is known as safety ground. You'll have trouble finding a scope that really isn't grounded. Those companies typically get sued into oblivion, and shut the doors. The most common practice for signal integrity is a differential input, just look at the MAX992X vs the LM chips.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: RFC: Switching mode power supply schematics

Post by Fred »

Fred wrote:Or an isolated ground model! I hate fixed ground scopes, they're horrible to use.
Excuse my terminology, but I'm no idiot...
Another option is an isolating transformer.
FOR THE SCOPE!
jharvey wrote:Un-grounded scopes are unsafe to use, as the ground is known as safety ground.
Agreed! Isolated, not ungrounded!
You'll have trouble finding a scope that really isn't grounded. Those companies typically get sued into oblivion, and shut the doors.
I've never seen one, and wouldn't recommend one.
The most common practice for signal integrity is a differential input, just look at the MAX992X vs the LM chips.
Isolated! Like some of the tektronics models are, and others aren't.

Also, anything battery powered like my DSO Quad fits the bill, too.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
MotoFab
1N4001 - Signed up
Posts: 307
Joined: Thu May 29, 2008 1:23 am
Location: Long Beach CA

Re: RFC: Switching mode power supply schematics

Post by MotoFab »

nitrousnrg wrote:There is a very brief 8MHz noise on the vertices of the ripple wave, caused by the fast change in the tantalum capacitor current. At those high di/dt, the ESR and ESL start to play an important role in the output signal, and the current variation generates the voltage seen in the output.

In general, the problem was having a big tantalum and no way to stop those high frequencies.
The setup has the output from the SMPS feeding a linear regulator, is that correct? The 8MHz noise will pass through an inductor's parasitic C. Use a ferrite bead on the input, and the output, of the linear regulator. Place the beads ahead of the input and output capacitors. Get a low/medium frequency ferrite, say 25-50MHz, with at least a 50ohm impedance at 10MHz. FBs are available with leads which will make prototyping a little easier.

Did you mention you were at the limit of the scope speed and sensitivity?

- Jim
Post Reply