Circuit Documentation
Summary
This circuit is designed to interface an Arduino UNO with multiple peripherals including two HC-SR04 Ultrasonic Distance Sensors, a 2-channel Relay Module, a 20x4 LCD Display with I2C interface, and an LED bulb AC. The Arduino UNO serves as the central processing unit, controlling the sensors, displaying information on the LCD, and switching the LED bulb using the relay module based on the inputs from the ultrasonic sensors. The circuit is powered by the Arduino UNO's 5V and GND pins, with the relay module additionally connected to the Vin for higher voltage requirements.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- Provides I/O pins and power to the circuit
HC-SR04 Ultrasonic Distance Sensor (Wokwi Compatible)
- Two instances of ultrasonic sensors used for distance measurement
- Each sensor has VCC, TRIG, ECHO, and GND pins
Relay Module 2 Channel
- Module with two relays to control high power devices
- Has pins for GND, IN1, IN2, VCC, NC1, COM, NO1, NC2, and NO2
LCD Display 20x4 I2C
- Alphanumeric liquid crystal display with I2C interface
- Has pins for SCL, SDA, VCC, and GND
LED bulb AC / Bombillo AC
- AC-powered LED bulb
- Has two pins: + (Live) and - (Neutral)
AC wall plug point
- Provides AC power to the circuit
- Has three pins: E (Earth), N (Neutral), and L (Live)
Wiring Details
Arduino UNO
- 5V pin provides power to both HC-SR04 sensors' VCC pins
- GND pin is connected to the GND pins of both HC-SR04 sensors, the LCD Display, and the Relay Module
- A0 pin is connected to the ECHO pin of the first HC-SR04 sensor
- A1 pin is connected to the TRIG pin of the first HC-SR04 sensor
- A2 pin is connected to the ECHO pin of the second HC-SR04 sensor
- A3 pin is connected to the TRIG pin of the second HC-SR04 sensor
- A4 (SDA) pin is connected to the SDA pin of the LCD Display
- A5 (SCL) pin is connected to the SCL pin of the LCD Display
- D8 pin is connected to the IN2 pin of the Relay Module
- Vin pin provides power to the VCC pin of the Relay Module
HC-SR04 Ultrasonic Distance Sensor (Wokwi Compatible)
- VCC pin connected to 5V from Arduino UNO
- GND pin connected to GND from Arduino UNO
- TRIG and ECHO pins connected to corresponding I/O pins on Arduino UNO
Relay Module 2 Channel
- GND pin connected to GND from Arduino UNO
- VCC pin connected to Vin from Arduino UNO
- IN2 pin connected to D8 on Arduino UNO
- NC2 pin connected to the + pin of the LED bulb AC
- COM pin connected to the N pin of the AC wall plug point
LCD Display 20x4 I2C
- SCL pin connected to A5 (SCL) on Arduino UNO
- SDA pin connected to A4 (SDA) on Arduino UNO
- VCC pin connected to 5V from Arduino UNO
- GND pin connected to GND from Arduino UNO
LED bulb AC / Bombillo AC
- pin connected to NC2 on Relay Module
- pin connected to L on AC wall plug point
AC wall plug point
- N pin connected to COM on Relay Module
- L pin connected to - on LED bulb AC
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
}
void loop() {
}
Note: The provided code is a template and does not contain any functional code. It needs to be populated with the logic to control the ultrasonic sensors, relay module, and LCD display based on the specific requirements of the circuit's application.