Advertisement
Mains Voltage Sensor circuit

Mains Voltage Sensor

This compact mains voltage sensor is intended to monitor and signal to another circuit, for instance a microcontroller, about the presence and/or absence of the ac mains voltage. For this task, a galvanic isolator (opto-coupler), PC1 in the circuit, is used.

The input (light emitting diode) in this opto-coupler is connected across the mains voltage processed by a capacitive-potential divider circuitry built around some inexpensive components. The maximum permissible switching voltage of the opto-coupler is 30 V*, and the transistor (T1) connected at the output of the opto-coupler (photo-transistor) can switch currents upto 10mA.

A possible application example of the sensor is its use as a ‘power-on-reset circuit’ in an electronics project. Another application is in a microcontroller-based emergency power/alarm system as a ‘mains-failure/resume detector’ circuit.

(the exposed prototype - some components are soldered at the bottom side of the circuit board)

(the exposed prototype – some components are soldered at the bottom side of the circuit board)

Mains Voltage Sensor circuit

Mains Voltage Sensor circuit

The PC817B opto-coupler contains an infrared light emitting diode optically coupled to a phototransistor, packaged in a 4-pin DIP. Typical input-output isolation voltage (rms) of PC817 is 5.0kV, collector-emitter voltage is 35 to 80V*, and CTR (current transfer ratio) is 50% to 600% at an input current of 5mA.

The circuit does not require an AC power transformer. Instead, the voltage is reduced by series capacitor (C1) connected directly to the 230V AC mains voltage. The AC mains voltage is rectified by diode D1, and the resulting DC voltage is smoothed by capacitor C2. Zener diode ZD1 is added as a pre-regulator for total circuit protection. In case of an open circuit across capacitor C2 (probably due to an accidental burn out of components R3 and/or PC1), voltage across the filter capacitor C2 is limited to about 5V by ZD1. This will prevent blow up of the filter capacitor C2. When AC mains input is available, the resulting input on the base of T1 through PC1 causes T1 to be driven into conduction by the current through PC1 and R4, thereby giving a ‘low’- level signal at the open-collector output of T1, if suitably interfaced to an external circuit with a pull-up resistor. In case of a power-down, the same is indicated by a ‘high’-level signal at the opencollector output of T1.

It is recommended to use 2-way PCB terminal block as input and output connectors. Although there is rich galvanic-isolation between the input and output of the circuit, the finished circuit must be housed in a well-insulated or plastic/rubber enclosure. Beware, the circuit carries potentially lethal mains voltages!

Lab Note: In the prototype, the knee voltage (Vknee) of transistor was about 0.2V at a current of 20 mA, and the transistor switches current upto 9.8 mA.

11 Comments

Join the conversation!

Error! Please fill all fields.
Looking for the latest from TI?