I've designed the following circuit:
This is a "self-reset" circuit, VCC_IN es 12V from source, VCC_OUT powers the entire board, including a PIC microcontroller.
The idea behind this is whenever the PIC output directly connected to label uRST on the right pulls down, the whole board should hard reset through the relay (including the PIC) for an amount of time calculated with R403 and C401 (a couple of seconds, to give time for capacitors to discharge)
So with this circuit I am making sure that the entire board, including the microcontroller, plus some particular IC's gets a REAL reset, plus the resistors to ground to make the discharge faster.
When I built a prototype on a protoboard it worked perfectly (I should have tested it more thoroughly), so I decided the build the board.
I've soldered the first one, it powers up fine, but in these cases:
1 - power-off, power-on very quickly 2 - the uRST pulls down
the board resets as expected, but when the timer finishes, it instantly resets again, and then again, forever.
I've been changing resistor and capacitor values for some time but the problem persists, what values should I change to make this work?
I've built several of this boards, so I don't have the luxury of a complete redesign, I'm looking for some tweeks here and there to make this work as expected.
Small explanation of the circuit:
uRST is a PIC output, normally set to logical 1 (3v), and pulls to logical 0 (0v) to reset.
R404+C402 are there to hold the timer in power up, so the PIC and rest of the circuit powers up.
C405 is to separate the 12V circuit from the 3V circuit and protect the PIC, plus makes the reset trigger with flanks and not states.
R405+R406 are there so when the flank comming from C405 on pull down sets the trigger low enough to actually trigger the reset.
R401+R402 are there to discharge caps just a little bit more gently than a direct short to GND. (just in case this makes the caps to discharge too slowly, I removed and place jumpers there, with the same result)
NOTE: Diodes VR401, D401,D402 and D403 are for protection.