220V detector - again

septillion:
If you really don't want to do in software (which is pretty straight forward), yes, a full bridge will give you extra on time. But it also makes the hardware more complex as a trade off :wink:

Thank you Septillion,

First do we agree that the half rectification suggested above does not alleviate the need for tp series resistors
Second, regarding sw implementation, imagine a source generating noise in sync with the mains, e.g. a stuff injecting a pulse every zero cross, this may even be a dimmer. The software who's looking for a 50Hz signal will find it and will consider the switch as being closed. Now suppose you write your code, test it and find it rock robust. One day you (or you neighbor) buy a new appliance which, during night (e.g.) sometimes has itโ€™s synced noise exceeding a threshold. Should the switch in question command stores or a gateway (my case) they will open while I am away and this is really undesirable and should justify spending some more drachmas on the hw . The reason I said I wonโ€™t go this way is that I have no mean to insure that my algorithm will remain valid in the future.