On 5/11/06, Info wrote: > Hi! I am working on a PLC-replacement design so the environment is fairily > harsh. Relays, motors, VFDs etc. > > To protect the PIC from this I am going to opto isolate the inputs and outputs. Interesting methode... don't forget, your purpose is not just to protect a PIC but to have a functional device, protecting all PIC inputs and outputs with optocouplers could be sometimes a silly. The silly is so big when you do optoisolation and keep a common ground or common supply for both sides of the optocoupler. I have seen many like this on those lists. > My question is where do I put the filter for the inputs, before or after the > opto- > couplers? where it fit betters with your schematic (as impedance or just RC values, using non polarized capacitors versul polarized capacitors, etc)) > And what should be used to filter, Resistor and a Cap? Values? > PLC:s have a 5kHz filter according to their datasheet. Depends what kind of filter it has. Usualy a simple RC network with t=3RC and t=1/f solve the problem. But not always, restrictions are large when talking about analog signals and the passband of the filter and the shape between stop band to passband > > > I have used a PIC before in this environment and it went 'nuts' due to 50Hz > noise it picked up by long wires, and I want to avoid that =) Probably because you haven't used a methode which could reject 50Hz from long wires (like driving long wires with analogic signals under the constant current or using standardized digital communications on long wires - using microcontrollers on both ends- ). success, Vasile > > TIA! > > -- > 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