I need help in designing a schmitt trigger schematic using the LM311 opamp. I want to convert 110V-AC pure sine wave into a square wave so I can then feed this to a MCU and measure the period of the 110V-AC. What I have in mind so far is to step down the 110 to about 12V-AC but I am not sure of how to connect the LM311. Also, I am using a voltage divider with 2 10k resistors and +5V so at the non-inverting I should have 2.5V and the signal would be fed into the inverting side but I was wondering if the 12V-AC has to be lower?
Please help!!!
- - - Updated - - -
Here is the schematic in Proteus however I get an error message and its not simulating. The message says no model specified for U1 and simulation failed due to partition analysis error. Where did I go wrong
Keep in mind that your 12 VAC is actually 16.8V peak, which will probably damage the the part, as it exceeds the 12 V power supply. Your schematic looks a little peculiar. I'm not familiar with proteus, but it looks like your symbol is a differential output device, although you've got pin 1 connected to common (as a 311 should be). I think maybe you've got some mismatch between your symbol and the actual device you're trying to simulate.