Pushbutton and mosfet as reset switch

Hello everyone,

I am finalizing a small project and in need for some circuitry advice. I supply a Nano and some sensors (SPI and I2C ICs) via Vcc. I something goes wrong I can reset the Nano using the built-in reset function or the reset Pin directly. Since the peripheral ICs are still supplied via Vcc I can not make a hard reset.

Therefore I want to integrate a manual push button to trigger a reset. For this I would need a normally-closed angled switch which can withstand 0.5A. I was unable to find such a part. So I came up with a circuit to include a normally-open switch using a mosfet

Closing the switch would disable the Mosfet and no current can flow through my devices (a few nA maybe).

Is this a viable solution to realize a hardware reset option?

No. Disconnecting the Gound lead almost always will result in unpredictable and erratic behavior.

If your devices have hardware reset lines or software reset use them instead.

Using a P-channel mosfet seems to have the same effect


Drawbacks:

  • The pulldown resistor has to be configured correctly
  • The voltage of the power supply goes directly to the gate (not protected against spikes and fluctuations)
  • Mosfet needs to withstand constant current, higher than the main circuit is using
  • Not as energy efficient

Usable?

Why do you need a MOSFET?
Just use an on/off switch

If you must use a MOSFET, then do it like this.

Sorry for the late reply.

I was searching for normally-closed push buttons, but did not found anything for PCBs


I need an angled pushbutton to mount on a PCB (THT or SMD), similar to this

I do not need a Mosfet necessarily, but was the best solution I can think of.

This seems to have the same effect as a normaly-opened button


For my application I would need the Mosfet not conducting when the button is pressed.

For my application I would need the Mosfet not conducting when the button is pressed.

​You can get that action by changing over the positions of the resistor and the switch (push button).

Then do like this

Why don't you just put a tactile button NO switch between reset pin and gnd?

You won't be hard resetting your project, just the Nano.

Why do you need to reset your project?
Why it locks up would be more important to address?
What happens to your hardware when the lockup occurs?

Tom.... :smiley: :+1: :coffee: :australia:

A little background:

  • The Nano network communicates via CAN
  • Main power line is +12V (with switching power supply to +5.2V)
  • All onboard devices (Nano, CAN-controller, ICs) are supplied with +5.2V
  • Cable to the device has [+12V,M,CAN_L,CAN_H,RST]

Therefore I hardwired the reset pin through my network. If needed I can hard reset my Nano. In the setup() function all peripheral devices should be reset as well (either via I2C, SPI).

Not all traps have been tested or addressed yet. There are external devices, that communicate using serial communication (special build measurement and actor system). Here I use the SoftwareSerial() library from Arduino. The device has no designated reset or re-initialization process programmed. The actuators sometimes 'forget' there positions and must be hard reset. The commercial ICs can easily reset using their bus and do not need to be hard reset.

My thought process was:

  • Main power supply must not be disconnected (whole network would restart)
  • Software reset only resets the controller, but not the device
  • If there are deadlocks somewhere in the code, I can just press a button to reset (usually the device is encased and can not be easily disconnected)

What I show is the simplest way to do it but switch bounce could cause some devices to reset several times and possible get stuck.

I already built a test circuit and it looks promising (not yet connected to my main device)

That does not sound good. I will include a burst testcase (multiple resets in short duration) in our testplan and check if the device can get passed the initialization process.