Single Supply Low Pass Filter Stage With Post Amp - Simply Put

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
trying to do processing filtering and amplification of analog signals audio or otherwise using a single-ended power supply meaning no negative voltage it's a little rough it's really not optimal you should generally be doing analog stuff with a positive and negative power supply but working within limitations is a great learning opportunity and sometimes you want to do it with a single supply anyway so whether it's just to grasp the fundamentals really well or because you actually need to do this let's take a look at a simple low-pass filter and how I have to massage the circuit to make it work so what does this filter stage meant to do let's say we have the range of our voltage let's say this is nine volts and this is zero volts so let's say we start with a square wave and we have it going over most of the range so what does a low-pass filter do to this signal you get a triangle wave this is just for illustration I'm not worried about making it look right what you get is a triangle wave and then if you filter it again you get a sine wave or almost a sine wave but basically you're smoothing it out towards a sine wave a low-pass filter is sort of like taking the treble out and leaving the bass it's letting the low frequency components pass and blocking the high frequency components but notice what else it also shrunk in voltage when you apply the low-pass filter it shrinks the signal inward it shrinks it down it shrinks it up and the more you filter it the more the voltage shrinks the smoother you make it that's what causes the voltage to go down so the first thing is if you're going to put this through multiple filter stages you can quickly see your signal is just gonna disappear entirely so you need to amplify the signal after your filter stage so that you can still have a signal but also don't forget your noise there's always noise down here electromagnetic radiation inducting into your circuit the human who is holding or wearing your device acting as an antenna and injecting waves into your ground plane power supply ripple all kinds of noise the better quality your circuit the less noise but there will always be noise and so you have what's called signal-to-noise ratio when you amplify a signal you also amplify the noise the noise gets embedded in the signal so you don't want to have a tiny signal and then amplify the noise with it this is why microphones have things called preamps you make the signal nice and big before you send it into your filter stages so that the signal to noise ratio is as high as it can get at the start and you're not constantly injecting new noise or at least not enough to hear so you want to keep your signal as high as possible relative to the noise so the idea is every time you amplify your amplifying noise and adding more noise in but if you do fewer filter stages you'll have to drop the signal more which reduces the signal-to-noise ratio so there's an art to filtering and there's 800 million different fancy filter setups but what I'm doing here this is a fundamental wave this is not a complex audio signal this is a fundamental wave like you might use to create a sound chip on a NES from the 80s or something or you might use it as a carrier wave or it might be a power wave something like that a fundamental signal that doesn't have a lot of detail to it so the noise is much less of a concern but we still need to amplify it because we want to keep filtering it so what happens if we amplify this signal as it is because remember we're not using positive and negative voltage that would be trivial and wonderful we're using only positive voltage so it's amplified relative to zero so if you amplify this triangle wave the top of it will go up but the bottom of it will go up as well you're not amplifying from the middle and making it bigger like this you're amplifying at the bottom and making it bigger like this making a taller essentially there's a DC bias here zero volts to nine volts this square wave in the middle is 4.5 volts so your DC bias is 4.5 volts and your DC bias here is still 4.5 volts when you amplify you also amplified the bias which moves the signal up so this has the undesirable effect first of all of you can only amplify it so far before you hit the ceiling of your voltage so your Headroom is gone but also if you do it enough your signal is just gonna walk off the top of the voltage so like I said if you were using a dual power supply this wouldn't even be a problem because it would have zero DC bias but in this case the obvious thing is oh well move the signal down and then amplify cool except we can't do that because we don't have a negative voltage but we do have a serious capacitor a series capacitor it's also known as AC coupling basically DC coupling is when you just have a wire it's here to here and there's a wire that's DC coupling because the signal just goes through but AC coupling is where you have a capacitor instead of just a wire you have a capacitor in series a capacitor conceptually blocks DC but let's the AC through so DC coupling lets everything through cuz it's just a wire and AC coupling lets the AC signal through but not the DC signal not the bias so if we just run it through a series capacitor BAM what you're gonna get is the signal down here it's gonna be up and down on the zero volt line and you're gonna have a DC bias of zero and let's say this is two volts peak-to-peak still so you'll have like one volt here and you have like negative one volt here for your Peaks so then we can just bias it up so if this is negative one volt we would bias it up by one volt or maybe one point one volts so it's not right on the bottom but that's how we can rebuy us we can redo the bias of the signal is we just delete the bias and then add the bias we need because we can't subtract from the bias so then we'll have our triangle wave right here at the bottom which of course you can't see because it's a scribble but then once it's at the bottom we amplify and then we can have our nice triangle wave all the way up there although probably not at the top because we'll probably be using a BJT op-amp which can't go all the way to the supply rail I did some looking into that because if I use an op-amp it's not gonna go all the way to nine volts or whatever volts so I said oh let me use a MOSFET based op amp so I started looking for an op amp using MOSFETs and it's a little hard to find because everybody's talking about why don't you don't do that that was almost English but according to the internet MOSFET based op amps are slow and noisy although they apparently have bitter characteristics like they work better as op amps when you're talking about impede and such but they're noisy and slow so the internet actually recommends BJT op-amps which means we can't get all the way to this nine volts but the point is we just need to get high enough so if you can't get high enough then ideally you just have a stronger power supply so that you have more Headroom but I'm rambling a little bit I've gotten off the train the point is this is what we have to do step one filter the signal step two remove the bias entirely step three put in the new bias and step four amplify so let's say we have our signal well first let's say we have our power supply so here's a power supply which gives us our positive and our negative as the circuit ground I made a new symbol so I've got the power and the circuit ground so now we have our signal which of course is reference to ground so step one is to do the low-pass filter that is very simply a resistor and a capacitor connected to your negative and here is your output voltage so at this point we've filtered it through so we had our square wave and now we have our diminished triangle wave in the middle nice and easy so now what we need to do is drop the bias down so to do that I have my series capacitor so now we had our square wave and the triangle wave is down here DC bias has removed zero volts now we have to bias it back up so what I do is you have a simple voltage divider and there are better and worse quality biasing circuits since I'm using a fundamental signal the noise added doesn't matter that much if you have a noise sensitive application you're gonna want a very careful voltage source but for me this is plenty good so we just have a simple voltage divider and I use a potentiometer and I can do it in my breadboard to figure it out that's how I do these things whenever I'm not sure what resistor values to use throw a potentiometer in there as a variable resistor plug it into your oscilloscope or your multimeter if you're just using a steady signal but plug it into something and then I just turn the potentiometer up and down until it's right and then I just first disconnect the power and then measure whatever resistance the potentiometer is at remember to disconnect power don't measure resistance while your circuit is on so you have a voltage divider so this spot right here is where we want to add the bias voltage so we need one more resistor this is the resistor that is allowed to wiggle up and down with the signal so basically this voltage divider has a fixed voltage that never changes and then you've got the signal plus the bias and this resistor changes its voltage drop to allow this spot to change its voltage so now you have your rebuy astigmatism of zero so now we're back in positive voltages which means with our single supply op amp we can go ahead and amplify it and we can use a very simple non-inverting amplifier the non-inverting generally works ok with a single signal its summing that gets goofy so a voltage divider once again for the op amp configuration and this is where the feedback is so the voltage divider goes into the inverting and there's the feedback and this is the out we have out and that of course relative to the circuit ground job done so we start with our signal we run it through a low-pass filter which means we go from signal to resistor to capacitor and measure between a high-pass filter is the opposite you have signal capacitor resistor and measure between but in a low-pass filter the resistor is in series the capacitor is in parallel so we run up to the low pass filter we obliterate the DC bias we have a voltage divider to rebuy assigment ooh what we want since we couldn't do a negative bias then we amplify and then the output and again I just use potentiometers here all these resistors are potentiometers in my test circuit and I hook it up to my oscilloscope and twiddle all the potentiometers until I get the result I want then I can just measure and put in real resistors and remember let's say you need to point 4 K ohms and you only have a 2.2 K ohm resistor and a 2.7 kilo ohm resistor remember your series and parallel resistance formulas so you can do 2.4 K ohms is 2.2 k plus 1 k plus 1 K so you can use 3 B's sisters to get two point four K ohms if you need that sort of thing or if you're just using one device just leave the trim pod in there you know if you're gonna retrieve it later or you have a bunch of trim pots you can just leave it in there that's what a trim pod is for it's not just testing it's also cheap enough that you can leave in a device as long as you're not trying to make 800 million of them because that would be way inefficient but here we go this is how you do it now if we were using a to output power supply if we had positive and negative voltage then we wouldn't bias it we wouldn't do any of this what we would do is we would actually take the signal well the signal would probably have no DC bias at the beginning but let's say I had my square wave let's see it had a DC bias you just run it through the capacitor and now it's in the center and I'll do this later in other videos so don't worry about it too much but you would just take the signal immediately destroy the DC bias and then you would just filter amp filter amp and you wouldn't have to do this stuff it would be a lot easier but the entire point is we're doing this with one power supply so we have to do this there is an issue though you see how we go from signal through resistors through capacitor that's a low-pass filter but what do we have here here's the signal after the low-pass filter we've got signal capacitor resistor that's a high-pass filter we've got a low pass filter followed by a high pass filter if you have an audio signal then either you're just keeping the mid ranges or you've distorted the crap out of your signal but for a fundamental frequency that I've got just from a square wave basically it just undoes some of the low pass filter it just it just undoes a little bit of the filter it makes the filter weaker and that's probably due to parallel and series capacitor and resistor formulas you could probably do a circuit analysis and figure it out but that's what ends up happening is I have to do more filtering here because this undoes some of the filter now how do you handle this situation there's one word that always comes to mind if you have a later part of a circuit that is affecting an earlier part of a circuit so this is not supposed to be filtering it's not supposed to be changing the signal at all but it is so we want to protect the signal and that's called a buffer but we can't do a buffer because this is right here at this point the signal has negative voltages we can't buffer a signal with a negative voltage without a negative voltage we need a negative voltage to buffer a negative voltage so basically we just deal with it and we remind ourselves hey we should really be using negative voltage but this works as I'm about to show you but this right here is the magic this right here is you just remove the bias and bias it up when you can't buy us it down so let me show you with the oscilloscope so here's my circuit that's a lot of wires so I'm going to turn my power up to nine volts let it have some current and let me separate this out so that I can first show you the square wave so if I disconnect the entire circuit except for the square wave here we go I have configured oh let me use my pointer aha I have configured the display of the oscilloscope to have zero volts down here and nine volts up here so you can see the entire vertical range of the oscilloscope is our supply voltage our single sided supply voltage and then I've got a roughly 60 Hertz square wave 50% duty cycle at nine volts so that's the square wave we're starting with so the first thing I do is run it through the filter so let me reconnect the circuit and let me go ahead and measure it before it goes into the capacitor to remove the bias so here is the filtered square wave into a triangle wave it's a little sawtooth e but it's mostly a triangle wave and you can see it's in the middle it has shrunk the voltage down here and it's shrunk it up there so it's still roughly at that four point five volt bias roughly so now I've got the filtered signal I need to remove the bias so if I just run it through the series capacitor and measure it you can see and this is this is complicated because you can see as time is going on it's shrinking it's it's sinking rather this is because I plugged my oscilloscope in as the load my oscilloscope is a 10 mega ohm impedance of probe to 10 mega ohm impedance load so this is essentially an RC Network the capacitor that's removing the bias and the oscilloscope probe is an RC network 10 mega ohms makes it a very slow see network but you can see right about now it's about done so the you can see the top halves of the triangle let me freeze it so it's not so nauseating you can see that the top half of the triangle is here and then the bottom half is negative voltage down there so it's centered on zero we have now removed the DC bias so next we have to bias the signal so I have my voltage divider feeding into the signal and then through its little resistor so let me find where this is on the board so if I measure the signal after it has been rebuy estas now don't worry about how goofy it looks right now once again this is just because I've got my oscilloscope probe in series as the load 10 mega ohm load so it's completely messing it up but the point is if you look you can see the peak or rather the valley so here's the peak up here but the bottoms of the wave is right down here at 0 so I have biased it so that it's like a sliver above zero but we can see that the signal is indeed fully within the positive voltage range so there's that so now let me put that back where it goes and the final step is the amplification so this is the real output this is the actual genuine result so you can see we had a nice triangle before it was a tiny bit curved a tiny bit sawtooth II but it was pretty triangular but now that it has gone through the full accidental unintended high-pass filter and then is amplified it's more sawtooth Z so it's undone some of the low-pass filter but the bottom of the signal is there signals up here it's not noisy it's a nice clean signal because the signal still had a good enough signal-to-noise ratio because you can see right now the noise you know you can see the signal wiggling a little bit we get little spikes here it may not show up in the camera hopefully it does but there are tiny little spikes on the signal and that's the noise which is also being amplified but it's not that bad but the noise was really small so the signal still has a lot of integrity and you'll notice it doesn't go all the way up so again I'm using the BJT so let me illustrate here is I'm going to adjust the amplification I'm going to amplify it more so you can see as I go up and up and up do you see how it's clipping it's reached the maximum output voltage of my BJT op-amp that I'm using to amplify so it's losing about 1.3 so here's 9 the divisions are 1.2 so 1.2 and its Livermore 1.3 1.4 volts and this again this is why I was looking up see most casinos would give me the full voltage but the internet says that be JT's just make better op amps for tasks like this the MOSFET based op amp is apparently slower and noisier now for a 60 Hertz signal I doubt we could possibly telling the difference but if you're doing you know 10 Hertz to 20,000 Hertz like the human vocal range then you're probably going to run into some issues there and especially if you're working on a an industrial signal that's up in the you know megahertz or even gigahertz definitely would be an issue so let me reduce my amplification down again and I just reduce it down until the signal so it Clips there so I reduce it down and there it's the full waveform so at this point I could run it to another filter another series capacitor another bias and another amplification stage as much as I want and eventually smooth it out even if this is undoing some of my filter I can add another filter and the op amp is a buffer the op-amp buffers the signal so the next filter stage is not going to affect this filter stage so that's nice and that's about it once again if you're making an actual high-quality audio processor or signal processor just use a negative voltage a positive and negative voltage so you don't have to do any of these shenanigans but I have now demonstrated that you definitely can do it and it's more complex but I mean it's capacitors and resistors and op amps and that's like a dollar maybe two dollars at the worst for each amplification stage probably closer to $1 so it's more stuff to do but it works and what is the point of this why am I doing this why don't I just use a negative voltage because I'm trying to demonstrate how you can take one supply and turn it into two this is part of my DC to AC project where I'm taking a DC power supply turning it into a square wave filtering it to a sine wave running it through an isolation transformer and then turning it back into DC which can then be used as a positive and negative supply or combined for more voltage than your original supply at the expense of power so that's why you would do this why not just use a second supply I'm using this to create a second supply and there's other ways to do it but this is the way I'm doing it so while I keep doing it I'll be seeing you
Info
Channel: Simply Put
Views: 826
Rating: 4.9310346 out of 5
Keywords: simply put, simply, put, single, ended, sided, power, supply, low, pass, low-pass, filter, stage, smoothing, postamp, post-amp, post, amp, amplify, amplifier, amplifiers, amplification, filters, opamp, op-amp, operational, electric, electrical, electronic, electronics, electricity, circuit, circuits, signal, signals, square, sine, wave, waves
Id: cbZOHKa3YRc
Channel Id: undefined
Length: 20min 22sec (1222 seconds)
Published: Mon Aug 12 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.