Wednesday, 25 July 2018

Safety design on mains detector


I've designed a simple mains detector which I have drawn below. The theory of operation is pretty simple. A capacitor is used to reduce the current so that my optocoupler can operate (represented by the LED below). With LTSpice, I get a nice sine wave @60Hz with ~3.5mA. I have omitted the other side of my opto for simplicity's sake. Now I'm interested in doing some safety analysis.



The first thing that comes to mind would be to add a high resistor in parallel with the capacitor to reduce the risk of someone getting a discharge from the capacitor, but I've purposely omitted that because it would burn a lot of heat and ultimately I can put this whole thing in a place where no fingers should be reaching it. The fuse should protect me against the case where the capacitor fails with a short. An open circuit would simply fail nicely. Any other thoughts I may have missed in my safety design?


schematic


simulate this circuit – Schematic created using CircuitLab



Answer




The first thing that comes to mind would be to add a high resistor in parallel with the capacitor to reduce the risk of someone getting a discharge from the capacitor, but I've purposely omitted that because it would burn a lot of heat and ultimately I can put this whole thing in a place where no fingers should be reaching it.



Bad idea. If this is a pluggable device (not permanently wired to the mains), then anyone can touch the two prongs of the plug and get a discharge from the capacitor. And in any case, a 1MΩ resistor, which would discharge the capacitor in a fraction of a second, would only dissipate 15 mW @ 120VAC in normal operation. (Pay attention to the voltage rating of this resistor — use multiple resistors in series if necessary.)


Second, as Transistor pointed out in the comments, the capacitor limits the current at 60 Hz, but has little effect on higher frequencies, including those produced during switch-on, as well as fast transients on the line caused by nearby lightning, other equipment switching, etc. Such currents might blow your fuse, but not before destroying your LED.


So, at a minimum, I would suggest:




  • Add the 1MΩ resistor in parallel with the capacitor

  • Raise the series resistance (R1) to 10kΩ (it will dissipate about 130 mW in normal operation)

  • Raise the value of the capacitance (C1) to 100 nF in order to compensate for the increased drop across R1.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...