At 10:07 AM 5/10/00 +1000, you wrote: >Hi All, >I have a little problem that my Pic that is switching on a motor >via a relay is locking up :( >The relay has a diode across it, and if I run it with no motor >there is no problem. Only when the motor runs (12v windscreen >washer motor) for over 2 - 3 seconds things lock up. > >Putting a diode across the motor seems to solve it, It's a DC motor with a commutator, so it produces a lot of electrical noise that gets coupled back through the relay. The diode will kill some of the noise, especially if you put it right at the motor. > but have I only just solved the problem? Determining the margin you have is not easy. It's possible it could act up with slightly higher voltage or with a worn commutator. Maybe you could improve the grounding and relay circuit so it works *without* the diode, then add the diode. Operating the relay with an optoisolator is one way to (potentially) improve things. 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 Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=