PIC was restarting when driving motor...

Started by rrothe64 June 3, 2004

I misread a motor spec and wound up sending about 6amps through a
TIP120 which was being driven by a PIC16F84(a) using PWM. The PIC
reset, although the power supply was capable of delivering much more
than 6amps (at 12v. I'm using an ATX PC Power supply with the
necessary jumpers and pre-loading resistors in place.).

Anyway, I caught my mistake and put a power resistor in series with
the motor to limit current to about 1.5amps. The problem is that the
PIC continued to reset periodically.

I then added an additional flyback diode in parallel with the motor
(even though the tip already has one). Fewer resets, but they still
occured.

I then added a 0.1uf cap on the PIC power pin. Still fewer resets,
but they continued. (there is a 10uf or so cap on the 5v power supply
line, too)

Lastly, I changed out the TIP120 and the resets stopped.

Could I have blown something in the TIP during my first mistake that
caused the TIP to appear to function properly but continued to cause
the resets? The motor is a Radio Shack hobby motor (9-18v at 1.9amp
max). The TIP connects to the PIC pin via a 4.7K resistor. MCLR is
held high via a 10k resistor. PIC is running at 20MHZ (resonator).
All other pins are connected to either switches (external pullups) or
LEDs through 330ohm resistors. PWM is generated through TMR0
interrupt.

Thanks in advance for any suggestions.

Rob