Help for circuit design

IamSmooth, Thu Mar 16 2023, 06:53PM

I have a sinusoidal voltage that can have a Vmax from 5 to 350v (big range). I want to convert it to a simple square wave. The wave is positive when the voltage crosses above the zero threshold and it is 0 or negative when the voltage goes below zero. I am sure there is some simple design for this.

The have used simple resistors to keep the current low for the logic chip. However, because my Vmax can have very low values I do not always have enough voltage to get recognized as an "above zero" value.

Is something like this on the right track

Link2

Would an optocoupler be a better design? From what I've seen on the data sheets there is a bit more of a lag in the 80% rise and fall times.

THanks.