# Understanding this comparator circuit for AC voltage protection

#### Xavier Pacheco Paulino

Joined Oct 21, 2015
728
The circuit shown below is taken from this whole design. I understand the main idea. They want to measure some voltage condition and trigger something else with the comparator. R39 and C38 form a low pass filter. R37 is the pull-up resistor as the comparator's output is open collector. D19 and D20 are protection diodes as the input goes positive and negative. What I don't understand is the arrangement of the resistors R36, R38, R35, and R40. Why are R36 and R38 referenced to ground in the midpoint? According to the reference design, the input AC voltage is 230 VAC 50/60 Hz. I know this is something basic, but I'm just confused.

#### ericgibbs

Joined Jan 29, 2010
13,208
hi,
R35 and R36 are a voltage divider, as are R40 and R38.
E

#### RPLaJeunesse

Joined Jul 29, 2018
176
What's not really obvious from the original ST circuit is that AC_L and AC_N are clamped at one diode drop below ground via BD1 (think of RS1 as a short circuit, it's a current shunt and very low resistance.) One needs to realize that these signals thus appear like rectified sine waves. This keeps the inputs from going much below ground, with R35/R40 likely 20+ times R36/R38 either input might see -50mV at the lowest, well clear of the -300mV the TS391A is rated for. Also, this is a line powered circuit, and very dangerous to work on as circuit "ground" can be much different from local "earth".