0
\$\begingroup\$

to detect Zero Crossing of ac mains, can i connect an EFM8 pin configured as input directly to 220V ac via a resistor?

\$\endgroup\$
  • 1
    \$\begingroup\$ This is one of those questions: If you have to ask, the answer is NO. \$\endgroup\$ – Turbo J May 16 '18 at 10:47
  • 1
    \$\begingroup\$ Agreed. Use opto-isolated zero-cross detection. \$\endgroup\$ – Transistor May 16 '18 at 10:59
  • \$\begingroup\$ @turbo-j: it's not always the case!!!... \$\endgroup\$ – moyoumos May 16 '18 at 12:25
  • \$\begingroup\$ @Transistor: there is no room for an OC circuitry or the like... \$\endgroup\$ – moyoumos May 16 '18 at 12:41
  • 1
    \$\begingroup\$ Then you probably haven't even got room for proper isolation distance between the mains and the low voltage section. You will have to treat the whole circuit as live. \$\endgroup\$ – Transistor May 16 '18 at 12:55
2
\$\begingroup\$

Assuming the EFM8 input pins have clamping diodes, yes, using two 1Mohm resistors. One resistor connects the input to AC Line, and the other connects ground to AC Neutral. Note that there is no isolation and the entire MCU circuit should be considered to be at mains voltage.

See AVR182 for further details and considerations.

\$\endgroup\$
  • \$\begingroup\$ efm8 datasheets and ref manuals are not clear concerning the presence or not of clamping diodes!... \$\endgroup\$ – moyoumos May 16 '18 at 13:11
  • 1
    \$\begingroup\$ @moyoumos: Looking at the Sleepy Bee EFM8SB1 datasheet, the Absolute Maximum Rating for V_IN suggests that they are in place. \$\endgroup\$ – Ignacio Vazquez-Abrams May 16 '18 at 13:15
  • \$\begingroup\$ i have only EFM8BB3, LB12 and UB3 devices... will see if this is a common or a special feature... \$\endgroup\$ – moyoumos May 16 '18 at 13:23

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.