Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

741 Comparator

Status
Not open for further replies.

ShawnR

Member
I am trying to build a simple temperature controller cct using what I had in stock.
I find the circuit switching with the voltage on pin 2 at or about 1.8 volts when the input is at 0.223 volts. I am thinking it is because of noise but after spending a few hours on it, I am hoping someone can point me in the right direction. I have tried capacitors at various locations to cut back on noise but decided I might be totally off. The null pins are not connected now and I tried a pot between them with wiper to ground but no difference either.
 

Attachments

  • Temperature controller.bmp
    385.1 KB · Views: 203
The 741 was designed to operate on +15 and -15 V supplies and process signals between +10 V and -10 V. It can be run in single supply designs but it has limitations. The input common mode range does not extend down to 0 V or up to +5V. In fact, it is so narrow that you will have only about 1 V of operating room. Also, its output does not swing within 1 or 2 volts of the rails, so again the operating range is extremely limited. All of this is in the datasheet, which you must read.

Separate from that, even if you had a modern rail-to-rail opamp it would not drive the relay well, if at all. The FET is configured as a source follower, and the source will never be more than 2 or 3 volts above ground. If the relay has a 5V coil, it probably will not pull in.

And finally, the circuit is not complete. I assume the temperature sensor connects to J1, but you do not indicate that, or what the 3 pins do. Without this, a complete circuit analysis can not be done.

ak
 
Thanks ak. That makes sense. I made some changes, using 12 Vcc instead of 5. The sensor is an LM35. The relay is switching great, just at the wrong input value. I do have the small voltage at the source which lights the led but not enough to pull the relay in so I will make some changes there. Since all I have in stock now is 741's, maybe a 10x amplifier on the sensor output would be a resolve? I want to stick with a single supply.

Or I will see what else I have kicking around in stock. Every time I do something, I learn something so it is all good. Any other suggestions?

Thanks
 
Last edited:
Kiss the 741 opamps goodbye and bury them because the design is 47 years old and much better opamps and comparators have been available for many recent years.
 

Kiss the 741 opamps goodbye .
This thread is almost 12 hours old. What took you so long?

Fair enough but I am not overly active in this field, took my schooling 30+ years ago and sometimes just kick the odd idea around so play on the bench when something comes up, using stock I have. Next time I order from Digikey I will update my stock to something newer. The theory should not have changed that much and is still interesting to learn (or more accurately, refresh).

Here is an updated schematic.

Thanks for the input.
 

Attachments

  • Temperature controller.bmp
    385.1 KB · Views: 194
Your Mosfet is still a source follower with its source voltage going only as high as the gate voltage minus the gate-source turn-on voltage of about 5V. The Mosfet should be wired as a switch with a voltage loss of only maybe 0.05V, the relay coil should be connected between the positive supply and the drain pin of the Mosfet with its source pin grounded. Then a 12V relay coil will work and any N-channel Mosfet can be used.
 
The circuit still will not compare the sensor output correctly because 0.25 V (the output voltage at +25C) is way outside the common mode range of a 741 input stage when running with a single supply. To confirm this, add a 9V battery to the circuit.

The battery + terminal goes to GND and the - terminal goes to the 741 pin 4. Leave everything else unchanged. Everything that was connected to ground, including one pin of the sensor, still is; the only thing running on the -9V is the 741. You still will have a problem with the MOSFET driving the relay, but the output LED should now indicate correctly.

ak
 
What would be a general purpose op amp that one of you would recommend? I filtered through Digi key and came up with a TLV271 or 2371. My needs are, obviously, simple. I seldom or never work with a dual supply, do not need fast switching. Most of what I would do would be a sensor to such a circuit as I have here or to a microcontroller to display a value. No extreme speed needs or temperature, etc.

Any suggestions? Digikey allows many parameters to be filtered but just those above, that I can think of, would be worth considering for me. Supply range would be 5 to 15 volts, mostly 5 or 12.

Thanks in advance.
 
I'm an old bipolar kinda guy, so I would go with the LM358 opamp or LM393 comparator. Both were designed for single supply operation, with input ranges that extend *below* the negative rail, a very cool trick at the time. Plus, I have a buttload of them in my basement. Both input common mode ranges and the 358's output range do not get close enough to the positive rail to qualify as rail-to-rail, but that does not matter in your application. The 393 comparator output is open collector, so while the chip runs on 5 V or 12 V the output can drive something connected to 24 V. Pretty flexible for something 45 years old.

ak
 
I found better op amps in my collection but I have ordered lm358's from digi key anyways. Thanks for the guidance. I will report back when I do the upgrades.

Thanks
Cheers
 
Last edited:
I had my new LM358's before I had a chance to work on the circuit (Gotta love Digikey in Canada) I assembled it as previously shown and still had trouble in that the switching point was approx 100 mv above my set point. I suspect due to offset voltage? I do not have a full handle on all of the specs but it made sense that basically, the signal voltage was in too small of a range so I decided to use the other op amp in the chip to amplify it 10X putting the signal into a more reasonable range.

This seems to have worked. I am now switching around 2.8 volts instead of 0.28 volts.
It was a good refresher on op amps. Will need to find some more projects for them now.

A question...I think I should have capacitors in the circuit for noise suppression but is there a common value? How do I choose (remembering the simplicity of my circuits as I am sure there is a long detailed explanation of mathematically determing it for an engineer) I was thinking 0.1 uf near the sensor and input side of the op amp. The 7812 datasheets show some around the regulator so that part is easy. Or do I need them at all? Is there a rule of thumb?

Thanks for the support.
Attached is the latest version that I built and seems to be working.
 

Attachments

  • Temperature controller.bmp
    385.1 KB · Views: 168
Last edited:
The (lousy old) LM358 is noisy. The noise causes the output of the comparator to violently go up and down when the input voltage is near the switching threshold voltage. The effect of the noise can be reduced two ways:
1) Add hysteresis (positive feedback) to the comparator so when its input voltage is near the threshold then its output suddenly switches. Add a resistor (try 1M) between pin 1 and pin 3.
2) Add a filter capacitor parallel to R6. Try a 1uF film capacitor.
 
Don't mind grumpy. He doesn't like the 358 because even though it is a very old part, he's older.

A 100K resistor from pin 1 to pin 3 will add positive feedback called hysteresis. It will prevent a noise burst out of U1a when its input is wandering slowly across the trip point, but it also will shift the trip point. U1b is at a gain of only 10, so the 0.1uF on its input should be enough. You can turn U1b into a low pass filter to reduce its own noise contribution by adding another capacitor across R6. A 0.1 uF cap works out to a 16 Hz corner frequency, pretty low. The amp gain still will be 10 at DC and the low rate of change coming out of the sensor, but reduce to 1 at higher frequencies where you don't care.

ak
 
Hysteresis causes a comparator to have "snap action" switching. It does not need to be much because the noise level is fairly low and a small amount of noise near the threshold voltage will cause the comparator to quickly switch as fast as it can.
 
I came back to this thread to use the info for another project I have been working on. I realized I did not close it. Thanks for the support audioguru and AnalogKid.
 
Status
Not open for further replies.

Latest threads

Back
Top