I tried to detect 220V AC in my microcontroller using SFH620A-3 with series resistance of 440K (2 x 220K, 1/4 watts SMD type), a 1uF at the output to smoothen the pulse and every works as expected. However the resistors produces good amount of heat specifically when placed in a closed enclosure. The heat is not high to start a fire (I can still touch), however the heat slowly propagates across the PCB and other components too get hot. I did the power calculations and the voltage across the opto is less that 1mA and the power dissipation is 130mW on each resistor. I may have multiple AC detection circuit on a single board and hence the heat would multiply.
- Is it a good practice to increase the resistance further? I tried some 800K and the output wasn't reliable.
- Are there other ways to reduce the heat ?
- Should I try another AC optocouplers ? If yes, can someone suggest some AC optocouplers (DIP-4 casing).
Note : Transformers wont be feasible due to the size.
I tried increasing the resistance by 100K, 50K etc and found that the opto fails to work at around 900K. The output seems to be stable at 770K, hence can I safely use 660K for my project (i.e 330K x 2) ?