Maker Pro
Maker Pro

LM311 as hysteresis comparator

mich

Feb 8, 2011
6
Joined
Feb 8, 2011
Messages
6
Need some advices from anyone of you.
I've been testing on LM311 for a hysteresis comparator.
However, it does not give me a negative output part.

My supervisor told me to use pin 1 (GND) for negative output and it does work when I'm testing on the response time for various input overdrives.
However, when I did it in the hysteresis comparator circuit, there were not negative part at the output given in oscilloscope.

In my project, I need a positive and negative output of hysteresis so to drive my buck converter.
Can anyone help me on it?

Millions of thanks.:)
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Do you have a negative supply rail?

Shouldn't pin 1 be grounded?
 

mich

Feb 8, 2011
6
Joined
Feb 8, 2011
Messages
6
Do you have a negative supply rail?

Shouldn't pin 1 be grounded?

Hi Steve,

Yes, I have negative supply rail.
But the chip still does not give me any negative part in the output.
Yes, pin 1 is the GND.
But when I tried the circuit of response time for various input overdrives as given in the datasheet (attachment), it indeed gave a negative output.

So, I tried to using pin 1 as my output when I was testing on the hysteresis comparator circuit, there was no negative part in the output.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Can you show us the schematic of the circuit you're designing?

And when you're trying to measure the output for a negative voltage, with respect to what are you measuring? (I would be measuring with respect to pin 1, and have it connected to 0V as seems appropriate)

edit: I understand pin 1 more now. it appears that either it is tied to the -ve supply rail, or the output is tied to the +ve rail.Pins 7 and 1 are essentially the collector and emitter of the output transistor respectively.
 
Last edited:

mich

Feb 8, 2011
6
Joined
Feb 8, 2011
Messages
6
Here's the hysteresis comparator that I designed.
But it seems that it is not working well.
Please advise on it.

Thank you.
 

Attachments

  • LM311.pdf
    4.1 KB · Views: 743

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
1) I can't see any positive feedback, so no hysteresis.

2) Does Vin on pin 3 ever get below gnd? (if not the output will never go negative)

3) Your wiring of pin1 is shown incorrectly, but I think I know what you mean.
 

mich

Feb 8, 2011
6
Joined
Feb 8, 2011
Messages
6
I managed to get the result that I wanted yesterday.

I used Pin 1 as the output pin, connected in the same way as a hysteresis comparator.
Pin 1 will reverse the polarity of the input pins, meaning if my feedback resistor is connected to pin 3 (-), my output will be a non-inverting output with positive and negative values.

I will upload the circuit later.

Now, my problem is about making it a symmetrical output with ±0.3V.
And about the speed-up capacitor, is it necessary to put it?
Because I read in some website saying that this capacitor is only needed when it is a single supply.
Please advice.

Thank you.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Do you need this device to source or sink current?

And you only want an output that swings +/-0.3 of a volt? What are you driving?

Perhaps showing us the circuit you've come up with and what you're trying to drive would allow us to help.
 

davenn

Moderator
Sep 5, 2009
14,262
Joined
Sep 5, 2009
Messages
14,262
Hi Steve,

Yes, I have negative supply rail.
But the chip still does not give me any negative part in the output.
Yes, pin 1 is the GND.
But when I tried the circuit of response time for various input overdrives as given in the datasheet (attachment), it indeed gave a negative output.

So, I tried to using pin 1 as my output when I was testing on the hysteresis comparator circuit, there was no negative part in the output.

Pin 1 cant be the output if its grounded ??? and explain to me why you would be trying to use pin 1 for output rather than pin 7 which is normally the output pin ?

Dave

Page 8 of the National Semi datasheet for the LM311 shows the comparator being used with hysteresis
is this what you are trying to achieve ?
 
Last edited:

mich

Feb 8, 2011
6
Joined
Feb 8, 2011
Messages
6
Do you need this device to source or sink current?

And you only want an output that swings +/-0.3 of a volt? What are you driving?

Perhaps showing us the circuit you've come up with and what you're trying to drive would allow us to help.

I'm not very sure of what u mean by source or sink current.
I'm still very green on all these electronic stuffs.
Sorry for my ignorance.
Hope u can explain a bit about it.

I'm driving a buck converter by using a sliding-mode controller.
So now, I'm doing the hysteresis comparator of the sliding mode controller.
In this sliding mode controller, I need a symmetrical hysteresis of +/- 0.3V so that the trajectory will always go to zero.
 

Attachments

  • SMC.pdf
    20.7 KB · Views: 562

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
9 op-amps!

What is so special about your SMPS that requires that?

In fact, why are you designing your own SMPS (especially since you don't understand sinking/sourcing current)?

Perhaps you can start with the required specs for your power supply (input voltage, output voltage, output current, and any other specs you may have)
 

mich

Feb 8, 2011
6
Joined
Feb 8, 2011
Messages
6
9 op-amps!

What is so special about your SMPS that requires that?

In fact, why are you designing your own SMPS (especially since you don't understand sinking/sourcing current)?

Perhaps you can start with the required specs for your power supply (input voltage, output voltage, output current, and any other specs you may have)

I'm doing this as my FYP.
This topic is given by my lecturer.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Is there any reason for the 9 op-amps. My eyes glassed over when I saw the circuit diagram.

There's got to be a reason for all of them.

Please explain your circuit in detail so that I have some vague idea of what is supposed to be happening and where the comparator with the odd output is required.

You tell me it's your final year project *and* you're new to electronics (not understanding sinking/sourcing currents).

Something smells funny.

Or did you mean *first* year project? (Still smells odd)
 
Top