12-30-2012 04:04 AM
Hi All,
I am trying to use LM311N voltage comparator to get square signal from ac sine to drive
logic (zero crossing detector). I have successfully simulated the circuit (attached) however in
reality when I test the circuit - signal applied to non inverting input above -0.5V generate small
voltage of +0.11 V on output whereas signal <= -0.5 generate +5V on output.
I have also built small circuit using LM339N and this seems to work fine. I don't need however
4 comparators in single using and 311 seem to give more options to tweak it.
From the datasheet I can see some example for zero crossing detector circuit for CMOS logic.
This circuit however uses split power supply of +5V and -10V.
Some thoughts:
Is it because signal should not be < the negative power supply (as datasheet states) ? If so - how
is it possible to run on it single power supply to do what I intent to do ? Also - why 339 works then ?
Many thanks for all suggestions.
Thanks,
Adrian
12-31-2012 02:06 PM
Adrian,
For both the LM311 and the LM339 the input should not be allowed to go below the negative power supply rail. For the LM339 the common mode input range includes the rail while for the LM311 it is about 0.5 V above the negative rail. Neither includes the positive rail, although that is not a factor in your circuit.
The typical way to handle a sinusoidal input on a single supply system is to capacitively couple it to a comparator input which is biased at about the midpoint of the power supply.
Many simulations do not work well for out of range signals. And they may not reflect the actual behavior of the circuit under those conditions.
I recommend that you start from a good circuit design. Then both your simulation and the circuits you build should work well.
Lynn
01-02-2013 03:14 AM
Hi Lynn,
Thanks so much for your reply.
Yes - I am beginning my adventure in electronics and thought I am doing something wrong.
I had a feeling I need to couple it to DC and raise the midpoint half way up (even by looking at
the datasheet it looked like this). I got puzzled when I saw some amateur examples working
with the setup I have for 339. I this I was lucky with 339 that the signal input was 0.5Vpp. And
that would explained all the problems. Anyway - I will modify my circuit today and will let you know
how it goes with the modification.
One more time - thanks a lot and Happy New Year !
Adrian