sinewave to squarewave converter using LM311

Thread Starter

sandel

Joined Jul 8, 2010
3
Hi everyone,

Just joined.

Could anyone suggest how to wire up an LM311 for sinewave to squarewave conversion. The input is a burst signal comprising 5 nos. ~2Vpeak-to-peak, 200KHz sinewaves repeated every 5msecs. I intend to use a single source of 5Vdc.
 

Thread Starter

sandel

Joined Jul 8, 2010
3
Hi retched,

Many thanks for the explanatory response. You didn't include the link for the zero crossing circuit.
I wired up an LM311 but got a lot of noise - is it because I connected the input signal to the inverting input of the comparator. Is it necessary to include feedback (i.e hysteresis) from the output?
Thought about the ADC - the programming aspect of setting-up the ADC was my excuse not to. Incidentally, I am working with a PIC 12F683 which has an in-built ADC and programming in c using the MPLAB IDE and the CCS c- compiler. I require to input the squarewave to the ucontroller.
Your suggestions (with relevant links) are appreciated.

sandel
 

Norfindel

Joined Mar 6, 2008
326
If the sinewave is AC with no DC, you could compare it against 0v, and obtain an square wave output. You should connect the AC signal to the + input and 0v to the - input, if you want the square wave in the same phase than the input signal.

About the noise, did you decouple the power supplies to ground?
If the input signal itself is noisy, you may need to make a schmitt-trigger (hysteresis) comparator.
 
Top