??? 03/29/05 02:13 Read: times |
#90571 - Transformer isolation recommended Responding to: ???'s previous message |
Geert said:
However, such help-contacts are quite expensive and I was wondering if you could 'sense' the output of the relais and bring this info (down-converted and separated by an opto-coupler, for instance) to the input of a detection circuit (0-5Vdc inputs), so that you exactly know the state of the relais in all possible situations. Hallo Geert, I agree with Erik, opto isolation might be too dangerous. There can be thousands of volts on mains! I would suggest you the following circuit: ![]() Transformer is a very small one, only 0.35VA (6V/58mA). Isolation rating should be 5kV, which is standard meanwhile, when I'm correct. Also, transformer should be short proof, which is also standard for a 0.35VA type. Behind transformer there is a bidirectional transzorb, which turns-on at about 50V. This is well above maximum output voltage of transformer, which is about 6V x 1.8 x 1.414 = 15V. Transzorb is neccessary, when mains has lots of overvoltage spikes, e.g. when there are some inductive loads on mains. Then, it protects the succeeding circuitry. Limiting of voltage to about 50V is done with the help of ohmic resistance of secondary winding. There's no damage possible, because transformer is much too weak to drive enough current for overheating transzorb. And transformer itself is short proof, of course. 4k7 resistor limits base current to save value, but at the same time guaranteeing that transistor is driven adequately. Diode prevents zenering of BC550B, when transformer output voltage is negative. 100n capacitor helps to filter out fast spikes coming from mains. BC550B discharges at each positive half wave the other 100n X7R capacitor via 51R resistor. This resistor limits collector current. During negative half wave, 100n capacitor is charged by 1M resistor. When there is no loss of mains, discharging capacitor dominates, and voltage at gate of BS170 is well below 0.8V, which is specified minimum gate source voltage needed for turning-on BS170. For the duration of one half wave (10msec) voltage at gate of BS170 rises up to: Ugate = 5V x (1 - exp(-10msec/0.1sec)) = 0.47V Remember that 100nF x 1MOhm gives 0.1sec. So, about two or three periods of missing mains voltage is neccessary to turn-on BS170. At mains fail, output voltage of circuit is logical low level. So, circuit provides negative logic. You are free to connect output of circuit to some free port line, or directly to some free /INT input of mcu. Bye, Kai |