EEVblog #225 - Lab Power Supply Design Part 4 - PWM Control

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi now after last three videos on the power supply design I've had a few people ask how do you do the PWM or the pulse width modulation voltage control instead of the 10 turn pot well it's a good question so let's take a look at it now when it comes to controlling a power supply like this you've got three main options the first one is the 10 turn pot which i've been talking about but they're quite expensive they're about 5 to 10 bucks or even more each depending on where you're buying them from the second one is to use a digital to analog converter it puts out you put a digital signal in from your microcontroller it gives you a voltage output exactly like the pot but I know you're gonna pay 2 bucks plus for a digital analog converter not many microcontrollers have a DAC actually built in so what you do is you use the third option which is pulse width modulation and it's effectively free most are decent microcontrollers these days have a couple of PWM modules in them pulse width modulator modules and all you need it's not quite free you got to pay for a resistor and a capacitor but gee you know don't cost much at all so let's take a look at these and there's a 10 turn pot and they're very very nice and if you're just building a just at linear power supply or even a switch mode one and there's no intelligent microcontroller control in there at all then I highly recommend just use a 10 turn pot you can use regular pots but then you got you've probably seen this power supplies that have coarse and fine adjustment you guys probably a dead giveaway that they're not using a high-quality expensive 10 turned pot and their Dickey trust me at just the fine and coarse controls they're hopeless get a decent 10 turn pop there 5 10 plus dollars each and you need one for voltage and current Wow there's like 10 to 20 bucks just for your supply right there doesn't include the knobs and if you go in for digital control then what you're going to use instead of a pot because you're still going to have a knob on the front panel unless you use switches then you're going to use one of these rotary encoders and they're pretty cheap only about $0.50 each or something like that under a door and you put a little cheaper knob on the top and then you've got complete control that is more than ten turns that's infinite number of turns so these are rotary encoders are great they're easy to encode in software and you can use this to drive via your microcontroller either a digital to analog converter or pulse width modulator and the goal for all three of these things is exactly the same you want a voltage output if you've got a zero to 10 volt supply then you want zero volts to ten volts output to drive whatever you're actually control your voltage regulator and these do exactly the same thing you turn a knob or these two here you turn a knob but a microcontroller generates the voltage now in terms of the deck out here you know about digital to analog converters or if you don't look them up I won't go into them here but basically they're a dedicated device you feed a digital signal in via usually you know like a serial input these days in SPI or an I squared C interface or if they're built into the micro they could do that and they give you a direct voltage out you don't have to do anything else with it they're magic but a pulse width modulator is exactly the same as a DAC it works and it will it works differently but it gives you the same result it gives you a voltage output just like a DAC and the resolutions are exactly the same as well because if you're working with a 10 or a 12 bit DAC it's going to be give you exactly the same voltage resolution as a 10 to 12 bit PWM so let's take a look at how the PWM actually works now ah you can get PWM Hardware modules dedicated Hardware block inside your microcontroller that does all this for you independent of the software the the microcontroller software can be off doing whatever it else it likes and the PWM module in the micro will take care of generating the PWM waveform and I highly recommend you use those if you have them available but you can do it using just a any a generic IO pin and you can do it in software because all it is is a digital waveform with a varying duty cycle now what we have here what a PWM signal is in this case is just it's a fixed frequency say 10 kilohertz or something like that might be a typical PWM frequency so this waveform just repeats at at a frequency of 10 kilohertz now what changes though is the duty cycle or what's called the on-time from 0 to 100 percent or what amount of time in that period that that waveform is high and it can be anywhere from 0 0 of course 0% would be it doesn't go high at all it just stays low your output pin just stays forever low and of course you're going to get 0 volts output is just low it's a DC signal but let's say it goes high for X amount of time let's say goes high for 10% of the time then 10% of time it stays low for 90% of the time what do you get out well you don't get out anything it's a digital signal but if you pass it through a low-pass filter and RC filter first order filter like this you'll actually magically it's long as you up the filter values right magically convert this PWM signal into a DC voltage from 0 to 5 volts because let's say we've got a 5 volt microcontroller and that's what it's output voltage is going to be either 0 or 5 volts well when you pass it through the RC filter like this it averages out that duty cycle our on-time value to a direct linear proportion linearly proportional voltage from 0 to 100% or 0 to 5 volts so if it's on 10 percent of the time and off 90 percent of the time you will get out 1/10 of 5 volts or half a volt out of your RC filter down here magic you can see why it is actually a DAC it's a digital-to-analog converter works just like a DAC you feed in a value in this case instead of outputting it into a digital analog converter you put it you the value that you put in from 0 to 100% gets converted into a duty cycle or on time from 0 to 100% and it generates an output voltage proportional to the digital signal or the digital number that you put in now resolution plays a big part in these digital to analog converters and pulse width modulator circuits and I said before they're exactly the same their resolution of a DAC is the same as the resolution of a pulse width modulator now based that that's sometimes what it's called it's a PWM based DAC basically because it is a digital to analog converter except it uses the PWM technique now the resolution let's take a pretty meager pretty low-end 8-bit resolution and most really cheap budget low end microcontrollers you know the 50 cent ones might have these are 8-bit PWM outputs like this now of course 8 bits represents there's 256 different levels now that means that we can set this resolution in here in steps that they can be 256 different steps in there from 0 to 100% so what does that mean it means that 100% divided by 256 it's each step we can get a resolution of no point three nine percent of our maximum voltage which is 5 volts or in this case 5 volts divided by 256 19.5 millivolt steps and if you're designing a 5 volt power supply for example then you would with an 8-bit resolution PWM module you'd be able to get you'd be able to adjust that in almost 20 milli volt steps that's not too bad for a generic lab supply but let's say you doubled that to 10 volts or multiplied it by 2 and you want to zero to 10 volt output DC supply then you've got it then your steps would be 40 millivolts ah you know it's getting a bit crusty you might want to up that 210 bit resolution if you have a look at ten bit and twelve bit resolution PWM modules in same cases five volts output then divided by a thousand and twenty four because it's ten bits four point eight millivolt almost five millivolt steps not bad twelve bit one well here we're getting serious now 4096 steps in twelve bits so we're talking a resolution of one point two two millivolt steps fantastic now here comes that tricky thing to do with the difference between resolution and accuracy just leave it on multimeters and a whole bunch of other stuff yes a 12 bit digital to analog converter be it pwm based or other type of verdict based our system then you will get almost 1 millivolt just over 1 millivolt resolution or steps from 0 to 5 volts and it's and you do actually get that you can control that output you can jump it up by one point to 2 millivolts bang-bang-bang or drop it down like that you've got that fine control but the absolute value or the absolute accuracy well if you feed in completely 100% are you going to get exactly 5 volts out well that depends on how you power or how you power your micro controller here because the good thing about modern micro controllers is that they're all CMOS this CMOS output so they use fit switching on the output so that means that they can get incredibly close ridiculously close to their input voltage rail up here on their output switches so if you're powering your pick from precisely 5 volts 5 point zero zero zero zero zero volts then you can pretty much expect close to that absolute accuracy on the output of your PWM here as a you know yeah there might be a millivolt drop or something like that there's going to be very very close okay with these FET outputs now if you just power your pick avy are from like a 7805 they're only five percent accurate so the output of your pulse width modulator here is going to be five percent accurate absolute as well and that's really not much good if you've got a bench a precision bench power supply now you can compensate for that in software or pots with that further gain stages or something like that you can actually calibrate it and tweak it but yeah that's a bit nasty but so sometimes you might want to actually power your microcontroller step it from a regular voltage regulator you can actually power them from a voltage reference well there's precision are you know a two and a half volt voltage references if your micro goes down that low or a 3.3 volt voltage reference or a five volt voltage reference and you can get those in like naught point one percent or something like that point two percent for a dollar or so so you can actually power your microcontroller from that provided that your microcontroller and the other circuitry are powering from it doesn't take more than its maximum allowable current but you can actually do that so when you're designing power supplies like this don't be afraid to actually power your microcontroller from a precision voltage reference it can work and it can be very handy and in the previous videos I actually used an lt1 double-a line voltage reference in the bill between use allen 336 there's hundreds or thousands of other voltage references and some of them might have you know 40 50 milliamps output capability and that's a decent amount of current for powering a a microcontroller but just be careful if you're driving loads like LEDs and stuff directly from the microcontroller then that currents got to come from the micro power rail which comes from the voltage reference but as long as you don't exceed that you can get excellent absolute output accuracy as well as resolution on a PWM so as you saw if we have 10% on 90% off during our period here then we're going to get this RC filter is going to average that value out to naught point 5 volts but it's not just going to be completely DC there's going to be some noise on that okay there's going to be noise superimposed on there depending upon the values you pick down here and how effective this filter is so really need to take a look at it in depth at the filter and what values you need to get rid of say a 10 kilohertz might be a you know a very typical frequency let's take a look at what RC filter you need to get a decent our low noise output from this which then usually you want it lower than your resolution so if your resolution is 12 bits you don't want the noise to be any more than 1 bit resolution of 1.2 2 millivolts now what we're going to take a look at is a filter simulation program here I'm using that filter lab it's from microchip it's an older program it doesn't okay job there's one another one from ti and from various other people were linear technology do one as well and and they're all pretty old but they give you a good feel for how filters work in this case we just got our simple RC filter here with the buffer and that's called a single-pole filter and we can change the filter up here that's this number one up here that's so if we go to a second what's called a second pole filter you've added some extra components and third a three pole filter and a four pole filter this is called a cell and key configuration there's there's different configurations you can do but basically the order of the filter the higher the order the greater the attenuation of those higher frequencies now let's take a look let's go to the first order filter now I've set the filter to have a roll-off a nominal roll-off or a filter cut frequency of 1,000 Hertz so you can see that here it's 1 kilohertz and what that means you've seen that probably seeing that formula before it's out 1 over 2 PI R C and that gives you the cutoff frequency of your filter now that it's not a brick wall cutoff okay what we've got on the x-axis here is our frequency okay now this a logarithmic scale so it's in decades so it doesn't go linearly from say a hundred Hertz to a thousand Hertz here it goes that's a hundred Hertz that's two hundred then three hundred four five six seven eight nine and then a thousand Hertz like that now the reason we use the log scale like this is because it actually gives us a linear slope like this it converts our logarithmic response into a linear slope which will become it's just easier to do what it's easier to fit wide frequency spans into the one graph like this so that's why we're using a decade log rhythmic response on the x-axis now the y-axis here is the magnitude in DB so right down here at a hundred Hertz it's got zero DB attenuation that's the attenuation of the filter so you're feeding your signal and what you get out you at a hundred Hertz you feed in exactly what you get out there's zero DB attenuation now the the filter cut frequency that formula 1 over 2 pi RC that gives you your what's called minus 3 DB cutoff frequency of that filter so as you can see in that that filter there I've got it on the y axes there it's about minus 3 DB and it's spot on a thousand Hertz on the x axis because that's where that's what we've designed it for and then it rolls off after that now you remember we've been talking about filtering out of 10 kilohertz frequency well let's go down to 10 kilohertz here it is how much is our that filter attenuating our 10 kilohertz signal by well if you take that over to the X sorry - the y-axis over there it's minus 20 DB and if you know your DB is a minus 20 DB drop in amplitude is 1/10 or an order of magnitude so if we're feeding in one volt we're going to get out nor point one volts now the thing about DBS is that once you step down - if you go down - and so in multiples of 20 that's in an order of magnitude drop so minus 20 DB is 1/10 minus 40 DB is 1/100 - 60 DB is one thousandth and - 80 DB is one ten-thousandth of your input voltage now if we increase our polled our number of poles or the sharpness of our filter you'll see that it gets steeper and steeper as we go off now the roll-off which is specified in DBS per decade can be specified in other things too but in this case it'll be DB per decade and it gets just sharper and sharper and as you can see if we used a five pole filter our 10 kilohertz signal would be attenuated by - 100 DB that is absolutely phenomenal okay but if we use our first-order filter which we've got our RC filter it's only attenuated by 1/10 so we're not going to filter out if we set our cutoff at a thousand Hertz so if you're trying to filter out a 10 kilohertz frequency PWM signal with a 1 kilohertz filter it's going to do a pretty done poor job of it it's only going to attenuate that 10 kilohertz signal by one or the 10 kilohertz ripple by 1/10 it's hopeless that's like yeah 10 percent unbelievably hopeless now what I've done here is to set the filter to our 10 Hertz so there's the minus 3 DB cutoff frequency at 10 Hertz and you'll notice that at 100 Hertz it's 20 DB down and 1 kilohertz there it's 40 DB down so if you measure the difference actually between the hundred once it gets on this linear part of the curve here if you measure the difference between the 100 Hertz frequency at minus 20 DB and the 1000 Hertz frequency at minus 40 DB that's what's called 20 DB per decade so that filter rolls off at 20 it you get 20 DB attenuation per decade in frequency so we if we extended that graph out even further there where to 10 kilohertz we'd find that it would be down to minus 60 dB so if we set our filter at 10 Hertz at 10 kilohertz we will be Mott will have minus 60 DB attenuation of that 10 kilohertz fundamental frequency and remember when I said it drops an order of magnitude or 10 times per 20 DB then at 10 kilohertz we'd be at minus 60 DB sorry it's off the graph I haven't got enough decades to show it here but it's minus 60 DB at 10 kilohertz so that's one one thousandth that's the attenuation so you feed in one volt then you're only going to get one milli volt out now just to be clear that one milli volt I'm talking about there and these are levels I'm talking about are they only apply to a sine wave at 10 kilohertz so basically all this filter talk we've been talking about doesn't actually apply directly those amplitudes to the PWM it gets more complicated when you start talking the PWM signal and in practice it's actually going to be out lower than that but let's I use a ballpark let's say you did actually get 1 millivolt of ripple out assuming it transferred to your output through the regulator then and there wasn't any extra further filtering then you know that that might be okay but generally you'd want to shoot for better than that but with a filter cutoff of 10 Hertz you know that means you're not going to be able to change your output voltage really quickly and on a DC power supply if you're manually turning a knob it's not a problem you know you can't turn that knob very quickly at all you're going to turn it only it you know effectively you know a 5 or 10 Hertz at most or something like that okay you're not going to get huge big step changes on your power supply because it's filtered out all right now we're actually going to do some real circuit simulation here with a PWM signal and with our LC one pole LC filter and see what we actually get out now I've set up this voltage it looks like a voltage source but it's actually a pole source I'm using ltspice here which is a free art circuit simulator Chintu I highly recommend you get it it's pretty darn good and basically what I've said here is I set the pulse width modulation voltage level from R to 1 volt so it's going to switch between 0 and 1 volt now you know I it won't do that if you're using a microcontroller that's say a 3.3 volt voltage rail you will get 3.3 but we'll set it to 1 here just to make our math nice and easy today now the period down here I've set to 100 microseconds and that's equivalent to 10 kilohertz so we're going to get a 10 kilohertz repetition rate on our PWM signal and then I can set my on time I've set it to one-tenth of that so I'm setting it to 10 percent on time or 10 percent duty cycle it's 10 microseconds out of that 100 microseconds total okay so what I'm doing is I'm arts going to go into the simulation command here we're doing transient analysis and I've set my stop time to 1 millisecond and I've set my time step so it done effectively samples that simulates a circuit every naught point 1 microseconds and if we hit that then and we run it up here bang there we go and I told it so we're only going to get it stops when once I got to that 1 millisecond period and what we're doing is we're measuring this point here you can see the little red probe down there on the circuit and we're probing that point right there which is the PWM input and as you can see it is 10 percent and you can go in there and actually measure that precisely but trust me it's going to be 10 percent sauron times 10 percent so we expect if we're feeding in one volt here one volt peak-to-peak there it is over on the y axes here from zero to one volt PWM signal we expect 10 percent on time we expect one tenth voltage on here do we get it well not quite and we'll see why now the reason is is that is actually slowly ramping up because there's an RC time constant we started the simulation from zero so we're going to have to go in here and we're going to have to extend that time period let's say set it to a hundred milliseconds like that let's leave it at point one it could take a bit of a while to simulate that but let's try that again shall we now it's going to be hard to see that if we zoom in so let's click on the circuit here bang look at this and you can actually see that window there let's zoom to fit okay and bingo you can see it rise up like that that's our RC time constant that it takes when you first switch on the supply or change the voltage or whatever it doesn't respond instantly but it eventually settles down to bingo what does it settle down to go across here exactly 100 millivolts average trust me if you drew a line straight through there it'd go right through the average point that waveform so there's our 1/10 it's worked our 10 percent duty cycle has translated to 1/10 of that or a hundred millivolts output voltage and if you look at the output on the op amp over here you can see that that takes a little bit of time but it responds to the same value but there's a little bit of an offset there that's going to be due to the offset voltage but anyway what we really care about here is this noise look at the rip where you can see that the switch in frequency because the RC filter we're using is not low enough in value to filter out all that noise who wants a power supply when you're trying to output 100 millivolts it's got you know once it got 10 millivolts a ripple on that air hopeless and that's with the filter frequency down here of a hundred and fifty nine Hertz because if you do the math use that formula 1 over 2 pi RC that's that the 3 DB cutoff point of that field is 159 Hertz and we're trying to fill filter out 10 kilohertz so as you can see it's not terribly effective at all but let's try that again if we actually change that to 1 micro farad you'll find that this ripple here will decrease we're increasing the capacitance by a factor of 10 so our filter frequency will go from 159 Hertz to fifteen point nine Hertz and you'll find that because this is all order of magnitude the ripple will also drop by an order of magnitude so let's risa mule eight that so it's about ten millivolts at the moment let's re-sing late that and bang it slightly ramping up it's ramping up but as you can see it's taking longer it's taking much longer to actually get up to frequency there because we've changed the RC time constant so you can see that's taken 54 milliseconds before it even you know 50 odd milliseconds before it even sort of starts to level out like that and that's not too bad actually now let's go in there and have a look at the ripples oome right into this window here and bingo you can see it there it is that's only about one but what's that half a million volt even it's only half a million volt ripple fantastic so as you saw there there was really quite a trade-off between the response time and the and the filter effectiveness or the filter attenuation now to do that to get around that we can add a second stage RC filter like we've done here exactly the same so we've gone back to our original 10k and hundred in here so that's 159 Hertz nominal 3 DB cutoff we've added another identical one here 10k and a hundred N and we could do it with the op-amp and use you know various configurations like a cell and key configuration and all that sort of stuff but let's just keep it simple and put 2 RC filters in series like this and if you run it this is what you get the green line there is the value on here like the FIR exactly what we saw before okay that's got our like 10 millivolts of ripple on it it's huge but our second one here after that that is the blue line there and check it out that is let's put both on there and as you can see it's it's beautiful it and if we zoom in on that let's zoom in on that part of it there look at that the blue one smooth as a baby's butt there's hardly any ripple on that at all we're talking Oh point one millivolts point two millivolts or something it's tiny so that's just an easy way that you can get extra fill room on your pwm just add a second RC filter stage I mean sure you can up these values here okay these 10k this 10k and hundred n you know you can up those but then your response time gets low so it's better to add this second stage here and then you can keep your response time fairly quick at 10 milliseconds or something like that but it has much greater attenuation so you know we're down in the hundreds of micro volts there now just by having a simple 10k and hundred n like that a two-stage RC filter beautiful now what happens if your PWM signal we say five volts out now let's change it back to five volts here but let's say because you've got a five volt rail in your microcontroller but you don't want to get 0 to 5 volts out you only want zero to one volt or something like that well what can you do it's easy you can add a resistor in here to actually attenuate that so let's add that in and see what we get so let's run it again with that we've got our 5 volt signal here okay there's our 0 to 5 volt PWM signal at 10% so what do we expect out we expect half a volt 500 millivolts here that was before we added this 10k though so now we expect to have that again or 0.25 volts to 50 millivolts let's see if we get it bingo we do there's our 250 milli volts but it's got the ripple and if we look on the output here then bang there it is our blue line our blue trace there that's 250 millivolts so let's run it again with that we've got our 5 volt signal here okay there's our zero to 5 volt PWM signal at 10% so what do we expect out we expect half a volt 500 millivolts here that was before we added this 10k though so now we expect to have that again or 0.2 five volts 250 milli volts let's see if we get it bingo we do there's our 250 milli volts but it's got the ripple and if we look on the output here then bang there it is our blue line our blue trace there that's 250 millivolts now here's an interesting thing I just wanted to show you quickly we've got an LT 101 4 op amp here I just chose this generically just so we could get something working from the library now it just so happens that this is a fairly you know good precision op amp is only got a couple hundred micro volts offset voltage and you pay a bit of coin for this thing so it expected to work out quite well at low values so let's actually try that now I've changed my PWM here to nought point one microseconds are compared to 100 microseconds period so that's one one thousandth of our 5 volts maximum PWM voltage there so if we're getting 5 volts are here with one 1000th on time we expect 5 millivolts out of our filter and if we run it bingo that's exactly what we get there's our 5 millivolts and that's the input to the a ball that's the first stage to fill the second stage filter input to the op-amp 5 millivolts well let's also add on the output of the op-amp why look at that 35 millivolts what's going on well it turns out that this if you look at the data sheet for the LT 101 4 it turns out that you can't actually I go down to zero volts unless you have a decent load on there it's not a rail-to-rail op-amp so just be careful if you're right actually when you're choosing an op-amp like this in this grounded configuration and you don't have a negative supply voltage for that op-amp just make sure that it's actually capable of zero volts on its output otherwise if you use this fairly high precision op-amp we'd get a 35 milli volt output offset terrible so you might think that the solution to this PWM thing and the trade-off versus there's the response time versus the attenuation and the ripple and all that sort of stuff is to just up the frequency of your Peter um signal well yeah in theory that's great the higher the PWM frequency you use the easier it is to filter out with better response time but the microcontroller is going to have a limit to how high a PWM frequency it can go based on the resolution and generally you can change the resolution of these things you might be able to use the and a 10 bit resolution pwn you might be able to use it as an 8-bit one or as a 10 bit one for example and it's going to have a maximum upper frequency you have to read the data sheets very carefully to get that sort of info but generally you want to run them as fast as possible alright enough of the simulation stuff let's actually feed it into our circuit a PWM signal to replace the pot which we used before in the previous videos that's exactly what I've done I'm using the function generator output of my Agilent scope here to actually replace the pot and I'm feeding the end where a single RC filter which is what we've looked at and this is what I've got here instead of the voltage control pot where we've disconnected that and we're taking it down to a 10k and a hundred n low-pass filter just as we looked at and the frequency I've got set as you can see here if you go in here you can see I've got a hundred kilohertz frequency and our amplitude is 3.3 volts so we're simulating a microcontroller generating that PWM signal with a 3.3 volt rail the offset voltage because it this is a function gen that's going to be halfway in between and we've got a 50% duty cycle or 50% on time so if we're feeding in 3.3 volts and by the way I've also changed this feedback resistor here just to make the math easy change it to 10k so we'll have a gain of times two in this amplifier control loop here so if we're feeding in 3.3 volts that we've got here we should get some ripple out of here of course because it's not that great this filter on its own and so but at 50% duty cycle we'd expect to yeah 1.65 volts out here it multiplied by two we expect to get out 3.3 volts out of here exactly what and let's actually see if we get it well if you have a look here let's zoom out there it is there's our output voltage it's pretty close there's going to be some error in here this isn't that perfect but if it was you use more more precision our function Jen and stuff you get exactly 3.3 so we're getting out exactly what we expect and this the green signal here which I'm triggering off there's our 3.3 volt 10 kilohertz PWM signal and the yellow trace here is the AC coupled our output on that RC filter there so on the IC RC filled it right there that's our yellow waveform there as you can see that yellow waveform 100 millivolts per division we're getting a hundred millivolts ripple on there and let's probe the output and see what we get and this is our output I've just in the output of our power supply our 3.3 volt output now as you can see it's a there's not much on there at all where it's still 100 millivolts per division but if we turn that up you can actually see you can actually see the ripple on there now down at 10 millivolts per division we're getting about 5 millivolts where you know 8 millivolts worth of ripple or something like that and look at these little high frequency stuff in here like that bit of ring in there that's probably due to our probing and stuff like that but you really want to get rid of this sort of stuff so that's not adequate ripple if we just used that 159 Hertz our filter there that's that's really no good at all I don't like that one bit now you're probably asking why did that output actually why did that output ripple drop from 100 millivolts to under 10 millivolts it shouldn't have all just if we were getting that here shouldn't have all just pass through that straight to the output well no not really remember these caps were got here they're going to do some filtering as well and that's where you get a free your place the 22 microfarad cap here down to a hundred n bingo and it turns out that I still had 47 microfarad of capacitance on the output there so I took that off and what do you get magic look at that Wham that's an absolute shocker and bingo it's back to 100 millivolts here you go so it's actually man L made its way all the way through so all of our noise all of our ripple that we had on our floor T here has gone all the way through because now we don't have adequately adequate filtering on the output or the or the input to the set pin here and what happens if we add in second RC filter in here once again 10 K and 100 n bang there's our output voltage exactly the same scale as before but our ripple has dropped very very significantly and once again that's with no practically no output filtering or no filtering on this set pin and if we replace our filtering back our 22 mic here and they're big capacitance on the output bang there's our noise it's suddenly vanish these are the large spikes in here are going to be due due to work ground bounce and stuff like that you can actually see the bouncing there is to do with probing and things like that so don't worry about that but the output noise there now that beautiful and what happens if we adjust the duty cycle here well let's give it a go shall we let's drop it down to say 10% where of course silly function GN only allows us to go down to 20% but there you go that's the expected 1.3 volts or 20% of that 6 point 6 volts because we've got 2 times 2 F in there there you go it don't work fine and if you drop that if you did drop that true to cycle down or 1% or 0.1% you will find that the output voltage would fire so there you go that's a practical demonstration of how to replace your control pod with the PWM output or a DAC output of a microcontroller piece of cake catch you next time you
Info
Channel: EEVblog
Views: 181,563
Rating: 4.932682 out of 5
Keywords: Laboratory, Design, power, supply, bench, lab, constant, current, voltage, control, RC, filter, resistor, capacitor, pole, logarithmic, noise, filtering, exponential, curve, attenuation, graph, slope, decibels, DB's, per, decade, Electronics, pulse-width, modulation, PWM, math, formula, ltspice, simulation, spice, response, open source hardware, open hardware, oshw
Id: YaRDbw38x7Q
Channel Id: undefined
Length: 40min 13sec (2413 seconds)
Published: Fri Dec 02 2011
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.