Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO Controlled Sequential Relay Activation System

Image of Arduino UNO Controlled Sequential Relay Activation System

Circuit Documentation

Summary

This circuit is designed to control eight 1-Channel 5V Relay Modules using an Arduino UNO microcontroller and a single pushbutton. When the pushbutton is pressed, each relay is activated sequentially for 150 seconds. The relays can be used to control various devices, such as lights or motors, that require higher power than the Arduino can provide directly.

Component List

Arduino UNO

  • Microcontroller board based on the ATmega328P
  • 14 digital input/output pins (of which 6 can be used as PWM outputs)
  • 6 analog inputs
  • A 16 MHz quartz crystal
  • A USB connection
  • A power jack
  • An ICSP header
  • A reset button

1 Channel 5V Relay Module (x8)

  • Single-channel relay module capable of controlling high power loads
  • Operating Voltage: 5V
  • Control Signal: TTL level
  • Normally Open (N.O.), Common (COM), and Normally Closed (N.C.) terminals for connecting the controlled circuit

Pushbutton

  • A simple switch mechanism for controlling some aspect of a machine or a process
  • Normally open, momentary switch

Wiring Details

Arduino UNO

  • GND: Connected to the GND of all relay modules and one terminal of the pushbutton
  • Digital Pins (D4-D11): Each connected to the "IN" pin of a separate relay module
  • Digital Pin (D13): Connected to one terminal of the pushbutton

1 Channel 5V Relay Module

  • VCC+: (Not specified in the net list, assumed to be connected to a 5V supply)
  • VCC- (GND): Connected to the GND of the Arduino UNO
  • IN: Connected to a digital pin on the Arduino UNO (D4-D11)
  • N.O.: (Not specified in the net list, assumed to be connected to the load)
  • COM: (Not specified in the net list, assumed to be connected to the load)
  • N.C.: (Not specified in the net list, typically left unconnected or connected to an alternative load)

Pushbutton

  • Pin 1: Connected to Digital Pin (D13) on the Arduino UNO
  • Pin 2: Connected to GND on the Arduino UNO

Documented Code

/*
 * This Arduino sketch controls 8 relays using a pushbutton. When the button
 * is pressed, each relay is activated sequentially for 150 seconds.
 */

#define PUSHBUTTON_PIN 13

int relayPins[] = {11, 10, 9, 8, 7, 6, 5, 4};

void setup() {
  pinMode(PUSHBUTTON_PIN, INPUT_PULLUP);
  for (int i = 0; i < 8; i++) {
    pinMode(relayPins[i], OUTPUT);
    digitalWrite(relayPins[i], LOW);
  }
}

void loop() {
  if (digitalRead(PUSHBUTTON_PIN) == LOW) {
    for (int i = 0; i < 8; i++) {
      digitalWrite(relayPins[i], HIGH);
      delay(150000); // Activate relay for 150 seconds
      digitalWrite(relayPins[i], LOW);
    }
  }
}

Note: The code provided assumes that the pushbutton is connected to pin D13 and the relays are connected to pins D4 to D11. The INPUT_PULLUP mode is used for the pushbutton, which means the button should be connected between the pin and ground. The relays are activated by setting the corresponding pin to HIGH.