2
\$\begingroup\$

I've designed the following circuit:

enter image description here

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.

\$\endgroup\$
6
  • \$\begingroup\$ Is your relay's pin-4 the NC pin and pin-3 NO? \$\endgroup\$
    – brhans
    Oct 3, 2018 at 13:33
  • \$\begingroup\$ Yes, when the relay is not active, the board is powered, when it is activated, the circuit opens. It's as the schematic shows \$\endgroup\$
    – ndelucca
    Oct 3, 2018 at 13:37
  • \$\begingroup\$ Why are you using a bidirectional protection diode on a DC line? \$\endgroup\$
    – Reinderien
    Oct 3, 2018 at 16:15
  • \$\begingroup\$ Also that has a standoff voltage too high for your line. I.e. Wouldn't you be better off with something like the SMCJ12A? \$\endgroup\$
    – Reinderien
    Oct 3, 2018 at 16:22
  • \$\begingroup\$ @Reinderien This is a multipurpose board, and there's a posibility to power it with 24V with few component changes, the one in the schematic is for the 24V version. The fact it is bidirectional is just a mistake I made when choosing it. But that doesn't have anything to do with the problem at hand.. \$\endgroup\$
    – ndelucca
    Oct 3, 2018 at 20:03

2 Answers 2

1
\$\begingroup\$

Having a PIC reset itself by pulling the rug out from under its own feet is a risky move. I'd suggest that you monitor with a scope a couple of points. Firstly, is the VCC_IN dipping when the relay turns off and reconnects the VCC_OUT (and charges the caps on the rest of the board)? That could cause the TR input to drop because of the R405/R406 divider, while the upper third point connected to CV may hold up better due to C403 - that'll depend on the value of the internal divider resistors.

Secondly is the behavior of the PIC. After reset the pins default to inputs until the TRIS registers are set, so they'll appear open, allowing C405 to charge, then they'll set to an unknown state - but probably low, until your code sets it high for normal operation. The timing of this may generate the edge at TR that causes the 555 to re-initiate.

\$\endgroup\$
1
\$\begingroup\$

A few comments. You're taking a bit of a chance with that direct capacitor connection to the 12V circuit. Add some series resistance to the capacitor and another diode to ground. Make them both 1N5819.

Also use a 1N5819 for D401. The 555 is not so copacetic with its output being pulled below ground, and the use of a 1N400x will only partially mitigate the negative current flowing out of pin 3 when the relay's inductance is discharging.

The manufacturer's app note recommendation is to add another series diode to completely eliminate the issue:

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.