I had a similar problem. ended up being the inputs were picking up noise. so isolate inputs,try to run code with out inputs and test code. also try software debounce on inputs. hope this helps some. victor ----- Original Message ----- From: "Dwayne Reid" To: Sent: Tuesday, August 28, 2001 3:08 PM Subject: Re: [PIC]: PIC reseting due to relays > At 02:36 PM 8/28/01 -0400, Gary Neal wrote: > >Hello, > > > >Seems to work fine when the motor isn't connected to > >the relay. Only resets when the motor is connected. > > Try this: use twisted wires going from the 12V supply to the relay, then > from the relay to the motor. Put a 100n mono cap across the 12V supply > right at the relay. In other words, add a bypass cap across the 12V supply > just BEFORE the relay. Also use twisted wires from the relay to > motor. You may also want to try putting a MOV across the motor leads, > right at the motor. > > The idea here is to present a low AC impedance bypass to the noise right > where it gets generated - right at the relay contacts. Putting a mono cap > across the motor supply right at the relay means that the noise is mostly > confined to the loop from the relay to the motor. Using twisted wires > helps keep that noise contained to a small area. Adding a MOV right at the > motor may help - it certainly does when the load is a large industrial > contacter or solenoid. That huge, very fast spike that is generated when > the control relay opens gets clamped to a level that is much more easily > contained. The same idea may hold even if the load is a motor instead of a > solenoid. > > Others may suggest putting small caps right across the relay contacts - > this usually doesn't work for me. But you can try it. > > Stopping those nasty spikes is almost a black art. Even though I've been > doing this for many years, it still often takes several attempts to get it > right. > > dwayne > > > > Dwayne Reid > Trinity Electronics Systems Ltd Edmonton, AB, CANADA > (780) 489-3199 voice (780) 487-6397 fax > > Celebrating 17 years of Engineering Innovation (1984 - 2001) > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > Do NOT send unsolicited commercial email to this email address. > This message neither grants consent to receive unsolicited > commercial email nor is intended to solicit commercial email. > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body