0
\$\begingroup\$

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? How is the comparison process achieved? According to the reference design, the input AC voltage is 230 VAC 50/60 Hz.

enter image description here

\$\endgroup\$
1
\$\begingroup\$

The design appears to assume that L and N can be swapped. This is a common problem in countries with reversible mains plugs. The circuit, therefore, needs to accommodate live on either pin.

Let's ignore D19, 20 and C37 for a now.

With the junction of R36 and R38 earthed one of the comparator inputs will be grounded. Remember that the neutral is so called because one of the supply wires has been earthed or 'neutralised' at the supply transformer so its voltage will be close to zero. As drawn, 'AC_N' will be at zero volts and since the top of R38 is at zero volts the junction between them will be at zero volts. The comparator '+' input will now also be at zero volts. Any time AC_L goes negative the comparator output will switch high. The result is a squarewave which goes high when AC_L is negative and low when positive.

Reversing the input polarity inverts the result.

D19 does two things when AC_L goes positive:

  • It limits the voltage on IN- to one diode drop above that on IN+.
  • It causes the voltage on IN+ to rise above zero somewhat. This is probably a good thing as it gets the inputs away from operating at 0 V (although the chosen device will work down to zero on the inputs.)

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Equivalent circuit while AC_L is positive.

You can work out what happens on the negative half cycle or when the live and neutral are reversed.

\$\endgroup\$
  • \$\begingroup\$ Nice explanation. But regarding 'AC_N' will be at zero volts ...with respect to what? AC_N can be 50V with respect to earth. \$\endgroup\$ – Huisman Jul 15 at 19:40
  • \$\begingroup\$ I wouldn't call that 'neutral' then! The circuit should accommodate that, I think. \$\endgroup\$ – Transistor Jul 15 at 19:44
  • \$\begingroup\$ Thank you both. I guess I need to study these kind of circuits more often for me to fully understand it. Honestly, I will read your comments again and again until I understand it because I haven't. So, this circuit is just to detect a zero cross needed for the PFC stage software? ZC_IN goes straight to a MCU pin. \$\endgroup\$ – Blue_Electronx Jul 15 at 19:47
  • \$\begingroup\$ @Blue_Electronx It is the MCU that does the PFC (PFC_PWM to control the boost converter), etc \$\endgroup\$ – Huisman Jul 15 at 19:52
  • \$\begingroup\$ I wanted to do some math, but I don't know the values of R35, and R36. The BOM list has a mistake regarding them. So, let's say input voltage is 230VAC, the voltage at the -IN would be dependent on the ratio of R35, R36, right? \$\endgroup\$ – Blue_Electronx Jul 15 at 20:29
1
\$\begingroup\$

Note that the whole shown circuit (so, +3.3V, +12V, ZC_IN, etc) should be considered live and thus dangerous).

The shown picture has cut off the name of the output that gives an important hint: ZC_IN, which stands for Zero Crossing in.

D19 and D20 clamp the floating line voltage to a floating 0.7V volt, where R35 and R40 limit the current through D19 or D20. I mean floating with respect to the circuit's ground. R36 and R38 'align' this floating 0.7V with respect to ground. So, the comparator will see a sine wave which matches the line voltage at the zero crossing, but will be clamped between -0.35V and 0.35V.

This zero crossing is required to make a good PFC.

Below a picture of the (clamped) voltages the comparator sees at its input terminals.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ What resistors values did you use in your simulation? \$\endgroup\$ – Blue_Electronx Jul 16 at 20:12
  • \$\begingroup\$ @Blue_Electronx I don't remember exactly. I think I used something "standard" like R35=R40=10k and R36=R38=1k and D19=D20=1N4148. What components are being used in the real STEVAL-CTM010V1? \$\endgroup\$ – Huisman Jul 17 at 6:30
  • \$\begingroup\$ The published BOM list has a mistake regarding those resistors, so I haven't figured them out. \$\endgroup\$ – Blue_Electronx Jul 17 at 13:06
0
\$\begingroup\$

The depicted ground is not a chassis ground, it is a floating ground. R36 and R38 are bleeding resistors and they set this floating ground potential at mean voltage between N and L.

The chassis ground, which is also conencted to PE wire is depicted differently:

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.