Pages: [1]   Go Down
Author Topic: 10 sec delay  (Read 703 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have my arduino controlling a relay what i need is when i arduino turns the relay off to leave the relay on for 10 secs i was thinkof using a 555 timer or a large capactior with transistior just wondering if anyone could give me some advice on this or even a schematic

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

The simple ways is

digitalWrite (relayPin, LOW);  // assumes a transistor driving the relay and wired in the "normal" fashion
delay (10000);
digitalWrite (relayPin, HIGH);

and if there's nothing else for the program to do that's as good a way as any.

If you want to do other things during the 10 seconds use millis() to check the time in a loop.


Rob Gray aka the GRAYnomad

Red Sea, Saudi Arabia
Offline Offline
God Member
Karma: 12
Posts: 579
..On The Red Sea
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If that is the ONLY function you need, a 555 is fine. Run the whole thing from 5V or 9V or 12V whatever the coil voltage of your relay is, use one resistor and transistor to drive relay.

Google "555 Relay" and you'll have an overwhelming amount of information.... 


Regards, Terry King  ..On the Red Sea at  LEARN! DO! (Arduino Boards, Sensors, Parts @

Pages: [1]   Go Up
Jump to: