At 20:32 25/10/99 -0700, you wrote: Now all you ahve to do is protect the OPTOS! How about this:- switch common 0V switch contact intp the base of a NPN transistor pulled high via 1k and a series reisitor into the base of 10K. Use schotkey diode clamps on the input lines. Use current limit potection resistors on both lines say 100R USe the tansistor as an active low switch. This method is used in vehicle environments, agreed that there will be no 110VAC around, but lots of other stuff. Oh yes, add some ferrite beads to the lines Dennis >I use them all the time for serial coms for the same reasons that make them a >good choice for this app. I must have had a serious brain fart. This will >also make it easy to run 12V to the switches to compensate for loss in the >cable. Thanks for helping me see the obvious. Amazing how easy it is to >forget the simple things when you spend too much time working on things that >are more complicated. > >Tony Nixon wrote: > >> Brian Kraut wrote: >> > >> > I need to read some switch closures with PICs in a ship. The cables >> > running to the switches will run several hundred feet and will be run >> > alongside AC power lines and possibly some lines to big motors. There >> > will be three PIC circuits in three different locations reading the >> > switches. They will be daisy chained. There won't be any serial coms >> > between the pics, just 11 switch lines and common. There won't be any >> > fast switching, just going to alarm contacts on doors. >> > >> > Any suggestions for protecting the pics and keeping noise on the lines >> > from looking like switch closures? >> > >> > Also, should I use 5V going to the closures or bump it up to 12 or 24 >> > and step it down with a zeener at the pic end for better noise immunity? >> >> Opto couplers are cheap and simple. It's highly unlikely that the LEDs >> will light except when driven by the switch closures. The PIC connects >> to the transistor collectors to detect the swicth change. >> >> -- >> Best regards >> >> Tony >> >> http://www.picnpoke.com >> Email sales@picnpoke.com > >