Posting my question with a schematic
I want to detect AC line voltage using an optocoupler. When i feed the optocoupler input with an AC line, i get a 50 Hz pulse train at the output. Usually this scheme is used for a zero cross detection. But my idea is to use this pulses and convert them to a steady DC pulse so that i can feed this pulse at the input of a PCF8574. In that way i would know the status of PCF8574 port pins and hence the presence of an AC voltage as shown in the schematic below
When i close switch SW, a pulse train is generated at output of opto-coupler. I want the "some circuit" block to generate a steady pulse from the opto-coupler output. When the switch SW is open, there is absence of pulse train and want the "some circuit' block to output a zero until the switch SW is turned ON again.
Now my question is:
How can i convert a pulse train to a steady DC? I want the "some circuit" block in above schematic to do the job, so what circuit can replace the "some circuit" block
Also, is it the correct way to interface an opto-coupler with "some circuit" block ? I am getting a pulse train at emitter of the optotransistor Please correct me if i am wrong
Please share any circuits or ideas
Thanking you,
Gaurav
Basically i want to know whether 230V AC Mains is present or not, so if i use HCPL3700 opto-coupler as shown below, will it do the job for me?
I just want a single steady pulse, so i assume if the AC signal crosses a certain threshold, the HCPL3700 will output a HIGH and when AC signal is absent it will output a LOW.
Am i right ? Please suggest