Bernhard Schweighofer wrote: > .... > Just some thougths: > > type: > The capacitor should at least be built for the AC-voltage you are using. > Important: The value for the maximum voltage for the capacitor > ('Spannungsfestigkeit') has to be for 'AC' ! I think such > capacitors are called 'Mains Voltage Capacitors' For the low currents contemplated for miniature products, most film caps with adequate voltage ratings will be OK, and most are 'self-healing' for voltage overloads. Just remember that DC voltage ratings must be at least root 2 x higher than AC ratings. Also, voltage transients do happen, constantly, so design in a margin. > (Netzspannungskondensatoren). > > value: > Let's say the maximum average current of your circuit is Iav . > The capacitor has to supply your circuit in one half-wave --> > IC_average = 2*Iav. > now the average Voltage of the capacitor during loading your circuit : > UC_average = ( sqrt(2) * 120 / pi ) - U_Zener (Hope that's right, haven't > any reference handy now) > > and with Q=U*C=I*t --> > > C = I*t/U = IC_average * 1/(2*f) / UC_average > > Another thing: > IMHO you should use a X-capacitor ('Schaltfester > Netspannungs-Kondensator') Oh where's my english dictionary right now > ???? :-( > A X-capacitor is a capacitor which works with MAINS-voltage and you can > short-circuit (also if fully loaded) without damaging it. > If you use a 'normal' main-voltage capacitor then you should use a > small series resistor (say 220 Ohm --> Imax = sqrt(2)*120 / 220 = 0.8 A) > for protecting the capacitor. Yes. The resistor(s) should be a type that doesn't emit flames or smoke when failing. Beware that thickfilm chip resistors have poor overload characteristics. > > One addition: > Because of the capacitor you get a phase shift between the AC-voltage and > your load-current pulses , so your zero-detect circuit has to be > connected directly with a resistor to the AC-voltage. > Good point. You can still use the high-value-resistor method here, or correct for the phase shift in software. > bernhard. > > PS.: Hope all is correct and you can understand it ! For those > words I wasn't sure about I wrote the german translation :-) > > Bernhard Schweighofer alias schweigi@sbox.tu-graz.ac.at > (Student at Graz University of Technology, Austria) -- Paul Mathews, consulting engineer AEngineering Co. optoeng@whidbey.com non-contact sensing and optoelectronics specialists