Electronic – Soft Power reset by microcontroller

powerreset

I want to design a circuit such that the microcontroller can toggle a GPIO pin and shut the whole system (including microcontroller itself) down and then after a short period of time the power should turn back ON (may be 100ms)?
Can any one suggest a circuit for this? Thanks

enter image description here

The reason why I need this is, microcontroller's I2C latches up on ESD (-8KV) test and wont recover untill I power cycle.

Best Answer

You could trigger a chip such as an LMC555 with the microcontroller input and use that to time the power-off. Capacitively couple the microcontroller GPIO to the /Trigger input.

enter image description here

The output can directly control the gate of a p-channel MOSFET (with 100R in series is good). Be careful this band-aid does not cause more problems than it solves- in particular make sure the control input and power is well bypassed to prevent it from triggering from EMI.

If the latch-up is in the I2C devices you could safely interrupt power to them directly with the micro, leaving power on to the micro.