Arduino Nano-Based Home Automation System with RTC and I2C LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino Nano microcontroller interfacing with a DS1302 RTC module, a 16x2 I2C LCD display, and a 4-channel relay module. The Arduino Nano controls the relays and communicates with the RTC and LCD to display time and other information.
Component List
Arduino Nano
- Description: A compact microcontroller board based on the ATmega328P.
- Pins: D1/TX, D0/RX, RESET, GND, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, VIN, 5V, A7, A6, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13/SCK
DS1302 RTC
- Description: A real-time clock module for keeping track of time.
- Pins: VCC, GND, CLK, DATA, RST
16x2 I2C LCD
- Description: A 16x2 character LCD display with I2C interface.
- Pins: GND, VCC, SDA, SCL
Relay 4 Channel 5v
- Description: A 4-channel relay module for controlling high-power devices.
- Pins: GND, IN1, IN2, IN3, IN4, VCC, COM1, COM2, COM3, COM4, NO1, NO2, NO3, NO4, NC1, NC2, NC3, NC4
Comment
- Description: Placeholder for comments in the circuit.
- Pins: None
Wiring Details
Arduino Nano
GND connected to:
- Relay 4 Channel 5v (GND)
- DS1302 RTC (GND)
- 16x2 I2C LCD (GND)
D2 connected to:
- Relay 4 Channel 5v (IN1)
D3 connected to:
- Relay 4 Channel 5v (IN2)
D4 connected to:
- Relay 4 Channel 5v (IN3)
D5 connected to:
- Relay 4 Channel 5v (IN4)
D10 connected to:
- DS1302 RTC (RST)
D11/MOSI connected to:
- DS1302 RTC (DATA)
D12/MISO connected to:
- DS1302 RTC (CLK)
5V connected to:
- DS1302 RTC (VCC)
- 16x2 I2C LCD (VCC)
- Relay 4 Channel 5v (VCC)
A5 connected to:
- 16x2 I2C LCD (SCL)
A4 connected to:
- 16x2 I2C LCD (SDA)
DS1302 RTC
GND connected to:
- Arduino Nano (GND)
VCC connected to:
- Arduino Nano (5V)
CLK connected to:
- Arduino Nano (D12/MISO)
DATA connected to:
- Arduino Nano (D11/MOSI)
RST connected to:
- Arduino Nano (D10)
16x2 I2C LCD
GND connected to:
- Arduino Nano (GND)
VCC connected to:
- Arduino Nano (5V)
SDA connected to:
- Arduino Nano (A4)
SCL connected to:
- Arduino Nano (A5)
Relay 4 Channel 5v
GND connected to:
- Arduino Nano (GND)
VCC connected to:
- Arduino Nano (5V)
IN1 connected to:
- Arduino Nano (D2)
IN2 connected to:
- Arduino Nano (D3)
IN3 connected to:
- Arduino Nano (D4)
IN4 connected to:
- Arduino Nano (D5)
Code Documentation
Arduino Nano Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Arduino Nano. The setup() function is where you initialize your components and settings, and the loop() function is where the main logic of your program runs repeatedly.