Arduino UNO-Based Smart Home Automation with Wi-Fi and Real-Time Clock
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates an Arduino UNO microcontroller with various sensors and modules, including an Ultrasonic Sensor, a Micro Servo, an RTC DS3231, an LCD screen, and an ESP-8266 Controller. The circuit is designed to perform various tasks such as distance measurement, timekeeping, display output, and wireless communication.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
Ultrasonic Sensor
- Description: A sensor used to measure distance by using ultrasonic waves.
- Pins: +VCC, Trigger, Echo, GND
Micro Servo 9G
- Description: A small servo motor used for precise control of angular position.
- Pins: GND, +5V, PWM
RTC DS3231
- Description: A real-time clock module with an I2C interface.
- Pins: 32K, SQW, SCL, SDA, VCC, GND
LCD screen 16x2 I2C
- Description: A 16x2 character LCD display with an I2C interface.
- Pins: SCL, SDA, VCC, GND
ESP-8266 Controller
- Description: A Wi-Fi module used for wireless communication.
- Pins: A0, RSV, SD3, SD5, SD1, CMD, D0, D1, D2, D3, D4, 3V3, GND, D5, D6, SD0, CLK, RST, EN, D7, D8, RX, TX, Vin, 5V
Wiring Details
Arduino UNO
A4 connected to:
- RTC DS3231 (SDA)
- LCD screen 16x2 I2C (SDA)
A5 connected to:
- RTC DS3231 (SCL)
- LCD screen 16x2 I2C (SCL)
5V connected to:
- Ultrasonic Sensor (+VCC)
- RTC DS3231 (VCC)
- LCD screen 16x2 I2C (VCC)
- Micro Servo 9G (+5V)
GND connected to:
- Ultrasonic Sensor (GND)
- RTC DS3231 (GND)
- LCD screen 16x2 I2C (GND)
- Micro Servo 9G (GND)
- ESP-8266 Controller (GND)
3.3V connected to:
- ESP-8266 Controller (3V3)
D9 connected to:
- Micro Servo 9G (PWM)
D7 connected to:
- Ultrasonic Sensor (Trigger)
D6 connected to:
- Ultrasonic Sensor (Echo)
D1 connected to:
- ESP-8266 Controller (RX)
D0 connected to:
- ESP-8266 Controller (TX)
Ultrasonic Sensor
+VCC connected to:
- Arduino UNO (5V)
Trigger connected to:
- Arduino UNO (D7)
Echo connected to:
- Arduino UNO (D6)
GND connected to:
- Arduino UNO (GND)
Micro Servo 9G
GND connected to:
- Arduino UNO (GND)
+5V connected to:
- Arduino UNO (5V)
PWM connected to:
- Arduino UNO (D9)
RTC DS3231
SDA connected to:
- Arduino UNO (A4)
SCL connected to:
- Arduino UNO (A5)
VCC connected to:
- Arduino UNO (5V)
GND connected to:
- Arduino UNO (GND)
LCD screen 16x2 I2C
SDA connected to:
- Arduino UNO (A4)
SCL connected to:
- Arduino UNO (A5)
VCC connected to:
- Arduino UNO (5V)
GND connected to:
- Arduino UNO (GND)
ESP-8266 Controller
3V3 connected to:
- Arduino UNO (3.3V)
GND connected to:
- Arduino UNO (GND)
RX connected to:
- Arduino UNO (D1)
TX connected to:
- Arduino UNO (D0)
Documented Code
Arduino UNO 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 UNO. The setup() function is where you initialize your components and settings, and the loop() function is where you place the main code that runs repeatedly.