1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ To do this reliably you almost certainly need a two-phase circuit, because both triggering the circuit and resetting the uC need some time. while you are triggering the circuit you don't want to be (partially) reset. \$\endgroup\$ – Wouter van Ooijen May 26 '15 at 13:29
  • 2
    \$\begingroup\$ Some uC's may allow you to turn off the I2C peripheral. Also, use a TVS on the I2C lines, should eliminate the latch-up. \$\endgroup\$ – rdtsc May 26 '15 at 13:42
  • \$\begingroup\$ Agree with above about TVS diode - they work very well. Some small 50R resistors in series with the pins can help too. \$\endgroup\$ – Jon May 26 '15 at 17:34
  • 1
    \$\begingroup\$ There are several options. First many micro controllers have built in watch dogs. Second you can get a stand alone watch dog chip and use the pin you were going do drive the FET to drive the watch dog and let the watch dog reset the micro controller. \$\endgroup\$ – vini_i Aug 27 '15 at 22:56
1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Thanks for your comment, So the monostable is always powered? I'm afraid if I'll be allowed to add monostable to the circuit. \$\endgroup\$ – Jonfs2000 May 26 '15 at 15:02
  • \$\begingroup\$ Yes. I suppose you could probably do something that is not powered, but the monostable is hardware with only two states so it shouldn't be an issue. \$\endgroup\$ – Spehro Pefhany May 26 '15 at 15:04
  • 1
    \$\begingroup\$ To do it cleanly, you're exactly right with this answer, you need something always powered and timed, otherwise it's always going to be a question of how graceful the OP can make the prat-fall when the supply starts to fall. The 555 is a great solution, because it's well understood, very cheap, and ubiquitous. I guess these days you can get ultra-low-power ones. \$\endgroup\$ – Dan Sheppard Aug 27 '15 at 22:56
1
\$\begingroup\$

A watchdog monitor device such as Maxim MAX6746 may provide a better solution.

Normally these types of devices will provide a reset at power up and then hold off a reset provided a trigger pulse is seen at the correct interval. If it is not seen the reset is pulse low and then high.

In your case rather than pulsing reset you could disconnect the supply and then reconnect to correct the latch-up. Within you software you would need to repeatedly trigger the watchdog to prevent the power being cycled.

Are you sure that you need to cycle power? It is rare that such an action is required and if it is there is a chance that the device is damaged by the excessive current that can flow during a latch-up.

Can you avoid the latch-up in the first place by incorporating better ESD protection? (for example resistors in series with pins subject to ESD with parallel diodes and possibly small capacitors as well).

\$\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.