+ Post New Thread
Results 1 to 18 of 18
  1. #1
    Newbie level 6
    Points: 315, Level: 3

    Join Date
    Jun 2017
    Posts
    11
    Helped
    0 / 0
    Points
    315
    Level
    3

    Voltage Comparator Design

    Hi all,

    Has anybody worked with LM741 and used it for voltage comparison? I am trying to using LM741 to compare two voltages, and essentially then use this as a thermostat. The issue is that once V+ > V-. the output voltage is 1.3 -1.6 v, but not 0 volts. Do I need to add offset? I am only using the 5 pins atm.


    Any help on this, or a precise design for comparing the voltages will be highly appreciated.


    Thanks.

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 66,847, Level: 63
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    13,644
    Helped
    3122 / 3122
    Points
    66,847
    Level
    63

    Re: Voltage Comparator Design

    Hi,

    My recommendation: If you want a comparator, then use a comparator.
    There's a good reason why they designed comparators as well as amplifiers.

    There are already threads discussing this in detail.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  3. #3
    Advanced Member level 5
    Points: 49,425, Level: 54
    Achievements:
    7 years registered
    Audioguru's Avatar
    Join Date
    Jan 2008
    Location
    Toronto area of Canada
    Posts
    8,606
    Helped
    2005 / 2005
    Points
    49,425
    Level
    54

    Re: Voltage Comparator Design

    The 741 opamp is 50 or 51 years old. There are many much better opamps today.

    The 741 opamp was designed to use only a +15V/-15V supply or 30V, some do not work if the total supply is less than 10V.
    Its inputs and output do not work within a few volts from the positive or negative supply.
    It is too noisy (hiss) for audio and its high frequency response is poor. Its distortion might be too high.



  4. #4
    Newbie level 6
    Points: 315, Level: 3

    Join Date
    Jun 2017
    Posts
    11
    Helped
    0 / 0
    Points
    315
    Level
    3

    Re: Voltage Comparator Design

    Quote Originally Posted by KlausST View Post
    Hi,

    My recommendation: If you want a comparator, then use a comparator.
    There's a good reason why they designed comparators as well as amplifiers.

    There are already threads discussing this in detail.

    Klaus
    Which ICs you reckon will be appropriate? How about TLV7041, you reckon it can perform better?

    Thanks



  5. #5
    Super Moderator
    Points: 66,847, Level: 63
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    13,644
    Helped
    3122 / 3122
    Points
    66,847
    Level
    63

    Re: Voltage Comparator Design

    Hi,

    Yes, it is a comparator and will do it's job as a comparator.

    Are you aware that you don't give any requirement / specification?
    Thus it is impossible to say if it fits your needs.

    Which ICs you reckon will be appropriate?
    Every manufacturer and every distributor should have selection tables as well as interactive selection tools. They are free to use.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisment

        
       

  6. #6
    Newbie level 6
    Points: 315, Level: 3

    Join Date
    Jun 2017
    Posts
    11
    Helped
    0 / 0
    Points
    315
    Level
    3

    Re: Voltage Comparator Design

    Quote Originally Posted by KlausST View Post
    Hi,

    Yes, it is a comparator and will do it's job as a comparator.

    Are you aware that you don't give any requirement / specification?
    Thus it is impossible to say if it fits your needs.

    Klaus
    Hi,

    Yes, my apologies for not being very clear. I am essentially looking to design a thermostat, which can only perform on/off operation based on the basis of temperature recorded by the sensor, which most likely will be a RTD. The temperature range which has to be measured is between -10 to about 100 C. ( the sensor will be mounted on roof, which is about 10m high from the ground). Ideally looking for a comparator which has a very stable output..

    Thanks.



  7. #7
    Super Moderator
    Points: 66,847, Level: 63
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    13,644
    Helped
    3122 / 3122
    Points
    66,847
    Level
    63

    Re: Voltage Comparator Design

    Hi,

    A comparator compares two voltages.

    It doesn't care about:
    * thermostat
    * sensor
    * RTD
    * room temperature range
    * roof mount
    * height from ground

    Thus your post is useless.
    --> show your circuit, give electrical specifications for the comparator

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisment

        
       

  8. #8
    Newbie level 6
    Points: 315, Level: 3

    Join Date
    Jun 2017
    Posts
    11
    Helped
    0 / 0
    Points
    315
    Level
    3

    Re: Voltage Comparator Design

    Quote Originally Posted by KlausST View Post
    Hi,

    A comparator compares two voltages.

    It doesn't care about:
    * thermostat
    * sensor
    * RTD
    * room temperature range
    * roof mount
    * height from ground

    Thus your post is useless.
    --> show your circuit, give electrical specifications for the comparator

    Klaus
    I am simply looking for a comparator that does not play around like LM741. I have ordered LT7041 from TI, but it will take some time to be shipped from US, as I am in Australia. Have you any experience with some of the older/easily available ICs which can work fine as a voltage comparator? Ideally with 24vdc Power Supply, but can manage to provide 12v as well as the supply. There are no more limitations I can think of.

    Thanks



  9. #9
    Super Moderator
    Points: 66,847, Level: 63
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    13,644
    Helped
    3122 / 3122
    Points
    66,847
    Level
    63

    Re: Voltage Comparator Design

    Hi,

    does not play around like LM741
    --> ???
    I have ordered LT7041
    --> ther is no LT7041.
    Maybe you mean the previously mentioned "TLV7041"?
    But as you now (eventually) mention a specification:
    Ideally with 24vdc Power Supply, but can manage to provide 12v as well as the supply.
    You surely have read the datasheet ... (if not, do you expect us to read it for you?)
    It clearly mentions on the first page "Features":
    Wide Supply Voltage Range of 1.6 V to 6.5 V
    Have you any experience with some of the older...
    --> yes
    ... available...
    --> I live at almost the opposite side of the earth...how can I know what is available in your area?
    But you write as if a comparator is something special. It is almost as often used as an Opamp. It surely is no exotic electronic part, there are many many different types (thousands), and more than 50% of them are able to be supplied with >12V.
    In post#5 i recommended to use freely available selection guides. Are you too lazy to use it and look for the single specification you - until now - gave "power supply range"?
    There are no more limitations I can think of.
    You were not satisfied about LM741 output voltage --> Thus this is a parameter to look for. But you didn't show a schematic, no output_current specification, no output_voltage_low specification.....how can we know what you need?

    I recommend to show a little effort of your own.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  10. #10
    Advanced Member level 4
    Points: 8,248, Level: 21
    d123's Avatar
    Join Date
    Jun 2015
    Posts
    1,469
    Helped
    338 / 338
    Points
    8,248
    Level
    21

    Re: Voltage Comparator Design

    Hi,

    "...older/easily available ICs which can work fine as a voltage comparator" - LM339

    I'm getting a strange sense of déjā vu about comparator use and people not bothering to read anything about anything so am preempting the next possibly predictable thread you might be tempted to create: Please read about comparators, they need a pullup resistor otherwise they won't work.

    I agree with Klaus, minimal effort required on your part.



  11. #11
    Super Moderator
    Points: 249,046, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    43,337
    Helped
    13177 / 13177
    Points
    249,046
    Level
    100

    Re: Voltage Comparator Design

    A usual feature of comparator ICs is that their output directly fits a logic interface standard. Because there are many different logic types, comparator output voltage ranges are different as well. By adding a suitable level converter, you can use any OP to drive your logic, also 741. In other words, using a specific comparator IC is more a matter of convenience than requirement.

    There are other parameters like input voltage range, speed, supply voltage, but you didn't tell complete specifications.



  12. #12
    Advanced Member level 5
    Points: 49,425, Level: 54
    Achievements:
    7 years registered
    Audioguru's Avatar
    Join Date
    Jan 2008
    Location
    Toronto area of Canada
    Posts
    8,606
    Helped
    2005 / 2005
    Points
    49,425
    Level
    54

    Re: Voltage Comparator Design

    Go to www.farnell.com and click on the flag of your country. They have warehouses all over the world and are also called Element14. They probably have many comparators close to you.


    1 members found this post helpful.

  13. #13
    Newbie level 6
    Points: 315, Level: 3

    Join Date
    Jun 2017
    Posts
    11
    Helped
    0 / 0
    Points
    315
    Level
    3

    Re: Voltage Comparator Design

    I am unable to add any images, but I can explain the issue I am facing with using LM741. The output when non-inverting input is less than the inverting input should be ideally 0v (as this is what I am providing to pin 4), but practically it is 1.6 v. I have tried pull up resistors of different values, but in vain. Could this possibly a problem of my design? Or this is normal? If I get a Comparator IC instead of Op-Amp, will that help? Thanks.



  14. #14
    Super Moderator
    Points: 66,847, Level: 63
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    13,644
    Helped
    3122 / 3122
    Points
    66,847
    Level
    63

    Re: Voltage Comparator Design

    Hi,

    Did you look into the datasheets for the "output voltage" specifications?
    What do they say?

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.


    1 members found this post helpful.

  15. #15
    Newbie level 6
    Points: 315, Level: 3

    Join Date
    Jun 2017
    Posts
    11
    Helped
    0 / 0
    Points
    315
    Level
    3

    Re: Voltage Comparator Design

    The output voltage swing can be upto 16v with Supply voltage of 20v.. I am afraid I understand what this means?
    Does this mean that there can be a difference of 4v between the ideal and actual output?

    Thanks



    •   AltAdvertisment

        
       

  16. #16
    Super Moderator
    Points: 49,640, Level: 54

    Join Date
    Apr 2011
    Location
    Minneapolis, Minnesota, USA
    Posts
    12,275
    Helped
    2422 / 2422
    Points
    49,640
    Level
    54

    Re: Voltage Comparator Design

    741 output does not get within 2V or so of the bottom supply rail. So it became common to hear that op amps need a bipolar supply (meaning positive and negative). That is how you can achieve output down to 0V.

    There are newer types of op amps which go down to 0V even when the power supply is positive only.



  17. #17
    Super Moderator
    Points: 66,847, Level: 63
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    13,644
    Helped
    3122 / 3122
    Points
    66,847
    Level
    63

    Re: Voltage Comparator Design

    Hi,

    * An Opamp output - during normal operation - never touches the supply rails. It is designed to control/regulate the output voltage well within the supply rails.
    * in opposite to this - a comparator output is designed to switch to the supply rail(s). It does not control/regulate the output voltage to stay somewhere in the middle of the supply rails.

    Thus a comparator output specification tells you how close - in millivolts - it can switch to the supply rail(s).
    In opposite to this with an Opamp you can see the specification how large a signal (maybe think about a sinewave) at the output can be.....not touching the supply rails.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  18. #18
    Advanced Member level 4
    Points: 8,248, Level: 21
    d123's Avatar
    Join Date
    Jun 2015
    Posts
    1,469
    Helped
    338 / 338
    Points
    8,248
    Level
    21

    Re: Voltage Comparator Design

    Hi,

    Also, it's related to the internal design of the op amp. Think of bipolar transistors in series and go adding up ~0.7V dropped across each BJT, if from V+ there are 3 BJTs (not to mention resistors perhaps, I think that the 741 has current sensing resistors inline with the output stage used for IC protection), that's 2.1V you'll never see at the output because it's being used to do something to make the op amp function. It's that and/or Vce voltage drops. The same applies to the negative rail swing/magnitude but the other way round, you have to sum an unwanted voltage rather than subtract a wanted voltage if you get me.

    As well, true comparator outputs have a pull-up resistor to V+, the load has a resistance value too, and the comparator internally has a finite resistance to ground, so there's always a voltage divider there, whether the comparator is high or low, besides the current used which is lost as a voltage across the resistor. Good to have as small a pull-up as possible and as large a load as possible to get as close the the V+ rail as can be hoped for based on design/circuit limitations.

    Hope I haven't said anything too dreadfully incorrect there, experts...

    - - - Updated - - -

    I am not an expert on this kind of analysis, so presumably wrong about some things, some-one more learned will correct my nonsense but the general idea will help to understand why the more paleolithic than merely monolithic 741 can't reach V+ or V- (Vcc and Vee). "rail-to-rail" op amps have a very low voltage drop of a few mV which is the VDS (RDSon) or Vce, due to unavoidable internal resistance of the MOSFETs or BJTs used.

    Click image for larger version. 

Name:	741 schematic for output stage.JPG 
Views:	2 
Size:	98.3 KB 
ID:	149974

    This is a typical comparator output:

    Click image for larger version. 

Name:	a comparator schematic.JPG 
Views:	1 
Size:	74.4 KB 
ID:	149973

    Pathetic analogy: They're both gggreat species (and apex predators in their respective niche environments), but even so, tigers aren't lions and vice versa...

    Sorry for any confusing mistakes but hope the general idea helps to understand the devices you may or may not use...



--[[ ]]--