
Originally Posted by
lsteele
Hi,
I'm trying to switch a mains current (240V AC) with a relay connecting via a transistor to my PIC (a 16f876a). The PIC is powered from a battery supply - 4 rechargeable AA NIMH cells providing 5V. That's powering the PIC directly - there's no regulator (I presumed there's no need for one).
At the moment the mains supply is hooked up to a light. Everything usually works fine when switching the relay ON, but when the relay switches OFF the PIC resets almost every time.
Bookmarks