YouTube2Text

Explore Working Applications of 8 Different Op-Amp Circuits - DC To Daylight — Transcript

by element14 presents · 3,724 words · 210 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Hi, I'm Derek, and this is DC to Daylight. In this  episode, we're going to take a look at a handful
  2. 0:05of OP-AMP circuits. Eight, to be exact. Now in  the previous episode we looked at the inverting,
  3. 0:09non-inverting end comparator, we also looked  under the hood in an OP-AMP. If you want a
  4. 0:14little more of a detailed explanation of what's  going on, click the link above and you can get
  5. 0:18to that previous episode. So this video is really  just going to be a cursory overview of all these
  6. 0:22circuits, and the basic formulas. How to use  them, and what values in the neighborhood you
  7. 0:27should be using to make the OP-AMP circuit do what  it needs to do. No proofs (or) fancy derivations,
  8. 0:33we'll leave that to the textbook. This is  more of a practical application approach.
  9. 0:37Just showing you how to use the thing, so  we're going to look at the inverting amplifier,
  10. 0:41the non-inverting amplifier, a comparator peak  detector summing amplifier, difference amplifier,
  11. 0:48and we'll throw in for good measure:  the clipper and clamper circuit. So
  12. 0:52let's not spend any more time talking  about it! Let's get right into it.
  13. 1:01So the first circuit on our list is the inverting  amplifier, in this amplifier we have basically two
  14. 1:06resistors. We have a feedback resistor that forms  our closed loop system, we're feeding the output
  15. 1:11back to the non-inverting input, and we have  an input resistance that goes to the inverting
  16. 1:16terminal. The non-inverting terminal is connected  directly to ground. Now in this particular circuit
  17. 1:21the ratio of the feedback resistor, to the  input resistor, is proportional to the voltages
  18. 1:27involved. So the gain of the system is negative,  because, it's an inverting amp the output is
  19. 1:33180 degrees out of phase with the input. So the  feedback resistor divided by the input resistance
  20. 1:38is equal to your gain. So let's breadboard that  circuit and we'll take a look at it on the scope.
  21. 1:43So for all experiments today we're going to  be using the TL072 from Texas Instruments,
  22. 1:48uh, much better performance than the LM741, and  has a low noise JFET. For an end, I've already set
  23. 1:54up my power supply here, I have positive 12 going  to, uh, pin 8. I have a negative 12 volts going to
  24. 2:00the negative supply here on pin 4 and you'll see  the bare wires are connected to ground, which is
  25. 2:05halfway between that supply. Some OP-AMPS need a  dual supply, some only require a single supply. In
  26. 2:11this case I'm using a dual, just for simplicity's  sake. Okay so I have bare wires here that are
  27. 2:16ground, and I have decoupling capacitors going  from the positive rail to ground, and the negative
  28. 2:21rail to ground, you should actually use these  at all times because they shunt noise to ground,
  29. 2:27and it's often omitted from schematics. so pin  1 is the output, pin 2 is the inverting input,
  30. 2:32and pin 3 is non-inverting. So the non-inverting  input in this case is connected to ground,
  31. 2:37I'm going to use a 10k resistor for my  inverting input to my signal source, here,
  32. 2:43coming from my function generator I'm going to use  a feedback resistor of 47 kilo ohms. So my gain is
  33. 2:494.7 if I have a half a volt in, 0.5 times 4.7, my  output voltage should be 2.35 volts. So over at
  34. 2:59the scope you can see I have my half a volt peak  to peak signal here, and when I turn the OP-AMP on
  35. 3:06I should see 2.35v and in fact we're measuring  2.38v, and you'll notice that the phase is 180
  36. 3:14degrees out of phase at the input. So the  blue trace is my output, yellow is my input,
  37. 3:17and they are flipped 180 degrees out of  phase so that is the inverting OP-AMP.
  38. 3:23The second circuit we're going to look at today  is the non-inverting amplifier. Now as the name
  39. 3:28implies, the phase of the output is in phase  with the input signal, there is no inversion,
  40. 3:32so we drive the non-inverting pin directly  with our signal, and at the output we have
  41. 3:37a voltage divider. Two resistors and we  tap off the center of those resistors,
  42. 3:40and feed it back into the inverting input. Now  what's unique about the non-inverting amplifier,
  43. 3:45is that the gain is of course the ratio of r2  / 1. Just like the previous one, but there's
  44. 3:51no phase inversion, so there's no negative sign.  But, we do have to add plus one, and that's the
  45. 3:56way the math works out. I'm not getting into  the math like i said, but, it's 1 + r2 / r1,
  46. 4:02that 1 means that the gain can never be less  than 1. Whereas the inverting amplifier we
  47. 4:08could actually use it as an attenuator. All that  being said, let's go over to the breadboard, and
  48. 4:14we'll actually measure it. Now let's reconfigure  this OP-AMP as a non-inverting circuit, we're
  49. 4:19going to use our 47k as our feedback resistor  which goes from pin 1 to 2, and remember,
  50. 4:25we're forming a voltage divider. So from pin 2  I'm going to use a 10k resistor, going to ground
  51. 4:31which we do there, now we're going to feed the  input at pin 3. Okay, remember the gain is the
  52. 4:37ratio of those two resistors, but we have to add  one because we're using this voltage divider here.
  53. 4:42Recall that, uh, 47 kilo-ohms divided by our 10  kilo-ohms is equal to 4.7 + 1. Our gain is 5.7,
  54. 4:50and we're going to multiply that by the  500 millivolts that we're inputting. So
  55. 4:54times 0.5 we should see 2.85 volts peak-to-peak  on the scope. So we see that we are in phase,
  56. 5:02the output has the same phasing as the input and  down here, we actually measure 2.9v. So yeah, our
  57. 5:10scope isn't 100% accurate. I trust a volt meter  better than this, but you can see that we have
  58. 5:14a gain of 2.85v close to 3v. The third circuit  we're going to look at today is the comparator,
  59. 5:20and as the name implies we're comparing two  voltages at the inputs of the OP-AMP. Now we
  60. 5:24need a reference voltage to compare it to, so in  our case we're going to use a voltage divider,
  61. 5:29and we're going to connect it to the inverting  pin of the OP-AMP. Now, you could use any kind
  62. 5:34of semiconductor specialized device to set up  a voltage reference, or you could use a diode,
  63. 5:38a zener diode, something to create a stable  voltage, to compare our input signal against.
  64. 5:43Now when our input voltage gets above our  reference voltage, the output simply slams high.
  65. 5:48Okay, when our input voltage is less than  a reference voltage, the output slams low.
  66. 5:52Pretty simple, let's see that thing in action on  the bench! All right, so this is our comparator
  67. 5:57circuit. So I have a voltage divider that acts  as a reference, going to our inverting pin, and
  68. 6:02attached to our non-inverting pin is the center  wiper of this potentiometer. So as I turn this,
  69. 6:09I can change the voltage on the non-inverting  pin, the OP-AMP is going to compare that varying
  70. 6:15voltage against our fixed voltage here, which is  only a couple of volts below our negative rail. So
  71. 6:19we'll look at it on the scope and you'll see as I  vary this potentiometer, I'm changing the voltage
  72. 6:23and it'll kind of pass over and under that  reference voltage, so the output pin will be
  73. 6:28monitoring as well, and I have it connected to  a couple of LEDs. So as I'm above my reference
  74. 6:34voltage will go green if I'm below it, will  turn red, okay, because these LEDs are flipped
  75. 6:39in opposite polarities. Let me turn this on, and  we'll monitor our potentiometer using this probe,
  76. 6:49and we'll monitor the output of the OP-AMP  using this probe. So over at the scope I
  77. 6:55have my reference voltage, okay, which is just,  uh, like a volt or so above the negative rail,
  78. 7:01and then I've got my blue trace. So as I vary  my potentiometer I can go over and under that,
  79. 7:07right, so the OP-AMP is going to compare these two  and give us a certain output. So back over on our
  80. 7:12breadboard, if I'm above that reference voltage  on green and as I decrease my potentiometer
  81. 7:19as I cross over that threshold, it turns  red. Well, it looks orange on camera,
  82. 7:23I'm going to go back above, and it turns  green. Now with this probe right here,
  83. 7:26we're going to monitor the output of the  OP-AMP, so let me turn that trace on.
  84. 7:31All right, you can see that we're 'high',  because that LED was green. Now if I go below
  85. 7:36my threshold voltage the purple trace will go low.  All right, so that's what the comparator is doing,
  86. 7:44so the fourth circuit that we're going to  look at today is called the peak detector,
  87. 7:48and essentially it's used in audio  circuits, and anytime you want to
  88. 7:52grab a signal and hold it high, for some period of  time, okay, like driving a VU meter for some kind
  89. 7:57of audio circuitry. Right, the way this thing  works is we just drive the OP-AMP with some
  90. 8:01kind of signal and at the output of the OP-AMP we  put a diode, and that acts as a rectifier. Okay,
  91. 8:06so the output of that rectifier gets fed  back into the other terminal of the OP-AMP
  92. 8:11so that forms a precision rectifier. Now  if we connect a capacitor to ground, okay,
  93. 8:16across the output shunted to ground, what we do  is when that signal goes high, it charges up that
  94. 8:21capacitor rather quickly and then it discharges.  So if we're connected to a meter it can hold that
  95. 8:26signal high for a period of time, and then we  have that natural discharge curve of a RC circuit,
  96. 8:31which brings us to another point if you have  a resistor connected across the output of that
  97. 8:34OP-AMP, it will drain faster. So you really have  to pay attention to your RC time constant. Okay,
  98. 8:39anyway, let's take it to the bench. You can see  exactly what I'm talking about all right, so the
  99. 8:43peak detector circuit is actually pretty simple.  Okay, we have a diode that goes from the output
  100. 8:48and goes into the non-inverting input.  The signal that we want to peak detect,
  101. 8:52okay, our input signal goes to pin 3 which is our  non-inverting input. I've got a probe here that's
  102. 8:57measuring the output of that diode on our scope,  our yellow trace is our input signal and the blue
  103. 9:02trace is the output waveform from that rectifier  diode. So yeah, we've got some undershoot here
  104. 9:09where the diode's turning on and off but what  we're going to do, we're going to take a 680
  105. 9:13picofarad capacitor and we're going to connect  it between the output of that diode and ground,
  106. 9:18and what that's going to do is we'll attempt  to smooth out that rectified waveform, right,
  107. 9:22just like a regular rectifier circuit, and you  can immediately see on the scope that we start
  108. 9:28to fill in the gaps here. Okay that capacitor  gets charged up, and then starts discharging
  109. 9:33and that discharge rate is an RC time constant.  So if you want to fill in this gap more and hold
  110. 9:39that peak longer, then what you need to do is  increase that value of capacitance. So let's
  111. 9:44change that value of 680 picofarads, and we'll  change it to 10 nanofarads, pull this guy out,
  112. 9:51we'll put this guy in, and there you go! Now you  can see what the peak detector is really doing!
  113. 9:56So we're charging up, we're holding, charging  up, holding, so when I turn that off,
  114. 10:02and you can see we have kind of, this sine wave,  that starts to form, it holds the peak there we
  115. 10:07charge it up again, it holds it again, so  if I were listening to music, there might
  116. 10:10be a big bass response, and then it would hold  it for a little bit and discharge. All right,
  117. 10:15and then the next base peak would come up and  we would charge up again, so you've got to know
  118. 10:19what kind of load you're driving and how the time  constant is going to affect that discharge rate,
  119. 10:23okay. So that is how a peak detector works the  fifth circuit we're going to look at today is
  120. 10:28the summing amplifier sometimes called a mixer  or adder. All right so in this case if we're
  121. 10:34using a non-inverting amplifier we have multiple  resistors at the input and one feedback resistor,
  122. 10:39okay. So again the ratio of the feedback resistor  to the input resistors sets the gain of the
  123. 10:45system, okay, so, typically we'll have the same  resistance across all of those input resistors
  124. 10:50and the ratio of, uh, r2, or r, feedback over  whatever that input resistance might be sets the
  125. 10:56gain of the system, so we could take one of those  signals, it could be a sine wave the other signal
  126. 11:01could be i don't know plus five volts and then  at the output you'd have that sine wave shifted
  127. 11:05up by five volts okay so you can use it to apply  an offset you can also mix audio signals in fact
  128. 11:10those big mixing boards that you see typically end  up going through one of these summing amplifiers
  129. 11:16okay let's take a look okay here's our  summing amplifier it's basically an inverting
  130. 11:20configuration okay so my input resistors are  both going to pin 2 which is my inverting input
  131. 11:26and i have my feedback resistor here going from  the output back to the inverting input just like
  132. 11:32any inverting amplifier my non-inverting terminal  is connected to ground all of these resistors are
  133. 11:375.6 k so overall the gain okay the closed loop  gain is 1. so whatever i see at the input i
  134. 11:43should see at the output but i'm adding these  two terminals together so nothing connected to
  135. 11:49this terminal but i have a potentiometer connected  to the other input terminal so let's connect our
  136. 11:53probe to the output of the op amp and see what we  get so as i turn this potentiometer you can see
  137. 11:58that my output voltage from the op amp changes  so what happens if i add a sine wave to this
  138. 12:04well let's connect a sine wave to the other  resistor and you can see we have a sine wave
  139. 12:11at the output on our scope let me turn on the  reference waveform that's actually driving that op
  140. 12:16amp input and that's in yellow okay so my function  generator driving the op amp is yellow the output
  141. 12:23from the op-amp is 180 degrees out of phase as  i turn the potentiometer okay i go more positive
  142. 12:30or an inverting amplifier so it drives the sine  wave down we're adding the dc offset from the pot
  143. 12:36to the sine wave that we're inputting on the  other pin okay now i could add another channel
  144. 12:41three four five other inputs to this op-amp and  we could come up with a really wacky waveform
  145. 12:46but i just wanted to show you how we can add  two signals together and there you go summing
  146. 12:51amplifier the sixth circuit that we're going to  look at today is called a difference amplifier
  147. 12:56so any time that we have a balanced signal uh  maybe a long cable run to some sensor it can pick
  148. 13:01up a lot of noise all right so from rf anything in  the environment like a drill or a motor the noise
  149. 13:07will be on that line in phase okay on both of  those signals now we'll have a differential signal
  150. 13:13along that line that we want to keep and the  difference amplifier if you have common mode noise
  151. 13:17on each line and you subtract those signals the  noise essentially goes away and that's dependent
  152. 13:22upon the cmrr or common mode rejection ratio of  the op amp all right and that's in your data sheet
  153. 13:28the higher the number in dbs the better it is  at getting rid of that noise all right and your
  154. 13:33differential signal will still be there all right  and this is a pretty cool one so let's take a look
  155. 13:38here's our differential amplifier circuit i've  got two input resistors that are connected to
  156. 13:43our inverting input and our non-inverting  input and they each have their own feedback
  157. 13:48resistors so we have basically a non-inverting  and inverting circuit with feedback resistors
  158. 13:54that work in concert to subtract the  difference between these two input signals
  159. 13:59all the values are the same at 5.6 k so it gives  us a gain of 1. now i could have made these
  160. 14:06feedback resistors equal and we could introduce  gain but i'm trying to keep things simple here
  161. 14:11what i'm going to do is introduce some  noise through these capacitors on ac couple
  162. 14:17random noise and that is going to be common to  both inputs okay so we're driving both of these
  163. 14:24pins at the same time with the same noise of the  same phase and it's connected to each of the input
  164. 14:28side of these resistors and i'm running out of  scope probes so we're just going to connect this
  165. 14:33guy up like this this guy goes to ground all right  so let's take a look at that noise there it is on
  166. 14:39the screen with the purple trace it's a 3.4 volts  peak to peak and that noise on the other side of
  167. 14:44the capacitor is going to be superimposed on that  sine wave for each of these input legs of the
  168. 14:51op amp now remember my noise is in phase and these  two signals are out of phase okay so we're going
  169. 14:57to subtract all of that and what we're going  to end up with at the output is hopefully just
  170. 15:03the sine wave so it has subtracted out the noise  and this blows me away every time that i see it
  171. 15:09it's absolutely amazing that that differential  amplifier can subtract out that noise and just
  172. 15:13leave the sine wave the seventh circuit that we're  going to look at today is called a clipper so the
  173. 15:19clipper is an interesting circuit that well in my  experience it comes from guitar okay so distortion
  174. 15:25pedals it takes your nice clean input from your  guitar and it chops off the waveform and makes
  175. 15:31it sound crunchy and you know heavy metal the  other application for clipper circuits is maybe
  176. 15:38taking a sine wave and squaring it off so that  you can measure the frequency or maybe clipping
  177. 15:42a circuit before it goes into i don't know an  arduino so that you're not damaging the input pins
  178. 15:47as a esd protection device something like  that so anyway let's look at how that works
  179. 15:52all right so in this case we're driving uh our  input resistor with our sine wave on this side
  180. 15:57and on the other side of this input resistor  we're driving the non-inverting terminal this
  181. 16:01diode connects to the output of the op amp uh  the cathode side anyway the anode side goes to
  182. 16:05the non-inverting input along with this resistor  uninverting terminal is connected to a voltage
  183. 16:10reference which is our potentiometer okay so  as we change this potentiometer we change the
  184. 16:15reference voltage and where that signal clips and  we're monitoring the output at the anode side of
  185. 16:22the diode not at the output of the op-amp but on  this side of the diode okay let's see what that
  186. 16:27waveform looks like here's our input waveform  in yellow let me turn on the output trace okay
  187. 16:32right on top of that signal and as i adjust my  potentiometer we change where our clipping occurs
  188. 16:42so neat little circuit now if i wanted to clip  the top side and the bottom side of that sine
  189. 16:46wave i could cascade a couple of op-amps  and flip the polarity of this diode and
  190. 16:51essentially you'd be able to control both sides  with a voltage reference like i'm doing here
  191. 16:56so there you go the last circuit we're going to  look at today is called a clamper now the clamper
  192. 17:00is an interesting circuit that doesn't get a lot  of love basically if you have an ac input signal
  193. 17:04and you want to apply some offset instead of  adding a dc voltage you can just throw a capacitor
  194. 17:09in the circuit and that will provide the dc offset  for you so anyway interesting circuit let's take a
  195. 17:15look on the breadboard alright so here we have our  clamper circuit it's very similar in configuration
  196. 17:19to the clipper circuit except we have a capacitor  that we're driving all right our input signal is
  197. 17:24driving one leg of the cap and the output is being  measured across the other side of that cap we also
  198. 17:28have a diode but in this case the polarity is  reversed so the anode is connected to the output
  199. 17:33cathode to the inverting input the non-inverting  input is grounded all right so what this thing
  200. 17:39does is it'll actually lift your input signal up  above ground okay so it doesn't really provide
  201. 17:46a variable offset it lifts that signal to where  the bottom part of that uh let's say a sine wave
  202. 17:51rides along ground and everything is shifted up  interesting little circuit so let's uh look at
  203. 17:57the scope and we'll turn the op amp on and you'll  see we have our zero volt reference here and that
  204. 18:02sine wave is riding right along top of it okay  that's basically how a clamper works alright well
  205. 18:09that wraps up this episode of op amp applications  my hope with this episode was that by showing you
  206. 18:15these different circuits and configurations that  it would give you the confidence to build your own
  207. 18:20OP-AMP circuits if you run across like a sensor or  something you need to interface to another device
  208. 18:25so it puts it in your mental toolbox and you can  use this as a reference so hopefully it was useful
  209. 18:30if it was let me know down in the comments  or hit me up at community.element14.com in
  210. 18:34the community the links are down below  and that is it i will see you next time!

About this transcript

This page contains the full transcript of Explore Working Applications of 8 Different Op-Amp Circuits - DC To Daylight by element14 presents, generated from the public captions YouTube serves with the video. The transcript has 3,724 words across 210 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.