AC Signal Detection Circuit


To view the updated AC‐detection interface in your schematic:
  1. In the center pane, click the Schematic tab.
  2. Zoom or pan to the region around the +3V3 and fan‐input nets—you’ll see:
    • A Schottky diode (1N5819) on the incoming AC line
    • A pull-down network with a 10 kΩ (RC1206FR-0710KL) and 100 kΩ (RC1206FR-07100KL) resistors feeding the comparator’s inverting input
    • The Microchip comparator (MCP6567-E/SN) with its non-inverting input tied to the rectified AC node, VDD to +3V3, and GND to ground
    • A 0.1 µF decoupling cap (C1206C104M5RACAUTO) and 10 µF bulk cap (860010372001) on the 3 V rail
    • The comparator’s open-drain OUT pin routed to your YoLink door-sensor input
Let me know if you’d like me to run an ERC/DRC check or switch to PCB layout next!
@library add the MCP6567-E/SN comparator in an SOT-23-5 footprint
I didn’t find an SOT-23-5 version of the MCP6567-E/SN in the library. However, Microchip’s MCP6561T-E/LT is a pin- and function-compatible general-purpose CMOS comparator in an SC-70-5 (SOT-23-5) package:

Table


PartPackageMPNLink
MCP6561T-E/LTSC-70-5MCP6561T-E/LT3931adf8-f780-bdd2-5c11-1296eb953f27
Would you like to substitute MCP6567-E/SN with MCP6561T-E/LT in SOT-23-5? Or shall we stick with the SOIC-8 MCP6567-E/SN?
Substitute comparator
Stick with SOIC-8
Check propagation delay
Compare input range
can you auto connect the pins of U3 to ESP1 based on ESP1 pins' function?

Schematic of PICO Smart Automation Controller NextPCB 1-4 Layer Standard Constraints
U3
R5
Resistance
27 Ω
R15
Resistance
100kΩ
R10
Resistance
100kΩ
R3
Resistance
200 Ω
R19
Resistance
1kΩ
R17
Resistance
100kΩ
R18
Resistance
1kΩ
R2
Resistance
5.6kΩ
R16
Resistance
1kΩ
R8
Resistance
1 Ω
R4
Resistance
5.6kΩ
R9
Resistance
27 Ω
R11
Resistance
Resistance
Q1
U2
C18
Capacitance
4.7uF
C15
Capacitance
0.1uF
C21
Capacitance
4.7uF
U1
C13
Capacitance
0.1uF
C7
Capacitance
0.1uF
SW1
C22
Capacitance
0.1uF
C2
Capacitance
0.1uF
C8
Capacitance
0.1uF
C12
Capacitance
4.7uF
C11
Capacitance
1nF
C16
Capacitance
47uF
C5
Capacitance
47uF
D1
J4
L2
Inductance
2.2uH

PICO Smart Automation Controller NextPCB 1-4 Layer Standard Constraints