Author Topic: Power supply part 4  (Read 43808 times)

0 Members and 1 Guest are viewing this topic.

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9425
  • Country: us
Power supply part 4
« on: December 03, 2011, 06:17:28 pm »
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  ;)
I'm not an EE--what am I doing here?
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 9425
  • Country: us
Re: Power supply part 4
« Reply #1 on: December 03, 2011, 06:21:03 pm »
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'm not an EE--what am I doing here?
 

Offline benemorius

  • Regular Contributor
  • *
  • Posts: 173
Re: Power supply part 4
« Reply #2 on: December 03, 2011, 07:20:35 pm »
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. :P
« Last Edit: December 03, 2011, 08:42:43 pm by benemorius »
 

Offline McMonster

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: pl
    • McMonster's blog
Re: Power supply part 4
« Reply #3 on: December 03, 2011, 08:06:48 pm »
I think there's a small problem in the video, it's all black around 30:50 to 31:28.
 

Offline benemorius

  • Regular Contributor
  • *
  • Posts: 173
Re: Power supply part 4
« Reply #4 on: December 03, 2011, 08:35:44 pm »
I think there's a small problem in the video, it's all black around 30:50 to 31:28.

Yes, there's a superfluous clip from 30:53 to 31:28 which repeats the audio from 30:18 to 30:53 with blank video.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 28718
  • Country: au
    • EEVblog
Re: Power supply part 4
« Reply #5 on: December 03, 2011, 08:40:45 pm »
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?  ;D

Dave.
 

Offline tnt

  • Regular Contributor
  • *
  • Posts: 237
Re: Power supply part 4
« Reply #6 on: December 03, 2011, 08:41:39 pm »
About those "probing glitches". How do you get rid of them ?
A video about probing techniques and pitfalls would be useful.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 28718
  • Country: au
    • EEVblog
Re: Power supply part 4
« Reply #7 on: December 03, 2011, 08:42:13 pm »
I think there's a small problem in the video, it's all black around 30:50 to 31:28.

Yes, there's a superfluous clip from 30:53 to 31:28 which repeats the audio from 30:18 to 30:53 with blank video.

Combination of Sony Vegas screwing up, and a bit of PEBKAC.

Dave.
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 1832
  • Country: us
Re: Power supply part 4
« Reply #8 on: December 03, 2011, 09:11:21 pm »
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?  ;D

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.
 

Offline zargnut

  • Contributor
  • Posts: 13
  • Country: us
  • Newbie
Re: Power supply part 4
« Reply #9 on: December 04, 2011, 12:59:25 am »
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.

thanks
dan
 

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2314
  • Country: gr
Re: Power supply part 4
« Reply #10 on: December 04, 2011, 03:11:14 am »
Dave, a small request...

Can you use the rotary encoders method for the project? Rotary encoders always gives me a hard time. Will you, fantastic Dave?  :-* :-* :-*  :P :P :P

Alexander.
Become a realist, stay a dreamer.

 

Offline tnt

  • Regular Contributor
  • *
  • Posts: 237
Re: Power supply part 4
« Reply #11 on: December 04, 2011, 03:46:26 am »
For those who like math, the dual stage RC filter has this transfer function :



And present this impedance to the input:



(it's all from a 'back of the envelope' attempt, so I might have made a mistake but it "looks" right)
 

Offline leniwiec

  • Contributor
  • Posts: 28
    • EE & IT Blog
Re: Power supply part 4
« Reply #12 on: December 04, 2011, 04:56:42 am »
Hello everybody! ;-)

Dave, really good episode imo.

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) ;)
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 28718
  • Country: au
    • EEVblog
Re: Power supply part 4
« Reply #13 on: December 04, 2011, 03:26:58 pm »
Dave, a small request...

Can you use the rotary encoders method for the project? Rotary encoders always gives me a hard time.

Yep, I'll be using them.

Dave.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 28718
  • Country: au
    • EEVblog
Re: Power supply part 4
« Reply #14 on: December 04, 2011, 03:28:16 pm »
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.

You'd use a fast DAC instead.

Dave.
 

Offline dcel

  • Regular Contributor
  • *
  • Posts: 179
  • Country: us
Re: Power supply part 4
« Reply #15 on: December 04, 2011, 05:27:37 pm »
Dave

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...

Thank you,
Chris
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 28718
  • Country: au
    • EEVblog
Re: Power supply part 4
« Reply #16 on: December 04, 2011, 07:48:21 pm »
Thanks Chris, and welcome.

Dave.
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 1832
  • Country: us
Re: Power supply part 4
« Reply #17 on: December 04, 2011, 08:55:14 pm »
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.
 

Offline slateraptor

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: us
Re: Power supply part 4
« Reply #18 on: December 04, 2011, 09:50:44 pm »
For those who like math, the dual stage RC filter has this transfer function :



And present this impedance to the input:



(it's all from a 'back of the envelope' attempt, so I might have made a mistake but it "looks" right)

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



...and the output impedance of the filter (assuming the output impedance of the input source is negligible) from Laplace-domain to jw-domain:



Input impedance of the filter in Laplace domain (assuming buffer input impedance is ideally infinite):



I won't bother simplifying this one. Then again, I might not be remembering the filter from the video correct..."back of the envelope" calculations from "back of the mind" thoughts fo sho.
 

Offline slateraptor

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: us
Re: Power supply part 4
« Reply #19 on: December 04, 2011, 10:06:56 pm »
For those who like math...

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. =\
 

Offline george graves

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: us
Re: Power supply part 4
« Reply #20 on: December 04, 2011, 10:33:31 pm »
Any reason why using a digital pot wasn't an option?

I'm thinking of modding an off the shelf, coarse/fine typical bench top supply with some digital pots - mostly to give me programmable features.  Any thoughts?

Offline firewalker

  • Super Contributor
  • ***
  • Posts: 2314
  • Country: gr
Re: Power supply part 4
« Reply #21 on: December 04, 2011, 10:54:53 pm »
Nice!!!

I guess you are going to use a PIC mcu. It would be also nice to select C a compiler in order to make the code (The part for decoding the decoders is "essential" for me) portable for AVR e.t.c.

Alexander.

Dave, a small request...

Can you use the rotary encoders method for the project? Rotary encoders always gives me a hard time.

Yep, I'll be using them.

Dave.

Nice!!!

I guess you are going to use a PIC mcu. It would be also nice to select C a compiler in order to make the code (The part for decoding the decoders is "essential" for me) portable for AVR e.t.c.
Become a realist, stay a dreamer.

 

Offline tnt

  • Regular Contributor
  • *
  • Posts: 237
Re: Power supply part 4
« Reply #22 on: December 04, 2011, 11:10:23 pm »
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 :)
 

Offline slateraptor

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: us
Re: Power supply part 4
« Reply #23 on: December 05, 2011, 12:33:04 am »
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!! :D
 

Offline tnt

  • Regular Contributor
  • *
  • Posts: 237
Re: Power supply part 4
« Reply #24 on: December 05, 2011, 12:59:30 am »
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.

Yes, this is what I was thinking about.

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).

And btw, I LOVE this codecogs instant online latex business! Thanks for the indirect link!! :D

Yes, the stuff is just awesome :p
Not sure if they really like hotlinking to it but meh ...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf