A tutorial on op-amp comparators, and a demo circuit that lights up an LED when the sound volume reaches a preset threshold. Watch this video on peak detectors next! • Peak detector circuit ... More electronics at www.afrotechmods.com
thanks again Afro Man, I used this comparator circuit to make my own solar charge controller, and a boost converter to set a reference voltage, with a 555 to time a relay to allow the comparator to sense the battery voltage. its very simple and I can fix it if anything goes wrong. I personally want to thank you and so many others that have contributed to my knowledge base, when I need to design something, I just go back and refamiliarize myself on what I was taught by all of you, thanks mike
I know that making these videos may be time consuming and you probably have something better to do, but when I started to get back into electronics you were the best electronics channel on youtube!!! I image you still have a great deal that you can teach us, and want to thank you again for you help!!! mike
just wanted to let you know I use this circuit quite frequently, and use this video as a reference, thanks AFTROMAN, I wish you would start making videos again. you are and will always be the best in my book!!! mike
spent a large part of yesterday searching for a clear example of the output voltage because everywhere I read it sounded like one of the comparators would become the output and it didn't make sense... this video was perfect for me, thank you!
Thanks for the informative video! Was able to apply this in comparator circuit for a thermistor controlled fan in my DIY power supply. Much more sensitive than using a single BJT and easier to adjust. Great voice, by the way.
Many thanks. I was having trouble understanding opamps and as soon as I saw this i fully understood it's purpose. Especially as i am using one with a transistor to control a USB VCC to power rail when 12v VIN is not present. Thanks!
Holy cow...I just tried this circuit and it worked! I'm thinking of using this circuit with two thermistors on the two inputs as part of an automatic temperature compensating thermistor-based low fuel warning system on a motorcycle. The factory ones are thermistor based, but very crude. They only use one thermistor and are subject to temperature extremes that render them inoperable...
@TheJagwtf Think of the ground as just a point where all the "grounds" are connected. Usually the ground is connected to the battery (-) terminal, but *not* always, so don't rely on it unless it isn't specified. Wherever you see a ground symbol, mentally draw a line to the nearest ground. It's convenient because otherwise schematics would just get cluttered with links between all the grounds. It's a similar story for voltage symbols (like 3.3V, 5V etc.)
Many thanks for this great example, I have tried it and it works correctly on a breadboard but not on a strip board. What sort of decoupling/bypass would I need and where? Also I have also been told to ground the any unused inputs to ground, would this be correct?
@sinupinginaaber Try turning down the power supply to 4 volts or so. I built the peak detector version and at 5 volts it stayed on. At 4 volts it worked right.
Hi. Your tutorials are excellent. I'd like to ask you: How should I use Op Amp when I want to check lower and higher voltage limits (when the output signal of the peak detector is in wide range 0 and +5 volts, but Op Amp should be act only when the signal is between +3.0 and +3.5 volts)? Should I use two Op Amps or Should I use voltage devider to cut off lower voltage right after output of the peak detector? Thanks.
Thanks! Can I adjust this circuit low enough to be sensitive to voice (think VOX control) or do I need more amplification/ components? Thanks for the video!
@Afrotechmods I used the same circuit with a TL082 op amp. I am using a 100KHz sine wave input 1Vpp and want the circuit to trigger when the signal is at about 90% amplitude. However, The circuit's output is not stable. Using my scope, i can see the output is very stable for sometime (1-1.5 mins) and then the amplitude of the output reduces for about a minute and it again stabilises for a minute. rinse and repeat. how do i stabilise the output?? (P.S. the input is perfect, no problems there). I could email the screenshots to you if you want to have a closer look.
Why do you have a pull up resistor (1K) before the cap and a pull down resistor (100K) after? Is it to make sure that we always have a reference voltage of approx 5V?
hey, amazing videos, love the way they are made, could you please explain, i suck at reading diagrams i don't really understand where do all you ground go ? I know what ground is earth - wow captain here ground wire, or N wire - 0v or its anything that's grounded taking into account this circuit where do all the grounds go, please give some examples, (taking that im using a retro-fitted Pc PSU will the 0v wire be my ground ?)
@afrotechmods Hello , I find your videos really helpful. Can you please tell me whether , I can take the output of your clapper circuit , to a 4th order butterworth low pass filter (1hz - 1.5khz) to limit the different frequencies , generated by different sounds , just so that the output of the final circuit with the filter only responds to certain freq's which can be then sent to a pic micro controller .
I'm using two LM741, but for some reason, my LED is always on. I debugged the circuit I found out that I have a high voltage at the first output (3.9V), I apply 5V at inverting of second op-amp, but I still have a problem.
Hey, nice tutorial. What would be if we connected the LED through resistor to the output of the first op amp. Why do we need the right part for the LED instead? Thanks
@CassetteMaster i discovered my problem was actually the tripping voltage. i didn't pay attention to the resistor color scheme, so i used a 100ohm resistor instead of the 10k resistor, and i quess i had too much noise in my room, so the LED couldn't turn off. i changed the resistor and now it works. but thanks anyways.
Could you explain more how you would use a transistor to switch motors on and off. Using MOSFET I assume? I would need to cut off the Hbridge power which is driving my stepper?
How do you do the actual pin out on 555? I am banging my head against the wall missing something .... 5 pins are used- I get that/ but I can’t get it to work
damn i have bad luck i have a lm339 quad comparator from radioshack, i hooked it to 5v and GND and output to a led when i power it up and set the + to 5v and - to GND nothing happens when i switch it samething nothing happens i tried it with 3 different ones =( any help would be appreciated
when you say i could compare audio signals how would that be wired? im trying to have the gate be opened whenever an audio signal is present, with the reference voltage being 0v so that way any voltage on the other side opens the gate, and the voltage comes from an audio signal. HELP!!!
I’m using a LM741 op amp in my circuit and using this comparator configuration. Power by 9v and ground. I’m feeding 3v into the inverting and 5v from a 4081 quad AND gate IC to the non inverting input , but for some reason I get 1.2v output when the inverting is at 3v and the non inverting is at 0v. Why would this be ?
Technically yes, If you used the high output to control a transistor because obviously the output of the comparator isnt powerful enough to power anything. Youd also need an external power source with regulator to power the comparator and a voltage divider for one of the input pins and divide the voltage to 3.7 volts for a single cell lithium battery. If you used another comparator you could make another circuit similar but for overcharging protection
I'm using LM324N. I build exactly the same as your circuit, but the problem is LED always turns on. When i speak in the mic, LED flashes, but why LED is always ON? can u help me please?
3:09 Hey, may I ask something? Why there is 100k resistor added? If I'm correct, thats voltage divider, but why? Most of voltage goes to transistors gate anyway, because of the resistors values.
could you please explain to me why my light comes on when my finger moves over the capacitor filtering the mic dc. I am scratching my head as to why this is happening. Also more videos please they are great. Nicely explained and easily understood you should become a teacher in this subject.(unless you allready are)
This is really old, but it depends if the op amp implements a schmitt trigger response. If it does, it will most likely switch to one of the rails and stop because the difference between the two is close enough to zero.
hello afromods, i can't do the comparator, i followed the schematics, i'm using a 741 with a 9v battery, i've played with resistors but still can't get any output voltage, what am i doing wrong?
hey i like this and actually watching this because i wanted to know about real comparators while i learn about them in minecraft lmao, anyway if i wanted to learn more about this kinda stuff u showed in video what field would that be called exactly like if i wanted to look up videos and or go to classes for it?
1:51 why is there a resistor before the ground? i think this is too advanced for me, what source would you recommend for learning how to make circuits, specially for audio? this channel is great, but it goes over my head