At 02:36 PM 8/28/01 -0400, you wrote: >Hello, > > I've got a 16f870 that I'm using to turn a relay (Tyco V23105 150 mW >Nominal Coil Power, 960 ohm, 12 volt Nominal Coil Voltage) on/off. This >relay is controlling a very small DC motor (~0.5amps). About 10% of the >time when this relay turns on/off, it resets the PIC. I've verified this >is what's happening. Seems to work fine when the motor isn't connected to >the relay. Only resets when the motor is connected. > I'm using PORTA.0 through a resistor to turn on a 2N4401 transistor that >then powers the relay coil. I have a 1N4004 diode across the relay >coil. I have two 0.1uf caps on the +5v to the PIC. > The +5v for the PIC is from a powered protoboard. The +12v for the >transistor and relay are from a +12v battery. The grounds of these two >power supplies are tied together. > Can anyone help me figure out what's going on and fix this? > Try a diode right across the motor terminals (assuming it only has to go in one direction). Obviously you want it to be reverse-biased normally. Make sure that your 12V ground is only tied to the 5V ground at a single point, and preferably away from the chip on the 5V side. What is /MCLR conected to? Preferably tie it to a low-impedance external BOR circuit or to Vdd. Connect a 10 nF capacitor from C to E on the 2N4401. 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body