Go Down

Topic: A 555 Watchdog for the Arduino - resetting the 555 timer (Read 4 times) previous topic - next topic

pedrotome

Mar 11, 2011, 08:00 pm Last Edit: Mar 12, 2011, 04:46 pm by pedrotome Reason: 1
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:
Code: [Select]

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!

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!

AWOL

Quote
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?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

pedrotome

#3
Mar 12, 2011, 01:15 am Last Edit: Mar 12, 2011, 01:18 am by pedrotome Reason: 1

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
Code: [Select]

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?



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

Senso

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.

Graynomad

Quote
The built-in Watchdog is supposed to be bad

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

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

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

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

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

pedrotome

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. :p

Thanks for the above users' replies, though!

AWOL

Quote
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?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

pedrotome


Quote
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: :)

AWOL

Quote
Dude, chill out

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

Smiley face back atchya.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Graynomad

Quote
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
Rob Gray aka the GRAYnomad www.robgray.com

CrossRoads

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.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Go Up