Relay ON and OFF circuit using Arduino nano and LCD in proteus

Relay ON and OFF circuit using Arduino nano and LCD in proteus

In this article we will learn how to make Relay ON & OFF circuit in proteus using Arduino nano and LCD display.
In the last post we will learn how to Interface ESP8266 and Arduino IOT base Air Quality monitor in proteus. You can visit our website,
I hope you appreciate my work, let’s discuss about today’s project.

Components:

  1. Arduino nano
  2. LCD display
  3. LED
  4. Transistor (BC547)
  5. Diod (4007)
  6. Resistor (10k)
  7. Jumper wires

Diagram of this project is below:

Relay ON and OFF circuit using Arduino nano and LCD in proteus
Relay ON and OFF circuit using Arduino nano and LCD in proteus

Construction of Relay ON and OFF circuit using Arduino nano and LCD in proteus

  • Connect VDD pin of LCD display with +ve
  • Connect VSS, VEE, & RW pins of LCD display with each other and then connect them with GND
  • Connect D2 pin of Arduino with the pin D7 of LCD display
  • Connect D3 pin of Arduino with pin D6 of LCD display
  • Connect D4 pin of Arduino with pin D5 of LCD display
  • Connect D5 pin of Arduino with pin D4 of LCD display
  • Connect D6 pin of Arduino with pin E of LCD display
  • Connect D7 pin of Arduino with pin RS of LCD display
  • Connect D8 pin of Arduino with one side of resistor 10k
  • Connect 2nd side of resistor 10k with signal pin of transistor
  • Connect ammeter pin of transistor with GND
  • Connect collector pin of transistor with one terminal of Relay through +ve side of Diod
  • Connect 2nd terminal of Relay with –ve side of diod and then connect them with +ve
  • Common 3rd and 4th terminal of Relay and them connect them with +ve
  • Connect 5th terminal of Relay with +ve side of LED
  • Connect –ve side of LED with GND

Hardware Image..

Relay ON and OFF circuit using Arduino nano and LCD in proteus
Relay ON and OFF circuit using Arduino nano and LCD in proteus

 Working….

A relay ON and OFF circuit using an Arduino Nano and an LCD can be created to control an external electrical load, such as a lamp or a fan, through a relay. The Arduino Nano will be used to send control signals to the relay module, and the LCD will display the status of the relay (ON or OFF)

Applications…..

  1. Home Automation
  2. Irrigation System
  3. Security Systems
  4. Aquarium Control
  5. Industrial Automation

Advantages…..

  1. Remote Control
  2. Automation
  3. Customization
  4. Feedback and Monitoring
  5. Low Cost

program images

 

Relay ON and OFF circuit using Arduino nano and LCD in proteus
Relay ON and OFF circuit using Arduino nano and LCD in proteus
Relay ON and OFF circuit using Arduino nano and LCD in proteus
Relay ON and OFF circuit using Arduino nano and LCD in proteus
Relay ON and OFF circuit using Arduino nano and LCD in proteus
Relay ON and OFF circuit using Arduino nano and LCD in proteus

Actual Program code:

#include <LiquidCrystal.h>

// Initialize the LCD library
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

// Define the relay control pin
int relayPin = 8;

void setup() {
// Initialize the LCD
lcd.begin(16, 2);
lcd.print(“Relay Control”);

// Set the relay pin as an OUTPUT
pinMode(relayPin, OUTPUT);
// Initialize the relay to OFF
digitalWrite(relayPin, LOW);
}

void loop() {
// Display status on LCD
lcd.setCursor(0, 1);
lcd.print(“Status: “);

// Read the state of the relay
int relayState = digitalRead(relayPin);

if (relayState == HIGH) {
lcd.print(” ON “);
} else {
lcd.print(“OFF “);
}

// Check for user input
if (Serial.available() > 0) {
char command = Serial.read();
if (command == ‘1’) {
digitalWrite(relayPin, HIGH); // Turn the relay ON
} else if (command == ‘0’) {
digitalWrite(relayPin, LOW); // Turn the relay OFF
}
}
}