I have one capacitor type circuit with bridge and zener to bring down the voltage from 200VAC to 12V DC. I then connect the PIR module after a 7805 which provides trigger to my PIC based on any human presence. The problem is that when this circuit is run from an 12V dc supply, PIR works fine, but when connected to an AC supply, the PIR re-triggers the PIC and the trigger kind of starts oscillating. After some research, I found out that the supply needs to be very clean else this could happen, which kind of confirms my findings as well, as when the circuit was powered with 12V there was no problem. So can someone please suggest some capacitor values which can help clean the AC signal and avoid any ripple going through to the PIR module.