Arduino UNO Based Ultrasonic Distance Measurement with LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates an Arduino UNO microcontroller with an LCD I2C display and an HC-SR04 ultrasonic sensor. The Arduino UNO serves as the central processing unit, controlling the LCD display via the I2C communication protocol and interfacing with the ultrasonic sensor to measure distances. The LCD display is used to output information, while the ultrasonic sensor is used to detect objects and measure the distance to them. The circuit is powered by the Arduino UNO's 5V output, which is distributed to both the LCD display and the ultrasonic sensor.
Component List
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Purpose: Acts as the central processing unit for the circuit, controlling the LCD display and reading data from the ultrasonic sensor.
LCD I2C Display
- Description: A liquid crystal display with an I2C interface for communication.
- Purpose: Displays information such as distance measurements from the ultrasonic sensor.
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic ranging module that provides 2cm to 400cm non-contact measurement functionality.
- Purpose: Measures the distance to objects by emitting ultrasonic waves and timing how long it takes for the echo to return.
Wiring Details
Arduino UNO
- 5V supplies power to the LCD I2C Display and HC-SR04 Ultrasonic Sensor.
- GND is connected to the ground pins of the LCD I2C Display and HC-SR04 Ultrasonic Sensor to complete the power circuit.
- A4 (SDA) is connected to the SDA pin of the LCD I2C Display for I2C data communication.
- A5 (SCL) is connected to the SCL pin of the LCD I2C Display for I2C clock communication.
- D9 is connected to the ECHO pin of the HC-SR04 Ultrasonic Sensor to receive the echo signal.
- D8 is connected to the TRIG pin of the HC-SR04 Ultrasonic Sensor to trigger the ultrasonic pulse.
LCD I2C Display
- GND connected to the ground of the Arduino UNO.
- VCC connected to the 5V output of the Arduino UNO.
- SDA connected to the A4 pin of the Arduino UNO.
- SCL connected to the A5 pin of the Arduino UNO.
HC-SR04 Ultrasonic Sensor
- VCC connected to the 5V output of the Arduino UNO.
- GND connected to the ground of the Arduino UNO.
- TRIG connected to the D8 pin of the Arduino UNO.
- ECHO connected to the D9 pin of the Arduino UNO.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Additional Notes (documentation.txt)
No additional code documentation was provided for this file.