Pages: [1]   Go Down
Author Topic: A 555 Watchdog for the Arduino - resetting the 555 timer  (Read 3073 times)
0 Members and 1 Guest are viewing this topic.
Portugal
Offline Offline
Newbie
*
Karma: 0
Posts: 34
This text is personal. Aquire a Gold account to read it.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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!
« Last Edit: March 12, 2011, 10:46:01 am by pedrotome » Logged

Connecticut
Offline Offline
Edison Member
*
Karma: 16
Posts: 1216
RTFD (Datasheet in our case)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24322
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

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

Portugal
Offline Offline
Newbie
*
Karma: 0
Posts: 34
This text is personal. Aquire a Gold account to read it.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* This.png (51.43 KB, 2463x1360 - viewed 110 times.)
« Last Edit: March 11, 2011, 07:18:34 pm by pedrotome » Logged

Portugal
Offline Offline
God Member
*****
Karma: 5
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8437
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Portugal
Offline Offline
Newbie
*
Karma: 0
Posts: 34
This text is personal. Aquire a Gold account to read it.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24322
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

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

Portugal
Offline Offline
Newbie
*
Karma: 0
Posts: 34
This text is personal. Aquire a Gold account to read it.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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: smiley
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24322
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Dude, chill out
Just trying to save you time, effort and hair-loss.

Smiley face back atchya.
Logged

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

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8437
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 437
Posts: 23695
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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.

Pages: [1]   Go Up
Jump to: