ATTiny Watchdog


Author: Dave
Date: 01.09.16 - 5:48am



for my IOT humidor project I needed to use a long external watchdog to catch hangs in the Wi-Fi chip,

I've been using a commercially available, yet somewhat expensive watchdog and thought I would try my hand at creating my own. I found two main schools of thought on this, you either use a 555 timer chip and an RC time curve to set the timeout delay, or you use another small micro controller.



Being primarily a software guy, I decided to go with the minimal ATTiny85 chip route. This micro controller will cost you about three dollars delivered and is a single-chip. It is powered off of the parent Arduino, and requires very little wiring to make it work. All the components can be put on board and brought out to a four header strip to interface with the parent device. Below is a quick circuit diagram of what I came up with:



in order to configure the timeout delay, there is an on board pot that you can set. Timeout delay by default is between 9 and 90 seconds. you can also set a jumper and change this range to be 15sec to 2.5 minutes.. The pot can be arbitrarily adjusted at runtime. LED blink codes positively notify you of both the real time delay set, and the input that is receiving.

Note: The jumper time multiplier has been sacrificed in favor of adding a software disable line. Just set this pin LOW to disable the dog. You can ignore this pin is you dont need to use a disable feature.

The blink codes are as follows:
  • if it detects the pot value has changed then it will flash the led 4 times quickly, followed by an ON duration of the delay set
  • everytime it receives a pat, the led will give a brief flicker
  • when resetting the arduino it will give two slow flashs
you can find the project and all of its associated files in the github repository here.

Links to resources on how to program an ATTiny from the Arduino IDE using just an UNO are included the tiny source. This project is elegantly simple in terms of the source code, wiring, components, configuration, and cost. This is exactly what I was going after.








Comments: (0)

 
Leave Comment:
Name:
Email: (not shown)
Message: (Required)
Math Question: 52 + 89 = ? followed by the letter: B 



About Me
More Blogs
Main Site
Posts:
2019 (1)
     Electronic dividing head
2018 (1)
     Thoughts on next RC blower
2017 (4)
     Crawl Space Forklift
     Remote Control Snowblower
     Servo control for linear actuator
     Arduino RC motor control
2016 (6)
     Keyboard Emulation
     Arduino w/ win2k
     Arduino Snowblower chute control
     Attic Fan Remote Control
     Robotic Arm
     ATTiny Watchdog
2015 (9)
     ESP-LINK Huzzah
     IoT Humidor v2
     Arduino Bugs
     Arduino INI library
     Arduino Yun
     long watchdog
     Arduino runtime config
     CNC Rotary table
     AutoWater humidifier
2014 (1)
     Humidor AutoWater
2013 (1)
     KeyPad Bruteforcer