Go Down

Topic: Re-setting the Arduino (Read 439 times) previous topic - next topic

mntlvr_66

Hello
Can't seem to find answer to this question on this site.
I am wondering if the UNO or Meag can be software programmed to re-set itself and a given period of time?

Thank for the help  :)

johnwasser

You can connect an output pin to the Reset pin and set it LOW to reset the processor.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

retrolefty


Hello
Can't seem to find answer to this question on this site.
I am wondering if the UNO or Meag can be software programmed to re-set itself and a given period of time?

Thank for the help  :)


Yes it can using the watch dog timer facility. Try searching on WDT and you should be able to fine examples. I wouldn't recommend that on mega boards unless you replace the bootloader code for the mega with the latest bootloader version as the bootloader that comes with the board does not handle WDT interrupts correctly.


Lefty

retrolefty


You can connect an output pin to the Reset pin and set it LOW to reset the processor.


No you can't. Upon reset all I/O pins revert to input pins thus removing the 0vdc to the reset pin for a shorter period then the minimum required reset pulse length. The AVR datasheet explicitly advises not to try and use that method. The WDT is easy to use and will properly reset the chip.

Lefty

mntlvr_66

Thanks will try lefty's method.  :)

AlxDroidDev

To do it without software, you can use a RTC like Maxim's DS1337+ . Basically, you program the DS1337+ to generate an interrupt at a given interval or specified time, which would be the RESET signal (actually it will need a transistor to bring RST low when the interrupt happens)

I find this to be a much better approach to WDT, although it is a bit more complex hardware-wise. The reasons is: if you depend entirely on software and the software fails, the Arduino won't reset.
Learn to live: Live to learn.
Showing off my work: http://arduino.cc/forum/index.php/topic,126197.0.html

jroorda

You could also modify John's method to work by making the digital pin trigger a one shot circuit that pulls the reset low.  You can fairly easily configure a 555 to be a one shot (mono-stable) oscillator. 

This is just another way to do this and may be better or worse based on your design.  That said, I think everyone should configure a 555 at least once, so if you haven't done so yet this might be your chance.

A decent place to start:
http://www.instructables.com/id/Make-an-LED-Blaster/step2/Build-the-555-ic-one-shot-timer/

Go Up