On a sunny day (Sun, 31 Jan 2010 19:00:18 +0000) it happened Tim Watts wrote in :
I JUST WANT TO POINT TO THOSE VOLTAGE SENSOR SCREWDRIVERS, THE ONE WITH A NEON AND A FEW MOHM RESISTOR IN IT, THE NEON LIGHTS UP WHEN YOU TOUCH A LIVE WIRE WITH IT. NO FUSE AND YOUR LIFE DEPENDS ON IT F*CK IF YOU HAVE 2 250 kOHM RESISTORS IN SERIES WITH EACH LEG OF THE OPTO THEN YOU NEED NO F*CKING FUSE.
+5V | 100k ..................... | ~ --- 250 k --------------- __c___|--------- micro CMOS in | k . |a / |/ . | 230 V mains diode . opto LED / -| . C1 | a . |k |\/_______ | ~ --- 250 k --------------- . e | | ..................... /// /// CNY17-3 opto couplerTo pull the micro input low to cause an interrupt you need 5 V drop in 100k =
50uA. For a 10:1 transfer of the opto that means 500 uA peak on the AC side. For low mains: .8 x 230 x sqrt(2) = 260 V peak. 260 V at .5 mA = 520 kOhm, so 2 resistors of 250 k will do. The max short current, in case the opto is sabotaged by for exampe Al Quada or Tony B. is then for a 20 % high mains: 1.2 x 230 x sqrt(2) = 390 V / 250000= 1.56 mA. the dissipation is then 276 x 276 / 250000 = 301 mW in the 'live' resistor. The micro internal diodes will protect it at that currentNormal maximum disspipation is half that, in 2 resistors,
230 x 230 / 500000 = 106 mW, so 53 mW per resistor. You can add a small capacitor C1 to make the micro less noise sensitive.I have this here in a PVC box the size of a small matchbox.
AND IN CASE OF A DIRECT LIGHTNING HIT YOU HAVE OTHER THINGS TO WORRY ABOUT. The resistors need to be big enough in size to handle the voltage, no fragile .0001um SMDs, use normal metal films.
idiots