230V ac mains
half wave or full wave rectified.
trying to get zero crossing, so there is no capacitors in this circuit.1.414 ?
220,230 , it doesn't matter when you calculate minimum and then tripple it.
Ok, 230vac
The following is a calculation for an LM393 comparator (not an opto coupler , that's next)
This voltage is RMS so for PEAK TO PEAK ==> 230VAC x SQRT(2) =262.4Vac Pk.==>262.4vac x 2 = 524.8VAC PK to PK.
Let Load voltage=2.5V
Let Load current = 300uA
Rdropping = (Vin-VLoad)/ILoad=262-2.5
262/0.000300A= 259.6=260Vac/0.0003A=866666 ohms ==> 1 mega ohm.
Since the mains voltage is AC and is across the L-N wires, then the dropping resistor calculated of a the positive phase is not sufficient to use if you only want one resistor. In this case , if we want to use a single resistor we can use the same value we calculated because that was for the positive phase. If we are going to use a diode to block the negative phase then we do not need the negative phase resistor.
A simple 1/4 watt carbon 1meg resistor has a voltage limit of about 150v.
Can you post a link to that info please. I would use a 1/2 watt.
Example for an opto coupler:
Let load = 4N25 optocoupler led==> 20mA at 1.3V dc
Let AC voltage = 230vac
Dropping resistor Rdropping=(Vin-Vload)/Iload=[230vac x SQRT(2)]/0.02==>(325Vac-1.3Vdc)=324Vac/0.02A=16185 k ===>18k
(EDIT: CORRECTED MISCALCULATION OF VOLTAGE noticed after Reply#31)
half wave or full wave rectified.
If you only need zero crossing , you only need the positive phase because you don't care what happens once it goes negative, hence no need for the second diode. Also the diode is not placed in series like a rectifier but across the input to the opto as in this circuit:(attached)
The other circuit was previously posted gives you a single narrow pulse at crossing which is actually my preference, although
either circuit will work.

