Digital Comparator with OpAmp

Ойын-сауық

Get professional PCBs for low prices from www.pcbway.com -~-
In this video we use a TL072 DUAL opamp as a comparator. This is a simple circuit with many uses in digital electronics.
If you like the videos and want to keep help keep this channel alive, please visit the Patreon page and a pledge a dollar a month. This will be much appreciated and get you some exclusive perks available only to Patreon supporters, / learnelectronics
If a recurring monthly commitment makes the hairs on the back of your neck stand up, but you still want to help support the channel you can send a PayPal gift to arduino0169@gmail.com. Please make sure you tell me your KZread name in the note so I know who to thank.

Пікірлер: 126

  • @TheAussiePirate
    @TheAussiePirate6 жыл бұрын

    I love how you break down complex (to me) circuits and describe them so that I can understand. You sir, have a gift. Thank you.

  • @shfahim7938
    @shfahim79383 жыл бұрын

    The best thing of your video is, they are non scripted. So you slowly go through every step, explaining everything. Your videos are soo easy to understand. ♥

  • @bingojamas4786
    @bingojamas47865 жыл бұрын

    Thank you for the refresher. Just what I was looking for to build my battery backup with yup, a mosfet. Amazing how you sometimes find exactly what you need when you need it.

  • @jkuebler89
    @jkuebler895 жыл бұрын

    Thumbs up for a red blooded American giving a clear and concise electronics tutorial without that same royalty free music all over KZread obnoxiously blaring in the background! Thanks for all you do brother!

  • @videoloves100
    @videoloves1005 жыл бұрын

    You are a Good Teacher. you have the ability to teach Great things to People in a most simpler way.

  • @gartmorn
    @gartmorn6 жыл бұрын

    Nice explanation of the comparator circuit and good that you gave us some examples of its use in the real world!

  • @videoloves100
    @videoloves1005 жыл бұрын

    Oh man. This is what I am trying to find out and since I don't have proper tools can't understand how op amp works. now I am clear. Thank you.

  • @allabouttech5689
    @allabouttech56892 жыл бұрын

    It's has been a month now I have been surfing through the web and KZread channels just to find how non inverting comparators work and I was lucky I found this informative lesson today.For this great lesson I have to give you a thumb and also subscribe to this informative channel. Thank you very much.

  • @H-Visage
    @H-Visage3 жыл бұрын

    Man this was awesome! Well explained and the demo at the end helped a lot! keep it up!

  • @michaelpadovani9566
    @michaelpadovani95666 жыл бұрын

    The more i watch these videos the more things i want to buy! Awesome job.

  • @richardfosse2308

    @richardfosse2308

    6 жыл бұрын

    I know right! My wife hates it when I watch Slow Boat From China, Mailbag, In The Mail, etc.

  • @AdamTheAd-vanc3d
    @AdamTheAd-vanc3d6 жыл бұрын

    You defo have a knack of making your explanation easy to grasp and understand 👍👍👍👍

  • @learnelectronics

    @learnelectronics

    6 жыл бұрын

    Thanks, I do it for a living.

  • @Gazz_R
    @Gazz_R6 жыл бұрын

    Very nice explanation. Keep up the good work buddy.

  • @kgparanormal
    @kgparanormal6 жыл бұрын

    another good one, love this stuf. I like the way you change one component in different part of circuit makes big changes so many things you can do that what makes it so fun what can we make next????

  • @TheJavaSync
    @TheJavaSync6 жыл бұрын

    More .. more .. more !!!! Loved it !!

  • @igrewold
    @igrewold6 жыл бұрын

    Great stuff man, thanks a lot.

  • @Hootz99
    @Hootz99 Жыл бұрын

    Another great video! Thank you Sir

  • @pizzzzz3493
    @pizzzzz34933 жыл бұрын

    Great teacher ,Great Video ,thank a lot .

  • @celtichongy
    @celtichongy5 жыл бұрын

    Interesting material, thx for sharing.

  • @dennysowth7930
    @dennysowth79304 жыл бұрын

    I enjoyed it. And 👍. Thank you sir

  • @In3xorable
    @In3xorable Жыл бұрын

    It's a lovely circuit.

  • @dannyjensen4954
    @dannyjensen49542 жыл бұрын

    Very good video

  • @rayinoz
    @rayinoz4 жыл бұрын

    I enjoyed your video. 👍

  • @diamony123
    @diamony1234 жыл бұрын

    i think this the best way to make a On time trigger circuit by replacing the pot with a resistor and capacitor.

  • @Santhoshezhumalai
    @Santhoshezhumalai4 жыл бұрын

    How to handle with +12 & -12v and ground on IC741 using S-25-12 SMPS?

  • @nilz91
    @nilz915 жыл бұрын

    where can i buy this quad-opamp package using only 8 pins? 1:04

  • @ahmedmohsenshoheb6772
    @ahmedmohsenshoheb677218 күн бұрын

    Hello. Thanks for the video. I want to ask about something though. to get a 7.5 volt at the inverting input; shouldn't the upper resistance be of a value 100 ohm, not 1K? 7.5 v would then be = 10v * (270/270+100) or is there something else Im not seeing here?

  • @hendritresnahadi4146
    @hendritresnahadi41462 жыл бұрын

    Can or canot 741 measure in mili volt (about 100 mv) to turn on or off led with that diferrencial ?Txu 🙏

  • @efesstuff4936
    @efesstuff49365 жыл бұрын

    Can we use a lm339P comparator instead of op amp i couldnt get it to work with a comparator

  • @tamarabarnett9869
    @tamarabarnett9869 Жыл бұрын

    Kool.Thanks.

  • @juanalvares11
    @juanalvares114 жыл бұрын

    What is the minimum voltage at the vin wich we can use it ?

  • @trentjackson4816
    @trentjackson48163 жыл бұрын

    I would have used the LM393 for demonstrating a comparator. By textbook comparators are meant to be active low. The LM393 which has open collector outputs can only swing low, and this is how a comparator is meant to be. The gist of it is basically that if the voltage on the non-inverting pin is more negative than the voltage on the inverting pin, then the output swings low. So suffice to say that the reference voltage is set on the inverting pin.

  • @stefstaf

    @stefstaf

    3 жыл бұрын

    Thank you sir, you just answered a puzzling question I had. On his LM393 video he connects the cathode of the LED to the IC's Output and the anode (through the resistor) to the Vcc. In this video he connects them opposite (anode to the Aout and cathode to ground).

  • @Who5tealmynamE
    @Who5tealmynamE4 жыл бұрын

    Dope intro :DDD

  • @russellreal
    @russellreal Жыл бұрын

    will both a and b be equal to +V if both are active or will it split it in half?

  • @mattantonelli4273
    @mattantonelli4273 Жыл бұрын

    Great again

  • @buddingscientist170
    @buddingscientist1704 жыл бұрын

    Thanks

  • @balkrushnakadam7082
    @balkrushnakadam70824 жыл бұрын

    I have question, I used 741 op-amp as comparator, a potentiometer to set threshold at inverting input and a voltage divider using 10k resister at 5v side and a reversed biased photodiode at gnd side to the non inverting input. My goal is to make night light, but in situation when the output led should be off but it is actually not getting off fully it is glowing very low in off condition. But in on condition it's behavior is normal.

  • @snowheart1877

    @snowheart1877

    2 жыл бұрын

    Hi, same problem here, did u manage to solve it?

  • @allabouttech5689
    @allabouttech56892 жыл бұрын

    Sir, it's possible to use thermocouple as a sensor and if yes how to use it?

  • @MuhammadRizwan-ritz
    @MuhammadRizwan-ritz6 жыл бұрын

    how can we make analog audio to digital output using op amp

  • @lemonglataitor2123
    @lemonglataitor21234 жыл бұрын

    I think i might try to use a op amp as a comparator in a D.I.Y 555 timer ciruit.

  • @syedabishosainrizvi7817
    @syedabishosainrizvi78173 ай бұрын

    6 year old video and the intro checks out

  • @rahulpatelgujratahmedabad3497
    @rahulpatelgujratahmedabad34972 жыл бұрын

    Good tiching karte hai 👌👍👌👌👌👍👌

  • @WisdomVendor1
    @WisdomVendor14 жыл бұрын

    I don't know what resistor values were used in the voltage divider, but a 1k ohm and a 270 ohm will not give 7.5 v....closer to 2.1 v .

  • @Atetus94

    @Atetus94

    4 жыл бұрын

    I also calculated that and WTF - 2,13V, but if values switched it cames 7,87V :)

  • @freshtalatif5571

    @freshtalatif5571

    Жыл бұрын

    I also noticed this, the output of voltage divider at invertng input will lower voltage, about 2 tenth of positive supply, he put the other way around. Anyway the concept is taught, and explained clearly, thank you!

  • @j.clowers7223
    @j.clowers72236 жыл бұрын

    Awesome.

  • @uktoker71
    @uktoker716 жыл бұрын

    So something like this could be used as a basic battery protection for 18650 batteries, E.G. disconnect the power when V is less than 3V ?

  • @learnelectronics

    @learnelectronics

    6 жыл бұрын

    +uktoker71 Yes, but you would switch your inputs so it cuts off at low point

  • @darrenclark6552
    @darrenclark65522 жыл бұрын

    Is it better to use a designated comparator for this purpose or is an op amp just as good?

  • @philipgbullas
    @philipgbullas3 жыл бұрын

    refreshing! haha thanks!... and why so many thumbs down! huh!?

  • @jeffmeds
    @jeffmeds2 жыл бұрын

    I want to purchase TL072 but there are several types. What one do I purchase??

  • @thetooginator153
    @thetooginator153 Жыл бұрын

    True. As we get old, we forget things. But, it takes decades to hone complicated skills. There’s some irony!

  • @andrewsotnikov5680
    @andrewsotnikov5680 Жыл бұрын

    It's good, but can you explain why do you have 8.5V as output value?)

  • @markkennard861
    @markkennard8613 жыл бұрын

    What is the difference between using an op amp and a comparator chip like the LM293. Also what would change if you supplied some feedback.?

  • @learnelectronics

    @learnelectronics

    3 жыл бұрын

    A comparator is purpuse designed for the task, where as the op-amp is more of an all purpose design. Think of it like the comparator is an arduino and the op-amp is a raspberry pi. The pi is capable of so much more than the arduino. The op-amp can be a comparator, or an amplifier or an integrator, etc...

  • @granumuse7847
    @granumuse78475 жыл бұрын

    I'm studying for 2 days the lm358 and ai cannot understand the terms "inverting" and "non-inverting". What does it mean in field of electronics??? Of course, thanks a lot! Great video!!

  • @Physicsandmathswithpraveen

    @Physicsandmathswithpraveen

    3 жыл бұрын

    Input applied to non inverting input maintains signal output in phase as other inverting input applied signal in 180 phase shifted so inverted or signal out put is upside down.

  • @allabouttech5689
    @allabouttech56892 жыл бұрын

    Sir how can I replace the potentiometer with a thermocouple

  • @doughankins3996
    @doughankins39963 жыл бұрын

    How would you make it come on at 5v?

  • @user-zo9oh7th7t
    @user-zo9oh7th7t Жыл бұрын

    How too make a timed led with the same components like a traffic lights

  • @jamesmay4547
    @jamesmay45473 жыл бұрын

    what's the val of the pot? good viedo

  • @NMPVevoOfficial
    @NMPVevoOfficial2 жыл бұрын

    Thanks for te video! but how can we get the values of the resistors? since that we cannot choose a random value, what is the criteria to follow? Thanks

  • @learnelectronics

    @learnelectronics

    2 жыл бұрын

    Use the data sheet

  • @NMPVevoOfficial

    @NMPVevoOfficial

    2 жыл бұрын

    @@learnelectronics thank you!

  • @nabeelahsan504
    @nabeelahsan5044 жыл бұрын

    What company or model power supply is he using?

  • @jamest.5001
    @jamest.50016 жыл бұрын

    looks like someone thought this is a talkshow on comparisons. and didn't like the video.. I had been thinking about my voltage regulator circuit. for a alternator. anyway I was thinking maybe it would work better with a comparator thrown in there??? then I get this video. since its basically a voltage controlled switch. that happens to modulate to control the voltage output. and couldn't I make it adjustable if it has a op amp comparing voltages? adjust it at least with in a volt or two ? I still haven't started on the project yet. I need to calculate current draw of the rotor. what is it? volts times ohms equals what? or does it? see I need advice! what I don't know. I make up for by not being sure I know anything to start with... you know what I mean? the replacement regulators are good for 5amps@24v. so I need to know the current draw of the rotor. great video shift registers coming soon??? the more I have thought about it . a comparator wouldn't have anything to compare to!

  • @learnelectronics

    @learnelectronics

    6 жыл бұрын

    Ohms law V= I *R so I = V/R

  • @videoloves100
    @videoloves1005 жыл бұрын

    I Got to Download this video, before youtube removes it.

  • @georgechambers3197
    @georgechambers31976 жыл бұрын

    Lots of new Patrons congrats. I'm looking for something like a comparator circuit for torch height control on a CNC plasma cutter. It needs to keep the torch height controlled by keeping the voltage at the torch constant. Any ideas for something like that instead of spending $350 for a THC? Thanks for the video.

  • @learnelectronics

    @learnelectronics

    6 жыл бұрын

    Well, you could do a comparator...Set your Vref for the max height, read your Vin from the unit and if use the comparator output to kick on your z axis to lower the height by a mm.

  • @georgechambers3197

    @georgechambers3197

    6 жыл бұрын

    Good idea. I'll look into it more. Thanks!

  • @phillipneal8194
    @phillipneal81945 ай бұрын

    Can an op amp respond quickly enough for rf. type zero crossings ?

  • @learnelectronics

    @learnelectronics

    5 ай бұрын

    That's a loaded question. Simple answer, some are. Read this technical paper, it will give you some ideas and cost vs. performance data: www.ti.com/lit/an/slyt121/slyt121.pdf

  • @mbenitez6722
    @mbenitez67223 жыл бұрын

    Where did you get that power supply o:

  • @lovrobebic1447
    @lovrobebic14472 жыл бұрын

    I've made similar circuit but when voltage on non-inverting input falls to zero, the output become Digital "1" or 20V, can somebody explain me why this happens?

  • @juanalvares11
    @juanalvares115 жыл бұрын

    in my opinion the nee 555 timer is a better option becouse it has a better control in the light you can change the brightness of the led with the potentometer

  • @michaeljoshuamanallo1742
    @michaeljoshuamanallo17422 жыл бұрын

    I have a question can I use a lm348 it is a quad op amp but I will use one of the op amps inside

  • @learnelectronics

    @learnelectronics

    2 жыл бұрын

    Yes

  • @michaeljoshuamanallo1742

    @michaeljoshuamanallo1742

    2 жыл бұрын

    Thanks so much I love your work Iike and subs of you videos sir👍👍

  • @S24W2
    @S24W25 жыл бұрын

    Thank you! Could you please explain what you meant by rail to rail? Also could you do a video on making a simple buck converter? Thank you

  • @learnelectronics

    @learnelectronics

    5 жыл бұрын

    Rail to rail....if you feed the opamp +12 and -12, most opamps can only swing +10/-10. A rail to rail will go from +12/-12. I have done both buck and boost converter videos.

  • @S24W2

    @S24W2

    5 жыл бұрын

    @@learnelectronics thank you! Also I don't understand, I tried this and yes the led went on and off when I varied the pot, but it came on when the out put from pot was slightly less than negative input??? I wasnt expecting it to come on until it was greater? Thanks again

  • @remediusfernandes1570
    @remediusfernandes1570 Жыл бұрын

    Thanku sir

  • @knokcs
    @knokcs4 жыл бұрын

    my LM239J exit is negative and never positive. V+ and V- are correct. If I want to light a led I need to reverse it. How can I have positive voltage to the LM239 exit?

  • @keithcitizen4855

    @keithcitizen4855

    3 жыл бұрын

    Elementary electronics , learn about pull up resistors ETC

  • @21thTek
    @21thTek7 күн бұрын

    Great !!! ⭐⭐⭐⭐⭐

  • @diamony123
    @diamony1235 жыл бұрын

    The KISS Method

  • @killya4492
    @killya4492 Жыл бұрын

    hello sir. can i ask what i need to hook this into 220v line. i want to use this comparator circuit to send a signal to relay to cut off the line if the 220v line was touch. this is for my project. it will be my pleasure if someone would help me💙💙💙 thankyou so much

  • @learnelectronics

    @learnelectronics

    Жыл бұрын

    This is a low voltage DC circuit it will not work on mains AC.

  • @juanalvares11
    @juanalvares115 жыл бұрын

    basically like the n 555 timer

  • @stewartrv
    @stewartrv6 жыл бұрын

    I was trying to figure this out as I was confused by the voltage divider. If I'm not mistaken the 270 ohm resister should be connected to 10V and the 1K to ground. Am I right? As it was shown on the schematic the current would be 10V / 1270 ohms = approx 7.9mA and therefore the voltage across it would be 270 ohms x 7.99mA approx 2.13V rather than 7V. If the 1K was at the bottom (ground end) it would be 1000R x 7.9mA which is 7.9V approx. Of course it woun't be exact due to tolerances etc. So am I going nuts or did you switch the resistors (I was having trouble trying to read the color codes on the video) ? I know it hardly matters for a comparator but I thought I'd check...

  • @learnelectronics

    @learnelectronics

    6 жыл бұрын

    Watch today's video, totally my bad....

  • @stewartrv

    @stewartrv

    6 жыл бұрын

    learnelectronics OK not a problem I have HAM exam tomorrow and thought I had something wrong. Thanks for the fast response! Great job by the way!

  • @iqnill
    @iqnill4 жыл бұрын

    TL072? OK, quad or dual is a simple mistake, but isn't pin 7 the out-B on the TL072???

  • @jimedgar6789
    @jimedgar67899 ай бұрын

    Hahahaha Paul! That is what happens when you get old !

  • @ionchilug-lu9nm
    @ionchilug-lu9nm6 ай бұрын

    Eu nu îl pot adapta la etajul cu ir2153

  • @lemonglataitor2123
    @lemonglataitor21234 жыл бұрын

    "Close enough for goverment work" Indeed a funny one he is!

  • @alicekichlu215
    @alicekichlu2155 жыл бұрын

    I AM NOT ALWAYS SURE USING MICROCONTROLLERS IS PROGRESS.

  • @learnelectronics

    @learnelectronics

    5 жыл бұрын

    I agree

  • @russellreal
    @russellreal Жыл бұрын

    can you use a tl702cn? What is the naming convention? is anything TL702**** an opamp? Can they all be used similarly? This electronics shizz is complex lol

  • @robbs96
    @robbs966 жыл бұрын

    Noob question here. Why not use a zener and a mosfet?

  • @igrewold

    @igrewold

    6 жыл бұрын

    my comment got nothing to do with your Q sorry ;D But honestly if you wanna make it into electronics (for real that is) you gotta read the book: Art of Electronics (preferably latest edition) also get the manual(lab work for learners) and the required components. Little dedication and lotsa labs, next thing you know, you are posting something on Hackaday! ;D artofelectronics.net/ Good luck and Godspeed.

  • @learnelectronics

    @learnelectronics

    6 жыл бұрын

    +Robbie Robinson Zener and MOSFET for what?

  • @robbs96

    @robbs96

    6 жыл бұрын

    learnelectronics as apposed to a comparator. If i want to turn something on at a specific voltage why not use a zener at that voltage to drive a mosfet. Or even a programable uni-junction transistor for that matter. I know its probably a silly question. So please be patient. Thanks

  • @learnelectronics

    @learnelectronics

    6 жыл бұрын

    +Robbie Robinson Ok I understand. This is a digital circuit. What you are talking about is analog. Just different types of circuits.

  • @robbs96

    @robbs96

    6 жыл бұрын

    learnelectronics there would be an analog input to my circuts, as you have here with a pot. But the output to my circuts would be digital,just like yours. As long as my mosfet is in saturation right?

  • @kashyapkoshti
    @kashyapkoshti4 жыл бұрын

    It is dual op amp not quad op amp

  • @neilgroves3592
    @neilgroves35925 жыл бұрын

    informative lesson but your breathing into the mic Is kinda creepy....

  • @learnelectronics

    @learnelectronics

    5 жыл бұрын

    Sorry. Its cause I'm dying from congestive heart failure and use oxygen 24 hours a day. I'll try to die less creepy from now on.

  • @neilgroves3592

    @neilgroves3592

    5 жыл бұрын

    @@learnelectronics sorry to hear that, maybe a pop filter in front of your mic would help?

  • @uploadideaswithitamar
    @uploadideaswithitamar3 жыл бұрын

    Thanks

Келесі