Hi Every one.

I done Home Automation using Arduino. ATWINC1500 wifi and arduino promini used in this project.

TRIAC BTA12 used this project.( I planned snubberless TRIAC BTA12 800 BW or CW)

I done AC 230V bulb dimming using zero cross detection method(Interrupt 0 used (D2 pin))

So I just used 4N35 opto coupler to find the interrupts. So I need to reduce the voltage and current. So I used 2 watt 330Kresistor. But I get heat. what is the problem ?. I know the formula mistake(ohms law)

how to find the resistance and wattage.

Input Volt is DC 190V - 290V.(not constant this is the problem how to calculate ?).

Load 4N35.(2volt and 15mA).

I have attached the exact circuit. please find the attachment.

and how to find the resistance value ?.(If the input volt is not constant).