Hi Russel, =20 Thanks for your well written response! After building a quick test = circuit I played with different resistor values and saw that=92s exactly what it = did, dropping the voltage to a suitable level for the zener. Using your = formula I will determine the proper value after I know what the current = requirements will be. The test circuit I built, without a PIC, was just using a resistor to = the gate of the triac to test it out (I put a 100K resistor in as a dummy = load for the triac to switch). To trigger the triac (to switch it on) I had to take that trigger = resistor to GND in the circuit, is that correct, or did I make a mistake = somewhere? If this is right, I will have to drive the PIC output pin LOW to turn on = the triac, and HIGH to turn it off? I then used a pot for that resitor on the gate of the triac, and noticed that I had to lower the resistance to about 330 Ohm before the triac = would switch on (this is with my test circuit using a 12V AC transformer, I = didn't have any other ones around). I would guess the function of this resistor = is current limiting, and the current needed to switch on the triac would = depend on which triac I'm using. In this case it was a BT139, which is a bit of = an overkill for this application, but it=92s the only one I had laying = around. Sorry for all the newbie questions and for sticking with me so far! :-) Analog electronics is still quite foreign to me. _____ =20 Andr=E9 Miller =09 -----Original Message----- From: pic microcontroller discussion list = [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Russell McMahon Sent: 15 March 2004 10:53 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [EE:] Switching 24V AC inductive load with PIC, coupling & protection? > One more question about the circuit below, what would a suitable value = > be for the resistor between the rectifier diode and GND? > The resistor drops the voltage from the value on the input capacitor to = 5 volts. It should be sized such that it will drop slightly less than that = voltage when the output circuit is drawing its peak current. Sizing therefore = varies with expected peak load. The 5v1 zener will pass the small extra = current. With this arrangement the zener passes all the current when there is no load. A typical example. Input =3D 24 VAC DC voltage on input capacitor =3D 24 * 1.414 =3D 34 volts. (Mean value will be somewhat lower due to ripple. Amount of ripple will depend on load current and size of input filter capacitor). Say load current mean peak =3D 20 mA (SHORT surges above this value will be handled by the 0.1 uF cap on the = 5v output. If you are expecting substantial surges you should also place an electrolytic (say 10 uF) in parallel with this 0.1 uF. The higher the = surges compared to mean peak the larger the cap should be. R MAX =3D (Vin-Vout)/Imean_max =3D (34-5)/0.020 =3D 1450 ohms. This value resistor will provide 5 volts at 20 mA for 34 VDC in. To = allow for real world results it should be smaller than this. eg 1200 ohms provides up to (34-5)/1200 =3D 24 mA and 1000 ohms provides = 29 mA The resistor power dissipation (essentially constant) is (Vin-Vout)^2/R = At 1000 ohms this is 29^2/1000 =3D 890 mW. Use a 2W resistor or better. The zener dissipation max (which occurs at no load) is Vz^2* I =3D 5 x = .029 (for 29 mA) =3D 145 mW Use a 500 mW zener or better. The formulae above may be used for other values of Vin, Vout, Imean_max = to size resistor value, resistor power rating, zener power rating. Russell McMahon -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body