opamp as a comparator

SgtWookie

Joined Jul 17, 2007
22,230
OK, since you've moved the V- of the comparator to -9v, the 3.3k resistor needs to be increased, because total voltage drop will now be 18v. Target current for the comparator to sink is 3mA to 4mA, so let's shoot for the middle:

R=18V/3.5mA = 18/0.0035 = 5142 Ohms. 5.1k (or 5k1) is the closest standard value, so use that instead of 3k3.
 

Wendy

Joined Mar 24, 2008
23,429
Im going to ask the question since I haven't seen anybody else do so.

What kind of rail to rail does this chip have? The term rail to rail refers to any chip, digital or analog, to reach the power supply at saturation. Most op amps can't do this (there are exceptions), and the transistor drivers (besides not having base resistors) must have good rail to rail characteristics.

****************

I just woke up, as I was going through my morning routine I thought of this driver, which might be practical for your application. Choose zeners just over ½ the supply voltage. The problem is I don't think zeners are very fast, so I could be wrong.

 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Bill,
The comparator isn't truly rail-to-rail. When the output is off, the resistor will pull it up to the positive rail. When it's sinking 4mA, it'll get within 400mV of the negative rail.
 

Wendy

Joined Mar 24, 2008
23,429
Then do you think these transistor drivers will work? If zeners are too slow you could always gang however small signal diodes in series to drop the required voltage. Not an elegant solution, but it'll work. It will be rail to rail with this driver unless I'm mistaken.
 

SgtWookie

Joined Jul 17, 2007
22,230
Then do you think these transistor drivers will work? If zeners are too slow you could always gang however small signal diodes in series to drop the required voltage. Not an elegant solution, but it'll work. It will be rail to rail with this driver unless I'm mistaken.
At this point, we're waiting to hear from our OP to see if they are getting an appropriate signal out from the comparator. Not much progress can be made until that happens.

There's another issue to be resolved, which is the "dead time" for switching the MOSFETs. Without "dead time", he'll zap the MOSFETs within a few moments of operation. The easiest way to accomplish this might be to use a 2nd comparator in parallel with the existing comparator, but set the threshold slightly different.

Driving the MOSFET gates at a 100kHz rate is going to be quite a challenge using discrete components. I can't read the part numbers of the MOSFETs he's selected, but I'm not worried about that yet - unless he can get the comparator output working, he's dead in the water.
 

Wendy

Joined Mar 24, 2008
23,429
Made a dumb mistake in polarities, which someone was kind enough to point out. Here is the corrected schematic.

 

mik3

Joined Feb 4, 2008
4,843
I think your LT082 is burned because you don't have a resistor between its output and the BJT's base. Check the maximum power dissipation of the chip.
 

eblc1388

Joined Nov 28, 2008
1,542
I think your LT082(TL082) is burned because you don't have a resistor between its output and the BJT's base. Check the maximum power dissipation of the chip.
This cannot be the case as TL082 "Output short circuit duration = Continuous" as specified in the datasheet.
 

SgtWookie

Joined Jul 17, 2007
22,230
Just a quick blurb about the MOSFETs our OP selected (I finally was able to read the numbers):
IRF9530 - P-ch (Vdss=-100, Rdson=0.3,Id=12, Qg=38nC)
IRF540 - N-ch (Vdss=100, Rdson=0.077,Id=28, Qg=72nC)
They're poorly matched, and have a rather large gate charge requirement (Qg), in particular the IRF540 at 72nC.

Trying to charge/discharge that gate at 100kHz is going to take a LOT of current!
 

SgtWookie

Joined Jul 17, 2007
22,230
Also, the slew rate is decreased due to the low impedance seen by the op amp's output.
The opamp has been replaced by a comparator, which will have a tremendous improvement in the slew rate.

However it will need a voltage follower, as source/sink capabilities are negligible.
 

Thread Starter

baggio2

Joined Dec 25, 2008
60
so if i use a resistor between comparator's output and bjt base will it work?? if it works what must the value of the resistor?
 

SgtWookie

Joined Jul 17, 2007
22,230
So if i use a resistor between comparator's output and bjt base - will it work??
No.

You will need a voltage follower from the output of the comparator.

But at this point, you need to tell us whether or not you are getting the expected output from the comparator with nothing else connected to it except for the pull-up resistor.
 

SgtWookie

Joined Jul 17, 2007
22,230
could u draw comparator with voltage follower?...i dont wanna make it wrong..
Are you getting any output from the comparator?

Is the comparator output what you are expecting?

We can't make any progress at all unless you are getting the proper output from the comparator.
 

Thread Starter

baggio2

Joined Dec 25, 2008
60
no i cant get pwm signal from output of comparator...there are sinus and triangle signal on comparator opamp's legs but no pwm output? i guess it cant compare them.. and the comparator opamp is getting heat...
 

SgtWookie

Joined Jul 17, 2007
22,230
no i cant get pwm signal from output of comparator...there are sinus and triangle signal on comparator opamp's legs but no pwm output? i guess it cant compare them.. and the comparator opamp is getting heat...
You have connected something incorrectly. It should not be getting hot at all.

Show exactly how you have things connected up right at this moment.
 
Top