One of the more enjoyable uploads though. The visual and practical stuff with simulators and graphs and oscilloscope traces teaches concepts a lot better than textbooks.

I agree. For some reason, I really enjoyed getting to watch things go from theory to simulation to circuit probing. I guess maybe seeing that sexy new InfiniiVision scope may have had something to do with it.

All this PWM filter stuff is a bit meh. It would look far more impressive to attach a stepper motor to the ten turn pot and control the stepper motor from the micro

Just like on those expensive Hi-Fi's where people want to see the knob spin at their command from the chair huh?

Dave.

My parent's used to have a cheap all-in-one unit with a motorized volume knob. This was from before it was standard to convert everything to digital and I guess for some reason digital potentiometers were ruled out. Sadly it broke down and they threw it out before I could recover the volume pot.

Really interesting and well explained for a newbie. When you finalize your design, would you consider posting your schematic and parts list? I would love to build it. But could use the extra hand-holding a printable reference would provide.

I am wondering about few thing, regarding to this episode. Is there any method to make integral from pwm signal really quick, for example let's get the situation where whole power supply is build around micro and hysteresis for current limiter is in software, then we need really quick reaction.

Second thing that I think may be interest, specially for nob is measurements instruments for power supply, and also method of connecting it. For example in symmetrical power supply this is not so obvious. Also I wondering about how they measure current in all of those cheap-china powersupplys where they have 3 terminals and only one 3-4 digits amp meter and the current may flow in 3 "path" (plus2ground, minus2ground and plus2minus).

Cheers!

Ps. sorry for my language - it may be not so good (en is not my native)

I am wondering about few thing, regarding to this episode. Is there any method to make integral from pwm signal really quick, for example let's get the situation where whole power supply is build around micro and hysteresis for current limiter is in software, then we need really quick reaction.

Having been "out" of electronics for years, I have decided to get back into it and teach myself pic microcontrollers. I have been watching the eevblog for a while and felt compelled to actually sign up for the eevblog forum (first forum I have ever subscribed to) just so I could tell you thanks for the work you are doing here and keep up the great work. I have learned more watching your eevblog than in 3 years vocational electronics and a year of college electronics ( too much theory and math). I have recommended your eevblog to a friend returning to college for electronics as well.

I especially look forward to building a pic controlled power supply for the lab I am setting up now. I can't wait for the next video...

I am wondering about few thing, regarding to this episode. Is there any method to make integral from pwm signal really quick, for example let's get the situation where whole power supply is build around micro and hysteresis for current limiter is in software, then we need really quick reaction.

As dave said, use a real DAC. Filtering PWM is cheap and easy, but very low performance. It is fine for generating low resolution DC signals, but if you need anything fancy a DAC is what you want. Even a cheap DAC will outperform the PWM signal by a lot. That said, designing a control loop with a microprocessor in the feedback loop is significantly more complicated to get right. It takes some effort to have anywhere near as fast of a response time as a cheap op-amp and guaranteeing stability is considerably harder due to the latencies involved.

Quote

Also I wondering about how they measure current in all of those cheap-china powersupplys where they have 3 terminals and only one 3-4 digits amp meter and the current may flow in 3 "path" (plus2ground, minus2ground and plus2minus).

These power supplies are floating and only connected to the + and - terminals. The ground terminal is simply connected to the chassis ground and to the mains earth connection. They are generally provided with clips that let you short either the + or the - output to ground in order to make a positive or negative voltage supply. All current is returned to the - output, only leakage current from the powered device flows through the ground pin.

P.S. and for the record, I don't like math in the same way I don't like condoms: it's an indispensable tool when the task at hand calls for it, but when the task is complete, most people won't dare touch it and it gets flushed down the toilet either way. =\

I'm pretty sure the filter was a cascaded 2nd-order RC low pass with a transfer function:

This doesn't look right. It looks just like you multiplied the two transfer function of each stage.The RC filter has this transfer function :

But only if the loading impedance at the output if negligible. Which is the case for the second stage (because feeding an opamp), but not for the first stage which is loaded by the second stage and introduces another term.

PS: Nice analogy I also don't do math just for the sake of it, but I found myself having to compute a RC filter having a specific impedance while in a train with nothing else than a paper and pencil and I just tought I'd share this because I find it useful to sometime being able to go back to this. (Even tough when I learned that at uni I wasn't convinced of the usefulness

This doesn't look right. It looks just like you multiplied the two transfer function of each stage.The RC filter has this transfer function :

But only if the loading impedance at the output if negligible. Which is the case for the second stage (because feeding an opamp), but not for the first stage which is loaded by the second stage and introduces another term.

PS: Nice analogy I also don't do math just for the sake of it, but I found myself having to compute a RC filter having a specific impedance while in a train with nothing else than a paper and pencil and I just tought I'd share this because I find it useful to sometime being able to go back to this. (Even tough when I learned that at uni I wasn't convinced of the usefulness

See attached pic for circuit, just to be sure we're on the correct page. For simplicity of analysis, we'll denote R1/C1 as 1st-stage components and R2/C2 as 2nd-stage.

Output impedance of the 1st stage:

Input impedance of the 2nd stage:

Since both expressions are functions of omega, evaluate at the limits.

At DC, viz. w = 0:

And at the other end of the spectrum:

So it's clear that the stages are impedance matched. Of course, this assumes that the output impedance of the uC pin providing the PWM signal and input impedance of the non-inverting input of the buffer are very small and very large, respectively (which is a reasonable assumption). QED.

I think you're train of thought drifted towards transistor small-signal analysis. Attention to detail, my friend...only because you forced my hand in writing a proof. And btw, I LOVE this codecogs instant online latex business! Thanks for the indirect link!!

So it's clear that the stages are impedance matched. Of course, this assumes that the output impedance of the uC pin providing the PWM signal and input impedance of the non-inverting input of the buffer are very small and very large, respectively (which is a reasonable assumption). QED.

Mm... sorry I don't see it.

I do agree that the additional term ( j w R_1 C_2 ) in m y transfer function is irrelevant at both extremes:* If w = 0 (DC) then the term is just nulled.* If w -> inf then the term is irrelevant compared to the quadratic term w^2

But in the transition region, the term has "some" influence. (it doesn't change drastically the response, but it's there nonetheless). So yes, if you're just drawing the bodeplot by hand for a quick check you can ignore it. But in the analytical solution, it must be present. If you're ok with an approximate solution, you might as well drop all the linear terms and just keep the constant one and the quadratic one.

The first stage if you consider it connected to a non-negligible load :

Which clearly shows the "extra" term and later on simplifies itself to (j w R_1 C_2).