At 04:40 AM 11/21/96 +0000, you wrote: >Hello everybody > >I have designed a PCB for the company i work for which is used on an >automatic machine.. >The board has 3 PICs on it (2 16C54 and 1 16C55) > >This board interfaces with 3 external power relays.These relays are >signaled from 3 other reed relays on the board which are >opto-isolated from the signaling PIC. > >When the power relays operate alone (not connected to the machine's >motor) there is no problem. But when they are connected problems >start. These three relays control a two speed bi-directional 220V >motor. At the change of speed or direction the electronic circuit >seems to be reset (it happens about once in 10 changes). > >Can anyone tell me what is happening ? > > >Harry > RF spikes... Ran into the same thing with a opto-isolated Traic running a UV Lamp ballast. The solution was a RF capacitor between the ballast's output wires. Also, the spikes might be coming through the AC line, try running the Motor on a separate AC circuit from the PIC (different outlet). If this is the fix, then you probably need an AC filter between the motor and line (RC filter mabye).