Saturday 19 September 2015

arduino - How to detect 220 VAC voltage using an opto-isolator


I created the following circuit.


enter image description here


I plugged it in and it works!!


Now I thought of adding an opto-isolator to the circuit in place of the LED. The value of C was the same.


$$ X_c = {(({220volts-1.4volts})/0.01A))} = {(2*π*(50Hz)*C)}^{-1} $$


$$ solve for :C=150nF $$


so I ended up with the circuit below.



enter image description here


The two diodes in series are actually present and on the first circuit to achieve a drop-down of 1.4 volts same as the external LED and for the internal LED.


The opto-isolator used was ln4n25


The diodes are proper voltage rating. Why a drop down of 0.7 volts


The problem is that gate of the transistor is not getting high when connected to mains. Meaning that the internal LED is off so GPIO is always HIGH.


Any thoughts? Is the internal LED even turning on? How can I check?


Also I currently have access to this and only this opto-isolator.




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...