Difference between OpAmp and comperator not clear to me

Discussion in 'General Electronics Chat' started by takao21203, Feb 3, 2013.

  1. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    Can you explain a little?

    I want to build this circuit: http://www.doc-diy.net/electronics/l_meter/

    But I do not have any comperators. Except PICs with builtin comperators.

    I have here for instance LM358 OpAmp. Can I use these instead?
    Or what is important to change inside the circuit?
     
    absf likes this.
  2. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    A comparator switches its output very quickly.
    The lousy old LM358 opamp switches its output very slowly.
     
  3. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
  4. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    Yes. The circuit is designed for audible output.

    The schematic symbol is pretty much the same.

    I primarily want to make the circuit working. OpAmps and Comperators are normally not my business, even if I have read a few websites about them.

    I am looking for a comparison between key features of OpAmps and comperators, if possible why the one or the other can not be used instead, or if it could be used instead.
     
  5. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    So what I understand is the response time is different. If I have a 1 MHz OpAmp, it is somewhat equal to 1 microsecond, while comperators only need 50 nanoseconds.

    It should be neglible for the circuit in question.
     
  6. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The comparator circuit you showed drives a high impedance piezo tweeter.
    A half-decent modern opamp can also do it at audio frequencies.

    A comparator output is "open collector". The collector of the NPN output transistor can pull the output low. There is nothing to pull the output high so a resistor connects from the output to the positive supply to pull the output high when the NPN output transistor turns off.

    An opamp has a complementary push-pull output that can pull up or pull down.

    An opamp has a frequency compensation capacitor that cuts high frequencies and slows the output so it does not oscillate (caused by high frequency phase shift) when negative feedback is used in an amplifier.
    A comparator does not have a frequency compensation capacitor so it oscillates when negative feedback is used so it cannot be a linear amplifier.
     
  7. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    Thank you. So, is it possible for the circuit to oscillate like shown?

    Or should I use a PIC comperator? Which leads to another circuit which actually does that.

    Unfortunately the code is assembler only. It would take me many hours just to work out the C code.

    Should I buy a ready-made meter perhaps?

    I am thinking about that. Due to generous discounts I have given to eBay buyers, I am lacking just 70 cents to buy this one:

    http://www.ebay.com/itm/L-C-High-Pr...Meter-Calibration-via-Key-Panel-/170949908074

    If I don't want to tap card funds...
     
  8. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Your country is civilized. Don't you have plenty of money like almost everybody else?
    Buy the proper parts.
     
  9. bountyhunter

    Well-Known Member

    Sep 7, 2009
    2,498
    507
    An op-amp is internally compensated a comparator is intentionally left uncompensated so it slews faster.
     
  10. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    I told you before I only look at schematics, but I almost never build them as shown. Building kits or circuits from schematics is a nice hobby but none of mine.

    Yes I could order some chips and have them here in 3 days, even if I usually get these petty components from eBay. Which takes 3 weeks then.

    I already have many types of OpAmps here, and never used them at all.

    So I made the post, because I was not too sure what to do.

    When I can buy the ready made meter, of course I could buy some comperator chips.

    But why should I when it works fine with a PIC, or an OpAmp? So I wanted to investigate a little more about that.
     
  11. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    OK. Maybe I will just try to build the circuit and see, and buy the meter anyway.

    I was thinking OpAmp and comperator are similar but my detail knowledge is not that much upto standards.

    Bought some 3 volts relays as well some months ago from Thailand, together with another order.
     
  12. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    Wired up an old 16f74 for the inductivity meter with a 3-digit display.

    I was browsing through some PIC datasheets and the PIC 10F200 does have a comperator. It would have to be turned on with a small program I assume.

    Can I use it as a regular comperator after that for the inductivity meter, or are there any limits on that?

    This would make sense to put the 10F200 to some use. Have a few chips here but never really used them.

    The 16f74 does not have a comperator and I want to put it to a use, having it around here since 2006.
     
  13. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    Apparently I have both 10F200 and 10f206 here. I will simply try. Response time seems to be some 200nSec.
     
  14. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    Try the 206, the 200 doesn't have a comparator.
     
  15. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    Yes I noticed from the datasheet.
     
  16. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
    So this is what I have built so far. http://www.youtube.com/watch?v=RTBFzrdSV2M
    The PIC is on the bottom side, a 40pin PDIP.
    The small chip on the top left is the 10f206, used as comperator.

    I need to look up again these inductor measuring circuits again and see what I can make working from these.

    Unfortunately the firmwares I saw are all either HEX only, or assembler. I have to rewrite everything. Displaying code works so far.

    Using a BC327 for the relay, only 90 mV dropout.

    I am not sure if this needs a seperate thread but the comperator questions are all connected to this particular circuit.

    Seems to be I found a comperator now.
     
  17. takao21203

    Thread Starter Distinguished Member

    Apr 28, 2012
    3,577
    463
Loading...