Resetting Arduino DUE

Hello,

my project requires to reset the Arduino DUE in three ways...

a) Reset using a reset button -> this is no problem.

b) Reset using the serial Interface.

I am using a programm, which I have written in Visual Basic, to communicate with the Arduino DUE.

I know it should be possible to somehow use the serial interface, to reset the DUE, the Arduino IDE does the same when uploading the sketch.

So I have to implement a reset function on the Visual Basic side using the serial interface.

A ToDo on how to do this would be highly appriciated.

c) Reset trough the arduino sketch itself.

When the program reaches a certain condition, a reset shall be made.

I know this is a bit tricky.

As far as I know there is no easy to use reset command, to actually trigger the reset in the software.

What I aim to do, is to just use a external piece of hardware to do the reset -> could be done like that -> when the program reaches the certain reset condition a pin goes to high -> the pin triggers a hardware block, that pulls the reset pin for the required period of time to low.

If someone has done something like this, a ToDo would be also highly appreciated.

Kind Regards,

Andreas

You could do a reset via a transistor or small FET, however one thing to keep in mind is the time between power on and the sketch getting to initialize the pin you will be using to drive the reset transistor or FET. During this time, the pin could go high causing the Arduino to be reset thus creating an endless reset loop. You can overcome this by introducing a delay with a cap and resistor which will inhibit the resetting until the sketch has had time to make that pin low. A side effect of this is that the reset function in your sketch would also then take a bit more time to actually reset.

Just something to keep in mind.

Hello,

the time that the reset takes does not matter - if the time takes even a second I dont care...

I had the same thaught to use a transistor and a cap to accomplish this - tough I asked because I thaught someone here should actually have had the same problem, and there should exist an already done and tested solution for it.

Kind Regards,

Andreas