I didn't send you a link to an opto coupler circuit . The circuit I posted was a comparator which generates the pulse which you connect to opto but the circuit in Reply#12 will work with just a resistor , diode & opto. I'm not hyper. If you don't know electronics you should state that in your first post to save time. A zero crossing detector does not require FULL WAVE rectification. You only need the first half, hence only the one diode. Also, you wouldn't need 2W resistors (you never explained where you got that from) because using a 1 megohm resistor the current is limited to 1 mA so there is no need for a large wattage resistor. Most of the circuits posted will work but you never answered the question of how you are connecting the output of the opto (the open collector transistor). If you are just making stuff up as you go along and guessing without knowing , we need to ask you about everythng you are doing because more than likely 99% of it is wrong. This is more work than you just saying "I'm a newbie, I don't jack about electronics, please help". If you do that , we don't have to expect you to know anything and we can proceed with a minimum of interrogation Without that part, we might give you the opto circuit you asked for and you might connect the output wrong and it wouldn't work. You're initial idea of a full wave rectifier and 2W resistors was a dead give away that you have no electronics experience. The fact that you concealed that from us instead of confessing that it in your first post is an annoyance because you were not honest with us and now we have to work harder to keep you from messing up. There is no crime in being inexperienced but posting for help without admitting it is a deliberate thing and something you should avoid because it results in more work.
Now you tell me raschemmel why isn't rectification required as the reverse voltage this optocoupler can handle is just 5V. By the way why are you being so hyper?
. The 1 meg resistors on each leg of the line limit the current to 312uA @ 5V. When using the opto you only need the one diode. The very small amount of current means you don't need 2 Watt resistors.