Peak detector circuit tutorial for beginners

Поділитися
Вставка
  • Опубліковано 11 жов 2024
  • A tutorial on peak detectors and an example that uses the clapper circuit from my comparator tutorial video.
    Make sure you watch the comparator tutorial first: • Comparator tutorial & ...
    Webpage: www.afrotechmod...
    #Electronics #Science #Engineering

КОМЕНТАРІ • 157

  • @Unordung
    @Unordung 6 років тому +54

    We miss you man, I hope you are well.

  • @philbx1
    @philbx1 13 років тому +1

    Thanks much for another 'real-world' example again explained so well ATM.
    This is just what I was hoping for as a next step. Fantastic work!

  • @RolandBanc
    @RolandBanc 8 років тому +6

    You Sir are amazing! You explained this topic in an interesting, fun, but still usefull way. Thank you for makeing so great and understandable videos!

  • @RickM1953
    @RickM1953 13 років тому

    I wish I had had a teach like this when I was in High School... I might had stay with it longer. But these videos make my hobby so much more fun! Nice tutorial. Keep them coming

  • @humayun891
    @humayun891 9 років тому +18

    Oh man You've cleared all of my fucking concept which i couldn't learn Reading the Electronics Books Again and Again

  • @batiatto
    @batiatto 13 років тому

    these videos are just great. this is the way a professor should explain things all the time.

  • @lecongminh3
    @lecongminh3 11 років тому

    You're like god to me. Now everything I've learned in 4 years college comes back and hit me in the head, and I go Ahhhhhhhhhhh in every single of your video. I wish school adds practical cases like this in teaching, it'd make it so much better.

  • @juntendo6104
    @juntendo6104 4 роки тому

    I find your videos very straight forward and easy to understand!

  • @k3ndro
    @k3ndro 13 років тому +1

    i really learn a lot from your tutorials man!

  • @tswdev
    @tswdev 13 років тому

    You just showed us how we can analogically create the PTT holder that many voice conference programs have, when you have voice activation and you want to make the transmition smooth by not stopping the transmition when you pause your speech for a tiny period.
    Very good :D

  • @InsurgentX
    @InsurgentX 13 років тому +1

    Great tutorial. And I love the burnt alligator clip ends: Proof Afrotech has a dark side!

  • @pokerus987
    @pokerus987 13 років тому

    Your videos are really helpfully, and your explainations are very easy to understand. Keep making videos and I'll keep watching

  • @ivanv754
    @ivanv754 13 років тому

    @Afrotechmods the best part is that you can trigger it for hours and is an active circuit capable of handling up to 200mA on the output! Not every IC does that.

  • @CARlosDAN783
    @CARlosDAN783 Рік тому +1

    Excellent friend, you earned a new subscriber from Venezuela. Thanks for sharing.

  • @137bob3d
    @137bob3d 5 років тому

    yes , i enjoyed seeing your video as it is close to something i'm working on.
    and am tempted to use your MIC amplifier idea instead of the max4466
    and 9814 modules bought on ebay. except the 9814 has AGC which
    is a problem solver in itself. for my projec tthe comparator step you do w/ an op amp
    is handled in code with an if-then statement
    overall it includes taking sounds that are brief and intermittent and capture them
    with your circuit plus a Picaxe uC with ADC pins. a 20M2 at this time
    lots of new ground to tread . with many interesting challenges along the way .
    practically everything is an unknown when doing a big project like this for
    the first time. here are some of the problems that have arisen along the way :
    a) figuring the gain for stage 1 based on the volume
    of the incoming sound
    2) determining the R-C values so the cap' voltage fades enough
    to be taken as a new sound when the ADC is looping-repeating every 250mS or so
    3) test the ADC level output of each sound w/ the uC to be above some threshold in a 0-255 space
    and keep track of how many sounds over one second meet a volume spec'. etc.
    this is the comparator step mentioned above ... done in code.
    4) re-learning the exponential equation for cap's : V=Vc * e ^ t/RC
    5) lastly is managing the voltage levels with the FVR2048 voltage reference
    directive so the ADC uses its converting voltage space most effectively
    a few things yet to learn :
    a. how to deal w/ the 9814 and its mid-range DC offset ... what does the ADC do with it ?
    b. to store the count of noises in inner 1-dimensional arrays or ext'l EEprom ... ??
    another matter is not knowing precisely when the uC samples the ADC pin.
    the PIC uC's dont give you access to the inner register bit change when 'GO'
    happens. so right now the best i can do is code a 100uS pulse before and
    after the readadc command. then , on the scope, the 2 pulses serve to frame
    when the adc pin does its sampling. this allows seeing how well the ADC
    aligns with the peak detector when the DC voltage is flat
    such a simple looking circuit leads to many new directions. and stops your
    progress every time you run up against the end of your knowledge.
    then you might find yourself searching u-t for others who too have tread this path
    i'll be looking thru your other videos to see if you are including uC's ...

  • @Draminicus
    @Draminicus 11 років тому

    Love these videos. I have passed all my tests with perfect scores by watching these videos. Now one request I might make if you have the time, could you show us how to turn schematics into actual componets, like take a simple schematic and translate it into a board. Like componet location, how to ground, ect. The electrical classes I'm in are brief, and messing with this stuff has always interrested me, I just can't figure out how to take a schematic from paper to board.
    Thanks.

  • @Afrotechmods
    @Afrotechmods  13 років тому

    @coolnitroguy Google "RC time constant" for more information. It takes roughly 5 times the time constant to fully discharge the capacitor.

  • @odedejikehinde6514
    @odedejikehinde6514 3 роки тому

    Thanks Afrotechmod, this is short, concise and really helpful little circuit 😉 .

  • @jitendrasingh8105
    @jitendrasingh8105 7 років тому +7

    dnt know its edited or not but i just love ur voice..

  • @BertGrink
    @BertGrink 6 років тому +4

    +Afrotechmethods
    Couldn't you improve the sensitivity of the peak detector by using a germanium diode? I mean, Ge diodes have a forward voltage of around 0.2volts, compared to the typical 0.65 volts of a silicon P-N junction.

    • @g00glian0
      @g00glian0 5 років тому

      That is a great question. I hope someone answers it.

  • @justinle998
    @justinle998 8 років тому +3

    Perfect explanation ... Very clear n concise!!!!

  • @RandyLott
    @RandyLott 13 років тому +1

    I suppose you could make an over-excessive VU meter with this using a resistive network and several peak detectors. Cool!

    • @BertGrink
      @BertGrink 6 років тому

      That is more or less how a bargraph-meter IC works, i believe.
      Take a look at this site, where a more detailed description can be found:
      forbharat.wordpress.com/2011/04/30/lm3914-based-voltage-measurement/

  • @宝宝-n8q
    @宝宝-n8q 4 роки тому

    Thanks, sir, hope you are happy and healthy!

  • @CassetteMaster
    @CassetteMaster 13 років тому

    I built the circuit and it is pretty neat. Thing is it would not work right on 5 volt power (it would stay lit). Running it at 4 volts made it work properly. I used an LM324 chip.

  • @olajideoyekunle9044
    @olajideoyekunle9044 6 років тому

    Good one and many thanks. Very short and apt video. Your subscriber base just increased by one.

  • @JurriaanPetersen
    @JurriaanPetersen 13 років тому

    Thank you so much for these videos, I'm learning so much from you. You make things easy and you teach me stuff I don't get at school. MOAR VIDEOS!:P

  • @jighiliano87
    @jighiliano87 12 років тому +2

    only if you were a prof in a university, everybody would become a genius!

  • @thatoneguy99100
    @thatoneguy99100 6 років тому +4

    This counts as studying for my EE final right?

  •  7 років тому

    perfect tutorial video I have watched so far

  • @newbie3566
    @newbie3566 11 років тому

    please make more videos like these... they are so useful... subscribed

  • @phoenix2464
    @phoenix2464 7 років тому +1

    glad I found your channel

  • @BGraves
    @BGraves 11 років тому

    I used this to make a circuit which i put inside an enclosure that measures the peak voltage coming from motorcycle stator coils which provide the power for the CDI and coil. it plugs into my multimeter which I set to peak mode to record the peak before the resistor drains the capactor. Multimeters don't sample fast enough to record these high voltage pulses.

  • @tohtorizorro
    @tohtorizorro 5 років тому

    2 questions:
    While elegant in its simplicity, this implementation of the peak detector seems to have a pretty serious flaw. Judging from how long the led stays on at different occasions (i.e. how much the capacitor has charged) even if the first clap is loudest, the consecutive claps seem to still charge the capacitor. If we think about a more useful implementation where some sort of meter would indicate the level of the loudest clap, it would fail by adding a bit to the reading by every clap even if they were preceded with a louder one.
    ..As I wrote that I did come to think that this might be only a problem due to the charging time of the capacitor (which of course isn't instant even without notable resistance).. So, if we'd imagine the cap could charge instantaneously while maintaining its discharge properties, would it fix the problem?
    I mean, as the capacitor charges, the voltage at the capacitor's 'upper' plate rises and so there would not be potential difference over the diode unless the clap would be louder than its predecessors?
    Another thing... wouldn't the level of the peak affect also the hold time? I'm not saying this is necessarily a bad feature, it might even be a preferred one but just want to know if what I've understood so far is correct.

  • @ubuntututorials
    @ubuntututorials 13 років тому

    You can also use an op-amp as a super diode (google it) to eliminate the diode's voltage drop. Only really an issue for precision circuits though.

  • @alexvalent2176
    @alexvalent2176 10 років тому

    love it this is really helping me out with my knowledge of electrical circuits

  • @mtkoslowski
    @mtkoslowski 4 роки тому

    This an absolutely outstanding channel! ⭐️⭐️⭐️⭐️

  • @silverstream314
    @silverstream314 13 років тому

    Great tutorial as always! Couldn't one use a flip-flop circuit to get the output to switch between on or off with each clap?

  • @HellaFunnyShorts
    @HellaFunnyShorts 10 років тому

    Another great video, what frequency is the clap at, maybe a band pass filter could make this like a clap on clap off device that wouldn't be activated by any other sounds (within reason)

  • @reactor1system
    @reactor1system 13 років тому

    Nice tutorial. Keep them coming!

  • @ATIFAMANKHAN
    @ATIFAMANKHAN 12 років тому

    Good Explanation. Great work Keep it up. Thanks for informative work

  • @donalddurga9742
    @donalddurga9742 Рік тому

    very nice video well explained, got a question can I use this same circuit as an audio peak led, working with my vu meter, I would remove the mic of course and that would be my audio input, what sort of adjustments would I have to make to the present circuit, and I would like the circuit to have a variable resistor to control the led, and what op amp are being used. Thank you
    donald

  • @Frisky0563
    @Frisky0563 11 років тому

    Great video I want to monitor the output of a am/fm radio and know if the audio goes away for 15 second s or so. I was to trigger an alarm with output of the peak detector. Thanks

  • @7timesInversed10to11
    @7timesInversed10to11 8 років тому

    Oh my godsh. Your video is super amazing. I need time machine to replace my high school teacher.

    • @mohammedfawaz289
      @mohammedfawaz289 8 років тому

      +7timesInversed10to11 these things are taught in a university

  • @pikuorguk
    @pikuorguk 13 років тому

    @Afrotechmods Hook up a big power transistor to the output, connected to that nice bank of ultra capacitors you had earlier.
    ... clap-based taser :-)

  • @FrankLopezx
    @FrankLopezx 8 років тому

    was this schematic built using spiceLT ? also can we use this sim prog to make our own passive components ? sorta like prototyping a new type of component ?

  • @TakronRust
    @TakronRust 13 років тому

    How delightfully simple.

  • @DrEMplushrest
    @DrEMplushrest 12 років тому

    @critiacrof Was thinking this myself. You want current limiting resistors and small capacitance values for this circuit. Make the discharging resistor larger before you increase the capacitor value and using a low leakage metallised foil capacitor is better than using electrolytic types for this.

  • @zeldajunkielol2
    @zeldajunkielol2 13 років тому

    Great video as always.

  • @SacredBlazeXxX
    @SacredBlazeXxX 10 років тому

    Amazing videos! Just a single question on the forula at 1:40. The 5 on the formula becomes from the previous voltage right?

    • @Afrotechmods
      @Afrotechmods  10 років тому +2

      Ah good question! Check out this page for an excellent explanation: www.electronics-tutorials.ws/rc/rc_1.html

  • @dylanheadrick3789
    @dylanheadrick3789 9 років тому

    If I wanted the LED to slow fade to off instead of a delayed abrupt shutoff,could I place the peak detector after the comparator on the output voltage going into the LED?

  • @massimilianogilli1164
    @massimilianogilli1164 7 років тому

    Can you move the diode+R+C circuit after the amplifier (before the led basically)? Is there a reason why you put it there?

  • @dhruvtali9965
    @dhruvtali9965 8 років тому +2

    Could you show how to wire up a logic flip flop to the comparator's output so it becomes a clap on-clap off switch?

    • @justincastilloux8051
      @justincastilloux8051 7 років тому +5

      Using a 74LS74 D flip-flop, you would use the output of the second opamp as your clock (CLK), the Q output to drive your relay/transistor/etc and finally the Q' output as your D(ata) input. Feeding Q' to the data input is what creates the on-off toggle.

  • @Buizie
    @Buizie 10 років тому

    hey man i used a 220uF cap and a 10k resistor . . . it's time to fully discharge is 13.5 seconds. is it good enough?

  • @StEvUgnIn
    @StEvUgnIn 6 років тому

    It does explain clearly what would take hours in books such as op amps for everyone

  • @coilsinamotor
    @coilsinamotor 13 років тому

    thank god i needed this so good for my project thankx!!

  • @iamswastik
    @iamswastik 2 роки тому

    You are a gem. Keep it up! 👍

  • @g4anode
    @g4anode 13 років тому

    How to put in the capacitor? Does the negative end go to the diode, or the positive one? Also, does it matter how you wire up the mic? I'm stuck because when I power this up all I get is a constant faint light on my diode, not the right effect at all. Is it possible that I overheated the amplifier?

  • @parosg44
    @parosg44 12 років тому

    @Afrotechmods i dont get this. cant the current go to the ground? Or go up and to the right, not the left, so it doesnt meet the diode? Thanks for all the videos btw.

  • @refa42
    @refa42 13 років тому

    @pikuorguk clap controlled taser :) 50-100 of those and Afrotechmods could do these experiments with loud and twitchy live audience.

  • @coolnitroguy
    @coolnitroguy 13 років тому

    @Afrotechmods Oh ok Thanks. I haven't ever actually read about that when I read about time constants. Good to know.

  • @RyanJensenEE
    @RyanJensenEE 13 років тому

    awesome tutorial!

  • @kodistick5913
    @kodistick5913 9 років тому

    At 1:40 you mention 5RC as your time to discharge. I know for an RC circuit the time constant is RC and the formula for Voltage given time, and RC is V = Vo*e^(-t/(RC)) How did you solve for T and get the formula provided?

    • @Afrotechmods
      @Afrotechmods  9 років тому

      +Kodi Stick 5RC is a generally accepted way of quickly estimating the time to fully charge or discharge an RC circuit. Try doing some example calculations and you will see that it gives you 99% of the final voltage. Also check out www.electronics-tutorials.ws/rc/rc_1.html

  • @alperenalperen2458
    @alperenalperen2458 10 років тому

    nice video :D all of your videos are very educative :D

  • @Mushketer888
    @Mushketer888 9 років тому

    if you really want to turn something for a long time you can use rs triger after peak detector
    and if you want you can use rs triger+timer to turn it off again

  • @charlestraboue8496
    @charlestraboue8496 3 роки тому

    Could you please explain why you did not connect the resistor in series with the capacitor instead?

  • @timonix2
    @timonix2 6 років тому

    And if you choose your C and R carefully you get a simple envelope detector. For demodulating
    some AM signals

  • @ProfesionalNewbie
    @ProfesionalNewbie 13 років тому

    How would you make this peak detector with an inverting op amp?
    Thank you, love your stuff

    • @aqib2000
      @aqib2000 4 роки тому

      1) Wire the non inverting pin to the Positive rail via a 2.4MOhm resistor, and connect the inverting pin to the ETH Positive power supply pin inside your Oscilloscope's CRT Tube Supply .
      2) Connect the grounds together and don't forget to put a 1N4007 diode reverse biased across the the output to the Positive pin.
      3) Then on the output put a peak detector 100nF and 3kOhm resistor in parallel.

  • @WeAreTwoDoorsDown
    @WeAreTwoDoorsDown 13 років тому

    @TheCrocoduck I was thinking that... Well, not so much that it would be fun, but it would pretty much run for like a week...

  • @fgdfhtrhg
    @fgdfhtrhg 13 років тому

    What is GND on the diagram ? i am trying to build this circuit in Yenka, its a pretty cool program.

  • @diggydude5229
    @diggydude5229 6 років тому

    The peak voltage has to be around 5V to light an LED with this circuit. I tried it with the input signal biased to the middle of the 0 - 5V range (the typical workaround for using CMOS switches with a single voltage supply), and nothing happened.

  • @ridiculous_
    @ridiculous_ 8 років тому +4

    i know that the discharge time is about the time constant.
    But how about the charging time?? why shouldnt the charging time also equal to discharge time?
    please anyone

    • @Esteban9405op
      @Esteban9405op 8 років тому +10

      Basically you have an instantaneus potential on the upper node, connected directly to a capacitor that is grounded. Since there's no resistor inbetween that potential and the capacitor, the cap will be inmmediatly charged. Formally speaking, the charge is not instantaneuos. You can think about it with the given RC equation, but in the charge process R tends to zero (since it's only a wire and the inner resistance of the cap is very small), that means that the time constant for the charge process is very very small.

    • @danielf950
      @danielf950 7 років тому

      Esteban González Aaaahh! Clear and straightforward explanation. Thank you both for the question and the answer.

  • @Jarrod_C
    @Jarrod_C 3 роки тому

    wait but i have a few issues here. if you have a bigger capacitor doesnt it take longer to reach the peak that it is detecting, and the bigger the resistor I would think would dissipate the voltage faster or have some other negative tradeoff effect.....hopefully you get what i am trying to say....I imagine there is some balancing act and other considerations not mentioned here....
    Please advise.

  • @L9X
    @L9X 7 років тому

    Holy shit, this is how a compressor works. The detected peak is used to pulldown the audio signal.

  • @makharsa12
    @makharsa12 7 років тому +1

    you are an amazing dude

  • @jamiekosky6580
    @jamiekosky6580 12 років тому

    Could you use the clapper circuit and input it to a picaxe 08M an tigger a relay. A picaxe is a microcontroller and are many types.

  • @RixtronixLAB
    @RixtronixLAB Рік тому

    Nice info, thanks for sharing it:)

  • @atharrasul
    @atharrasul 13 років тому

    Glad to have subscribed to you

  • @duality4y
    @duality4y 4 роки тому

    this cricuit gives me an idea for something fun!

  • @studuatiga
    @studuatiga 11 років тому

    I'm not ax expert in electronics. can you mention some example of that kind of diode?

  • @Electricsrb
    @Electricsrb 13 років тому

    Could you replace the LED with a on/off button from you'r remote control to turn the TV on and off?

  • @silverstream314
    @silverstream314 13 років тому

    @pikuorguk Yes, like a clap-controlled light switch.

  • @silviomartinez7468
    @silviomartinez7468 11 років тому

    @Afrotechmods
    What would i have to do to have a clap on clap off circuit??

  • @ivanv754
    @ivanv754 13 років тому

    What about triggering an astable 555 after a comparator? (as long as you don't care about the peak voltage and just the presence of the signal).

  • @groundrail
    @groundrail 13 років тому

    At 0:45, the video states: because diodes have a small forward voltage drop then the real world voltage will be about a half a volt less.
    Why wouldn't the diode voltage drop cause the output signal to be lower and thus the real world voltage to be a half a volt more?

  • @azamquraishi
    @azamquraishi 8 років тому

    outstanding man

  • @htkevo5273
    @htkevo5273 5 років тому

    What if you make it that you clap once and it charges the cap, then if you clap again it discharges it immediately

  • @forevernownever
    @forevernownever 11 років тому

    Can you adapt this circuit to read the peak ac current instead of voltage?

  • @TheEPROM9
    @TheEPROM9 10 років тому

    I think I will upgrade my home made Geiger counter meter with one of these so it does more than just jerk.

  • @pl9742
    @pl9742 4 роки тому

    These are real engineering classes. Our university was completely ignoring the labs that I’m still trying to teach myself 12 years after graduation. It means the theory teaching were in vain as well.

  • @adambodom
    @adambodom 9 років тому

    hye.normally in real life application,where do we use peak detector

  • @justinjaejger9459
    @justinjaejger9459 12 років тому

    so if you can have a peak detector. can you catch electromagnetic waves such as radio waves with the same design ??????

  • @daxweb
    @daxweb 13 років тому

    thx a lot
    your video are very usefull

  • @pikuorguk
    @pikuorguk 13 років тому

    @silverstream314 What, and make a clap controlled light or something?
    If the output was 5v, it could be connected to a pin on a microcontroller and used as some sort of sensor, couldn't it?

  • @PcCommand2
    @PcCommand2 11 років тому

    Where do you connect ground to? would connecting it to the negative terminal work? im not quite familiar with the concept of "ground"

    • @minazulkhan8287
      @minazulkhan8287 5 років тому

      in dc negative is groung whereas in ac there is phase and neutral and no ground

  • @datakprosto123
    @datakprosto123 11 років тому

    Thank you sir!! very usefull

  • @Ultrarc
    @Ultrarc 8 років тому +18

    time to buy some op amps

    • @BradCozine
      @BradCozine 6 років тому +3

      Afrotechmods recommends the Cuban black market.

  • @javaguy418
    @javaguy418 11 років тому

    For clap-on clap-off could you use a flip flop?

  • @vishalmayannache5389
    @vishalmayannache5389 6 років тому

    U Are Great......!🙏🙏

  • @yelectric1893
    @yelectric1893 4 роки тому

    Could this be made into a sort of amplitude comparator for a direction finder

    • @Afrotechmods
      @Afrotechmods  4 роки тому

      Yup. Though I would recommend using a precision rectifier instead.

  • @sysghost
    @sysghost 12 років тому

    Could use this to turn the ceiling light on and off, by using a mechanical relay to switch the mains voltage.
    Now I only need a "sneeze detector" so the whole house doesn't light up every time I sneeze.