I reverse engineered the power board of an electric heater. I think, I understand most aspects of this circuit. One thing is not entirely clear to me though: The circuit seems to have two distinct ways to detect the zero-crossing point which is needed to control the Triac:

  1. Via the opto-isolator (U1) that is directly driven by the primary
  2. Via the voltage divider R7/R8 that taps the secondary of the transformer

Both signals feed directly into a microcontroller (PIC16F886). Both pins (RA5/RB0) on the microcontroller can be configured to be inputs to the built-in ADC.

What could be the reason for having those 2 separate circuits?

Schematic of heater power board

  • 5
    \$\begingroup\$ I'm not convinced R7 and R8 is a crossing detector. Depending on the size of that cap it may simply be generating a DC voltage less than the peak voltage, presumably to allow the micro to monitor the line level. If the cap is small it maybe a delayed edge. Easy enough to simulate though. \$\endgroup\$
    – Trevor_G
    Feb 24, 2018 at 18:30

1 Answer 1


What could be the reason for having those 2 separate circuits?

The opto U1 produces a square wave output in phase with the incoming AC and is probably used as a zero crossing detector by the MCU. If the AC level drops it will still produce a square wave i.e. it is a digital detector of the AC power voltage and will hardly vary its signal even if the incoming supply dropped by a half.

D6, R7 and R8 in combination with the unspecified filter capacitor C4 measure the peak voltage of the secondary and that is probably used by the MCU to determine what the line AC level is. Knowing the line level you could, for instance, alter the triac duty cycle so that on low AC voltages it stayed conducting for longer.

Short story is: heater power level control irrespective of AC supply voltages.

  • \$\begingroup\$ Make that last line "heater power level control" and you get my vote. ;^) \$\endgroup\$
    – Transistor
    Feb 24, 2018 at 20:12
  • 1
    \$\begingroup\$ @Transistor I'll do anything for a biscuit! \$\endgroup\$
    – Andy aka
    Feb 24, 2018 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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