A 555 Watchdog for the Arduino - resetting the 555 timer

Hey, guys, I'm designing a Watchdog for my Arduino using the famous 555 integrated circuit.
I wish to connect the output of the Watchdog to the RESET pin of the Arduino, which is triggered when it is LOW.

Basically what I want is a 555 timer in Astable mode with a Mark Time (HIGH output duration) of about 10 seconds (which is the maximum time the Arduino has to execute one loop) and a Space Time (LOW output duration) of about 0.3 seconds (which, I believe, is enough LOW time to trigger the RESET on the Arduino).

The base schematic is the first one that appears in this site.
The external components are:
C = 0.1mF = 100uF
R1 = 150 kOhm
R2 = 4.3 kOhm

Now, here's my question:
How can I reset the Watchdog? Do I simply have to connect the RESET pin of the 555 to a digital output pin of the Arduino and simply make the code like this:

void setup() {
  digitalWrite(WatchdogResetPin, HIGH);
}
void loop() {
  digitalWrite(WatchdogResetPin, HIGH);  // restart the Watchdog timing
  
  (...)

  digitalWrite(WatchdogResetPin, LOW);  // reset the Watchdog, making it restart counting the 10 seconds of its HIGH output
  delay(5);  // just to give it time to receive the pulses and stuff...
}

Is this it?

Thanks!

What you could do is hookup a transistor to the power pins of the 555, have the arduino control this. 555 restarts on power up, so it will start counting 10 seconds.

Good Luck!

Hey, guys, I'm designing a Watchdog for my Arduino using the famous 555 integrated circuit

Why?
Is there something you don't like about the built-in one?

baum:
What you could do is hookup a transistor to the power pins of the 555, have the arduino control this. 555 restarts on power up, so it will start counting 10 seconds.

Good Luck!

Do you mean something like the image attached?
And the code would be

void setup() {
  digitalWrite(WatchdogResetPin7, HIGH);
}
void loop() {
  digitalWrite(WatchdogResetPin7, HIGH);  // restart the Watchdog timing, turning on the 555 chip
  
  (...)

  digitalWrite(WatchdogResetPin7, LOW);  // reset the Watchdog by turning off the 555 chip
  delay(5);  // just to give it time to receive the pulses and stuff...
}

That's it???
This guy empties the Capacitor instead of turning the 555 chip off.
I don't know, but it just seems more reliable to me.
Do you have any idea on how I can do this?

AWOL:

Hey, guys, I'm designing a Watchdog for my Arduino using the famous 555 integrated circuit

Why?
Is there something you don't like about the built-in one?

The built-in Watchdog is supposed to be bad. The new Optiboot bootloader featured in the new Arduino Unos has a Watchdog that actually works, but I don't have that bootloader.
Also, hardware Watchdogs are always more reliable/better, right? That's what I've read...

The code made by the Arduino may be bad, but there is no problem with the built in atmega watchdog, I think that it is disabled in the older fuses settings, but you can fix that.

The built-in Watchdog is supposed to be bad

Don't know why, I've used it many times.

hardware Watchdogs are always more reliable/better, right?

The internal WD is hardware, it's just internal :slight_smile:

In both cases there is still the possibility of "kicking the dog" even when the code is bad.


Rob

Well, even if some people say the Arduino's built-in WDT will eventually cause an infinite reset loop and others say it won't, I still would like to finish this simple 555 timer.
My only problem is the fact that I've never understood the RESET pin of the 555 (and other pins, actually), which means I don't know how to use it or if I can use it for this.
I would also like to know how I can empty the Capacitor, like in the link I posted above.

So... to keep the replies spot-on on the topic, forget the Watchdog. Just tell me how to do the above. :stuck_out_tongue:

Thanks for the above users' replies, though!

The built-in Watchdog is supposed to be bad....

Also, hardware Watchdogs are always more reliable/better, right?

And the AVR's built-in one is implemented in ... what?
Marzipan?

AWOL:

The built-in Watchdog is supposed to be bad....

Also, hardware Watchdogs are always more reliable/better, right?

And the AVR's built-in one is implemented in ... what?
Marzipan?

Dude, chill out, it's not like I'm an expert on anything. I'm just saying what I've learned from reading countless other topics about Watchdogs on the Arduino Forum. Almost everyone says it isn't a path one should viably follow - even with Optiboot.

I just want to reset a 555 astable circuit with minimal complication. baum told me I could use a transistor to turn on/off the 555 chip using the Arduino. That sounds great, but I'm not sure if the way I think I can do it is right (the schematic I attached above).
I'm also not sure if reseting the 555's timing capacitor would be even better than turning off the 555 itself.
These are my questions. Please stop the "Arduino's built-in Watchdog" discussion - I'm not interested in going that way.

Happy face for you: :slight_smile:

Dude, chill out

Just trying to save you time, effort and hair-loss.

Smiley face back atchya.

This guy empties the Capacitor instead of turning the 555 chip off.

"This guy" is Jon Oxer, here's a member here (user "Jonathan Oxer"), he's right into open source so maybe he will divulge the secret.


Rob

From my reading of the datasheet, the best you can hope for is to continually reset the 555 to hold its output low - then run it thru an inverter (such as a transistor like in your picture, with the collector pulled high).
Set it up in astable mode, with Reset connected to an arduino output pin. See if you can keep the output low by resetting within your 10 second window.
If that works, add the inverter and drive your arduino reset line.

This seems to be solved nicely: GitHub - mattbornski/Arduino-Watchdog-Circuit: The current Arduino library has bugs in the freelist implementation, which can lead to difficult to debug system hangs. For maximum reliability of my home automation projects, I built an external hardware watchdog.

An ATmega-based application that needs to be reliable, to the extent that a watchdog timer is necessary, would use the built in watchdog and would not be based on the Arduino IDE and its supporting software. Arduino is a playground, for learning and fun.

I think it comes down to - either you study the MCU datasheet and understand how the watchdog works, how to set the fuses and the relevant registers, and perhaps verify what the behaviour of the bootloader is - or you sit and whinge.

The IDE has nothing to do with it, either good nor bad. The bootloader is simply a piece of code - which can in any case be bypassed by loading code via ISP - which happens to intercept the reset vector. Once it passes on to the main code, it has no effect so you are free to execute whatever you wish to code.

The new Optiboot bootloader featured in the new Arduino Unos has a Watchdog that actually works, but I don't have that bootloader.

You can buy it for $5:
OPTIBOOT BOOTLOADER

Hi all,
I succesfully build this:GitHub - mattbornski/Arduino-Watchdog-Circuit: The current Arduino library has bugs in the freelist implementation, which can lead to difficult to debug system hangs. For maximum reliability of my home automation projects, I built an external hardware watchdog., replacing R1 with a trimmer to set the reset timeout.
I have an hardware doubt, every heartbeat take 300ms to be completed, I need this 300ms!. It is possible to 'delegate' this 300ms to the hardware?, perhaps inserting a condensator in the heartbeat line or some else?.

Thanks in advance

Lenny.

I have an hardware doubt, every heartbeat take 300ms to be completed, I need this 300ms!. It is possible to 'delegate' this 300ms to the hardware?,

Can you explain what you mean by :

an hardware doubt

and,

'delegate' this 300ms to the hardware?

Are you asking if the arduino can perform the function currently being performed by your 555 circuit ?

Have you Googled "Arduino Watchdog Timer" ?

I haven't done anything with this but it would seem logical to assume that is what it is for.

In defense of the external watchdog. The internal watchdog timer doesn't pull the reset pin low when it trips. Any shields that would normally be reset via the reset pin will not reset via the wdt. An external watchdog can pull the reset pin on all shields low. In my case I have a SeeedStudio Ethernet shield that for some reason has to be reset after power up and sometimes after a loss of connectivity. My internal watchdog was working great but I could never re-connect to my network because the shield was not resetting.