LM311N can not create negative square wave

Discussion in 'General Electronics Chat' started by picaso, Jan 11, 2011.

  1. picaso

    Thread Starter New Member

    Oct 24, 2009
    5
    0
    Hello all

    I am trying to design a comparator circuit using the LM331N op-amp. I found in the datasheet and here also http://www.swarthmore.edu/NatSci/echeeve1/Class/e72/E72L2/Lab2(OpAmp).html how to design it. The problem is when i feed a sinusoidal signal from a function generator 20Hz and 1Vp amplitude i do not get the negative square wave when there is possitive input signal it gives me almost +100mV. i do get the positive square wave +5V when there is negative input signal. Should not i get also -5V when possitve input signal? What am i doing wrong in this design?
    Thank you in advance.
     
  2. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    For starters, You grounded your output. You grounded the balance pins. You don't seem to understand that the 311 is an open collector chip and it can not output a negative voltage.

    Read some more and start with a schematic. They are easier to read.
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Disconnect pin 1 from ground, and reconnect it to Vss_1/pin 4/-5v.

    Download the datasheet for the LM311 from National Semiconductor:
    http://www.national.com/ds/LM/LM111.pdf
    Look at the schematic diagram for the IC, on page 18. Note that pin 1 (GND) is on the emitter of the open-collector output. Since you currently have pin 1 connected to GND, that's as low as the output can go.
     
    picaso likes this.
  4. Adjuster

    Well-Known Member

    Dec 26, 2010
    2,147
    300
    You appear to have grounded pins 5 (BAL) and 6 (B/STB). These pins should either be left open, or used according to the arrangements shown in the LM311 datasheet Application notes.

    Page 1 of the National Semiconductor datasheet dated January 2001 shows a specific instruction NOT to ground the Strobe pin.
     
    picaso likes this.
  5. picaso

    Thread Starter New Member

    Oct 24, 2009
    5
    0
    hey

    thank you guys now it works fine. electronics is not my stronger subject. as far pins 5 and 6 i ground them because my teacher told me so (ground all pins that are not connected anywhere). sometimes somethings are in front and you cant see them like on page 1 of datasheet!!!!

    Thank you
     
  6. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    Ah yes, the forest for the trees syndrome...and believing everything the teacher says!
     
    picaso likes this.
  7. newbies_hobbyist

    Member

    Jun 4, 2010
    67
    8
    best teacher are those who have experience in their field.
     
  8. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    NEVER DO THAT!

    Only ground unused inputs in digital circuits, such as when you are only using 2 gates in a 4 gate IC, ground the inputs (NOT THE OUTPUTS) of the unused 2 gates. I suspect your teacher remembered a version of that and stated what you heard above, grounding all will often destroy your project before you even try it.

    In analog circuits, Read the datasheet for instructions about unused pins.

    If you actually build the circuit in your original post (with the errors corrected), you will need to add decoupling/bypass caps, about 0.1uF (100nF) between both V+ and ground, and another between V- and ground. The "switching action" of a comparator will "glitch" the power supply, and anything else connected to it if they are left out. (See sticky in Electonics Chat about decoupling caps)
     
Loading...