embedded_sys
Member
V1 is the Vdd for your microprocessor. It could be 3.3V or 5V...
V3 and V4 are just for simulation; they control when the simulated switches open/close. Think of "switch" and "fault" as being time-delay relays.
V3 opens the 120Vac switch S1 at 50ms in the simulation.
V4 opens switch S2 to create the simulated fault on the line at 100ms in the simulation.
With the circuit I showed, the microprocessor can tell if the ac is on/off. It can tell if the line is continuous to the relay or not. It cannot tell if the line is shorted; the ac breaker will blow in that case.
You are obviously confused by a simulation schematic and how to convert that to a circuit schematic. C1, R4, R5 are not "real" components; they represent the line resistance and capacitance. Just like R6 and L2 represent the relay.
Thanks for the explanation of the different components. I did realize C1, R4, R5, R6, and L2 were just representations of the wires and relay. I didn't realize V3 and V4 could be used in a simulation that way. Very cool.
I tested the circuit today, and it worked great. I had to adjust a few resistor values to match the environment, but it worked out. I do have a question about the V1 source. This voltage, 3.3VDC comes from the MCU's PSU. Why is it okay to connect a 120VAC main line to a 3.3VDC voltage source with a resistor? That through me when I saw it in your simulation, and although it works, I'm confused why it didn't burn something out. It appears safe, but is it?