Dear Spehro Pefhany, Thanks, I have looked at your circuit. Just want to clear up some confusion. According to the schematic there are a ground(0V track on the PCB) and a earth(close to the spark gap). The transistor, 10K Resister, 10uF cap and TVS are all connected to the ground. There must also be a short(thick) track from the TVS to the pad that will connect the ground to earth. Do I understand this correctly? So when the loop is fine there will be a approx 1mA current and the PIC input will be low. When the loop gets broken there will be approx 0.23mA current. The Transistor base will see approx 2.3V and the PIC input will read High Francois ----- Original Message ----- From: "Spehro Pefhany" To: "Microcontroller discussion list - Public." Sent: Saturday, May 28, 2005 5:06 PM Subject: Re: [PIC] Pin Protection > At 10:58 AM 5/24/2005 +0200, you wrote: > >I still have a problem with my protection to the circuit. > > > >The LM317 give me a constant approx 1mA current. When the wire gets cut the > >output of the LM317 should go up to 12V. (Thanks Herman) > > The LM317 can't give you 1mA constant current- it needs about 5mA to work. > It can also be destroyed by reverse current unless you put diodes around > it, which allows current to flow back into the 12V supply... so I suggest > another method. > > See this quick sketch: > > http://www.speff.com/Fence_break.pdf > > The physically large 10W wire-wound resistors can typically withstand > short transients in the thousands of volts. The lightning choke and spark > gap (as for electric fence controllers) deal with the higher voltages > and currents. This should be pretty bulletproof with good layout and > proper grounding, although nothing is for sure with lightning). The key > is to provide a more attractive path for the current than through the > sensitive circuitry, and to deal with the high, but manageable, voltages > and currents that result. > > Hope this helps, > Best regards, > > Spehro Pefhany --"it's the network..." "The Journey is the reward" > speff@interlog.com Info for manufacturers: http://www.trexon.com > Embedded software/hardware/analog Info for designers: http://www.speff.com > ->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist