need a timer

I'm looking for timer, what I would like is something exactly like a 555, but something I can set for 1 hour, is there a simple chip out there that doe this?

I might be missing something here, but you can just code this into the Arduino:

delay(3600000); //Delay for 1 hour

If you want to do some processing while waiting for the timeout there a number of solutons.:

Have a look at msTimer2: http://www.arduino.cc/playground/Main/MsTimer2
It will call a function after a preset time interval. It uses milliseconds so you would set it to 3600000 for one hour.

If you want to check more than one time interval you can use the DateTime library, available here: http://www.arduino.cc/playground/Code/DateTime

#include <DateTime.h>

unsigned long  time33mins;
unsigned long  time60mins;

void setup(){
  Serial.begin(9600);
  DateTime.sync(0); // start the clock
  time33mins = time60mins = DateTime.now();
}

void  loop(){
  if( DateTime.now() > time33mins + (33 * SECS_PER_MIN) )
  {
    Serial.println("33 minutes has elapsed");
    time33mins = DateTime.now();     
  }
  if( DateTime.now() > time60mins + (60 * SECS_PER_MIN) )
  {
    Serial.println("one hour has elapsed");
    time60mins = DateTime.now();    
  }
}

This sketch prints a message every 33 minutes and every hour. You can add whatever code you want into loop, the checks will always be performed each time the loop repeats.

  1. some of the CMOS/low power timer chips (such as the TLC551 that Adafruit uses in the drawdio) allow much longer delays than are possible with a normal 555. An hour is only 3600 seconds, so an RC time constant of “about” 1000uF and 3.6Mohms would work. Note that this puts you into value ranges where tolerances are not-so-good (1000uF caps tend to have something like -20/+80% tolerances), plus temperature variation, plus voltage dependence, etc. But for controlled circumstances you might get something workable.

  2. I vaguely recall a 555-like timer chip with a built-in digital counter that allowed you to create very long delays from “normal” cap/resistor values. (or was it something with a crystal oscillator?) I couldn’t find the actual part number, but in any case, a normal 555 plus a “normal” digital counter chip will allow the same sort of thing. (eg Loading...)

  3. This is the sort of thing that the cheap, tiny, microcontrollers are being used for these days. A PIC10F or PIC12F chip (8pin dip) can be programmed to generate such delays pretty easily, based on either the calibrated internal clock (moderate accuracy) or and external crystal (higher accuracy.) One of the ATtiny chips could do similarly at slightly higher cost (but still “about $1”)

  4. I’m pretty sure that some of the tiny “clock” chips for computers include an ‘alarm’ function.

  5. in an arduino environment, you can probably achieve a one-hour delay function with more “invisibility” than you thought using only software. Other people have already talked about some of those methods…

The DS1307 library for Arduino supports the alarm function of the chip since few releases back. Maybe that can be used.

mircho, What DS1307 library are you referring to? (DS1307 chip does not have alarm function built in, as other RTCs have.)

Sorry, I was wrong! I just remembered that someone in this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1191209057/60 mentioned alarm support. But 1307 does not have alarm. Other chips have though - like DS1337 or PCF8583, but they are not supported.