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
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)
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.