• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Arduino 2-Step Programmable Timer Circuit with Independent Output Delay Adjustment

Arduino 2-Step Programmable Timer Circuit with Independent Output Delay Adjustment

Last updated on 28 July 2025 by Admin-Lavi Leave a Comment

This project for Arduino 2-Step Programmable Timer Circuit with Independent Output Delay Adjustment uses Arduino microcontroller to make simple timer.

Not like normal timer with two outputs as this one uses only one output.

It switch between two states.

And each state have delay which we can change for different use.

#include <Arduino.h>

// Define pins
const int outputPin = 9;
const int relayDriverPin = 3;  // Adjust for your relay driver

// Define delay values (in milliseconds)
unsigned long delayTime1 = 5000;
unsigned long delayTime2 = 3000;

// Variables to track timer states
unsigned long previousMillis = 0;
int outputState = LOW;

void setup() {
  pinMode(outputPin, OUTPUT);
  pinMode(relayDriverPin, OUTPUT);

  // Initialize relay driver (if necessary)
  // ...
}

void loop() {
  unsigned long currentMillis = millis();

  if (currentMillis - previousMillis >= delayTime1 + delayTime2) {
    previousMillis = currentMillis;
    outputState = !outputState;
  }

  digitalWrite(outputPin, outputState);
  digitalWrite(relayDriverPin, outputState); // Control relay if used
}

Circuit Working:

Arduino 2-Step Programmable Timer Circuit Diagram with Independent Output Delay Adjustment

Parts List:

ComponentQuantity
Resistor
10k 1/4 watt1
Semiconductors
Arduino Uno Board1
IC 78091
Transistor BC5471
SPDT 12V Relay1
Diode 1N40071
Connector to Arduino1

Arduino Timer and Relay:

Arduino set output pin and relay driver pin if needed.

Inside loop() Arduino check time from last change.

If total time is same or more than both delays added then output switch like HIGH to LOW or LOW to HIGH.

Output pin and relay pin are if used then follow the current output state.

How It Work with 2 Step Timer:

One output pin and one timer are used to make two steps.

Output change between HIGH and LOW.

One full cycle time = delayTime1 + delayTime2.

How to Set Time for Each Step:

Use previousMillis1 and previousMillis2 to track time.

Arduino check time for each delay.

After delayTime1 then output goes HIGH.

After delayTime2 then output goes LOW again.

How to Make Relay Driver with Transistor and Arduino:

  • Gather all the parts as shown in circuit diagram
  • Arduino pin 3 connect to transistor base with 10k resistor.
  • Transistor collector connect to one relay coil pin.
  • Other coil pin goes to +12V.
  • Transistor emitter goes to GND.
  • Relay common pin connect to load.
  • Choose NC or NO relay contact to turn load ON or OFF.
  • Add 1N4007 diode across relay coil pins.
  • Use IC 7809 to give stable 9V to Arduino board.

Conclusion

This Arduino 2-Step Programmable Timer Circuit with Independent Output Delay Adjustment gives easy and flexible way to make 2-step timer using one output.

We can change delay time to set ON and OFF time as needed.

Relay driver help to control big power load with same circuit.

References:

How to generate two signals with time delay?

Filed Under: Arduino Projects, Timer Circuits

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « Battery Status Indicator Circuit using Flashing LED
Next Post: DC Motor Speed Controller Circuit using Arduino »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • Alarm Circuits (30)
  • Amplifier Circuits (67)
  • Arduino Projects (29)
  • Audio Circuits (93)
  • Automobile Circuits (19)
  • Battery Charger Circuits (48)
  • Free Energy (13)
  • Heater and Temperature Controllers (9)
  • Indicator Circuits (38)
  • Inverter Circuits (13)
  • LDR Circuits (13)
  • LED and Lamps (111)
  • Meters and Testers (27)
  • Motor Controllers (18)
  • Oscillator Circuits (32)
  • Power Supply Circuits (91)
  • Remote Control Circuits (6)
  • Security and Protection (23)
  • Sensors and Detectors (71)
  • Solar Circuits (16)
  • Timer Circuits (27)
  • Transistor Circuits (56)
  • Transmitter Circuit (12)
  • Tutorials (4)
  • Water Level Controller (4)

Copyright © 2025 | New Circuit Ideas