Arduino UNO Based Environmental Monitoring System with DHT22, Ultrasonic Sensor, and I2C LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is designed around an Arduino UNO microcontroller and includes a variety of sensors and output devices. The components include a DHT22 temperature and humidity sensor, an HC-SR04 ultrasonic distance sensor, a buzzer module, and a 16x2 I2C LCD for display. The Arduino UNO serves as the central processing unit, interfacing with the sensors and output devices to perform tasks such as environmental monitoring and distance measurement, with the capability to provide visual feedback and audible alerts.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D0-D13.
DHT22
- Description: A digital temperature and humidity sensor.
- Pins: + (Power), Out (Signal), - (Ground).
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic module used for measuring distance.
- Pins: VCC (Power), TRIG (Trigger), ECHO (Echo), GND (Ground).
Buzzer Module
- Description: An electronic buzzer for audible alerts.
- Pins: GND (Ground), Vcc (Power), I/O (Signal Input).
16x2 I2C LCD
- Description: A liquid crystal display with an I2C interface.
- Pins: GND (Ground), VCC (Power), SDA (Data Line), SCL (Clock Line).
Wiring Details
DHT22
- Power: Connected to the 3.3V pin on the Arduino UNO.
- Signal Out: Connected to the D7 pin on the Arduino UNO.
- Ground: Shared with the 5V rail, connected to the GND pin on the Arduino UNO.
HC-SR04 Ultrasonic Sensor
- VCC: Connected to the 5V pin on the Arduino UNO.
- TRIG: Connected to the D9 pin on the Arduino UNO.
- ECHO: Connected to the D8 pin on the Arduino UNO.
- GND: Shared with the GND rail, connected to the GND pin on the Arduino UNO.
Buzzer Module
- Vcc: Connected to the 5V pin on the Arduino UNO.
- I/O: Connected to the D11 pin on the Arduino UNO.
- GND: Shared with the GND rail, connected to the GND pin on the Arduino UNO.
16x2 I2C LCD
- VCC: Connected to the 5V pin on the Arduino UNO.
- GND: Shared with the GND rail, connected to the GND pin on the Arduino UNO.
- SDA: Connected to the A4 pin on the Arduino UNO.
- SCL: Connected to the A5 pin on the Arduino UNO.
Documented Code
The code for the Arduino UNO microcontroller is structured with a setup() function, which runs once at the start, and a loop() function, which runs repeatedly, forming the main part of the program.
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
The provided code is a template with empty setup() and loop() functions. To complete the implementation, code for initializing the components and handling their interactions would need to be added within these functions. For example, initializing the DHT22 sensor, triggering and reading the HC-SR04 sensor, driving the buzzer, and displaying information on the 16x2 I2C LCD.