It was written: >I have designed a PCB [...] >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). I'm assume you are powering the PIC circuitry from the same 220VAC source (or one leg of it). It sounds like you are getting transient voltage spikes through the AC supply. Add 3 MOVs. Ideally they should be installed as close to the motor relays as possible, but may be installed just ahead of the PIC power supply. One MOV should connect across the two AC lines. The other two should connect between each AC line and ground. You've apparently done a good job of isolating the outputs, but spikes coming through an AC supply can be several thousands of volts and cause some really nasty problems! Let me know if you need any more assistance. Larry Griffin Southwest Technical Arts - http://www.swta.com