Tl082 as comparator problem

Thread Starter

Roessleralec

Joined Jul 16, 2019
15
Hi, so recently I started a project where I needed a fan to turn on at 90 degrees so I got myself a little lm34 and drew up a circuit. At 90 degrees the lm34 will put out .9v so I needed a comparator to set .9v as reference and if the input from the lm34 is greater then pull high. To do this I built a test circuit with a tl082 op amp, 2n2222a transistor, led, and some other parts. Well, the output is pulled high under .8v and over 1v but around .9v it is pulled low. Any ideas what’s going on? Thanks in advance


Schematic

21EFF144-EB3A-47E2-8677-6A7A76741AC9.jpeg
 
Last edited by a moderator:

AlbertHall

Joined Jun 4, 2014
8,387
You have exceeded the input common mode range. The TL082 will not work correctly when its inputs are so close to the negative supply voltage. Try an LM358 instead.
 

dl324

Joined Mar 30, 2015
8,974
Welcome to AAC!

Is there a reason why you're using an opamp instead of a comparator, that you're driving the load high side with an NPN transistor, and have such a stiff voltage divider on the opamp input?

The input voltage range is only guaranteed to be between VEE+4V to VCC-4V; making it unsuitable for operation from a 5V supply.
upload_2019-7-27_13-44-13.png
upload_2019-7-27_13-44-38.png
Output voltage range is also problematic.

If you plan to use the 2N2222 to drive the fan, what is it's current rating?
 

BobTPH

Joined Jun 5, 2013
2,029
Not to mention that the circuit is wrong. the - input is floating. It should be connected to the voltage divider. Also the resistors are much smaller than needed, wasting power.

Bob
 

Thread Starter

Roessleralec

Joined Jul 16, 2019
15
Ok thank y’all. That all makes sense now and I feel a little bit dumb. And yes I am going to use a proper comparator, prolly rail to rail but it hasn’t came in yet. I was just testing the circuit to get it figured out now. Thank y’all for taking time out of yalls day for this. Other forums rarely get responses
 

Thread Starter

Roessleralec

Joined Jul 16, 2019
15
Not to mention that the circuit is wrong. the - input is floating. It should be connected to the voltage divider. Also the resistors are much smaller than needed, wasting power.

Bob
Yes on my schematic I forgot to connect the - input. It was connected in my circuit though. Thanks
 

Thread Starter

Roessleralec

Joined Jul 16, 2019
15
O
Welcome to AAC!

Is there a reason why you're using an opamp instead of a comparator, that you're driving the load high side with an NPN transistor, and have such a stiff voltage divider on the opamp input?

The input voltage range is only guaranteed to be between VEE+4V to VCC-4V; making it unsuitable for operation from a 5V supply.
View attachment 182591
View attachment 182592
Output voltage range is also problematic.

If you plan to use the 2N2222 to drive the fan, what is it's current rating?
ok I understand why it didn’t work now. Thanks. Also what do you mean about the high side with the transistor? I understood that on a npn, the load is high side and pnp, the load is on the low side.
 

dl324

Joined Mar 30, 2015
8,974
I am going to use a proper comparator, prolly rail to rail but it hasn’t came in yet.
Why do you think you need a rail to rail comparator? Designers used non rail to rail comparators for decades by using voltage dividers on one that has the negative supply in the common mode input range (e.g. LM393). Comparator outputs were already essentially rail to rail, but some of the new designs have totem pole outputs instead of open collector/drain.
 

Thread Starter

Roessleralec

Joined Jul 16, 2019
15
Why do you think you need a rail to rail comparator? Designers used non rail to rail comparators for decades by using voltage dividers on one that has the negative supply in the common mode input range (e.g. LM393). Comparator outputs were already essentially rail to rail, but some of the new designs have totem pole outputs instead of open collector/drain.
I thought it would be better to have a 0v and 5v instead of ~1v and ~5v so that I don’t have any problems. But I guess I don’t need it if I’m just powering a transistor...
 

dl324

Joined Mar 30, 2015
8,974
Ok I understand now thanks. Just curious why is it more common driving it low side instead of high side? They should do the same thing
When you drive the LED the way you were, the voltage on the base of the transistor needs to be Vbe+IbRb higher than the voltage at the load. A blue LED can have a forward voltage close to 5V (e.g. TLHB4200 is 3.9-4.5V); so driving the transistor from a 5V signal can be a problem.

If you use it to drive low side, the voltage on the base only needs to be Vbe+IbRb.
 

Thread Starter

Roessleralec

Joined Jul 16, 2019
15
When you drive the LED the way you were, the voltage on the base of the transistor needs to be Vbe+IbRb higher than the voltage at the load. A blue LED can have a forward voltage close to 5V (e.g. TLHB4200 is 3.9-4.5V); so driving the transistor from a 5V signal can be a problem.

If you use it to drive low side, the voltage on the base only needs to be Vbe+IbRb.
Ok thanks
 
Top