Circuit Documentation
Summary of the Circuit
This circuit integrates an HC-SR04 Ultrasonic Sensor with an Arduino UNO microcontroller and an LCD Display 16x4 I2C module. The purpose of the circuit is to measure distances using the ultrasonic sensor and display the results on the LCD. The Arduino UNO serves as the central processing unit, controlling the sensor and managing the communication with the LCD display via the I2C protocol.
Component List
HC-SR04 Ultrasonic Sensor
- Pins: VCC, TRIG, ECHO, GND
- Description: This sensor measures distance by emitting ultrasonic waves and measuring the time taken for the echo to return.
Arduino UNO
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0-A5, SCL, SDA, AREF, D0-D13
- Description: A microcontroller board based on the ATmega328P, widely used for building digital devices and interactive objects that can sense and control objects in the physical world.
LCD Display 16x4 I2C
- Pins: SCL, SDA, VCC, GND
- Description: A 16x4 character LCD display with an I2C interface for displaying text and characters.
Wiring Details
HC-SR04 Ultrasonic Sensor
- VCC: Connected to the 5V output on the Arduino UNO.
- TRIG: Connected to digital pin D9 on the Arduino UNO.
- ECHO: Connected to digital pin D10 on the Arduino UNO.
- GND: Connected to the ground (GND) on the Arduino UNO.
Arduino UNO
- 5V: Provides power to the HC-SR04 Ultrasonic Sensor and the LCD Display 16x4 I2C.
- GND: Common ground for the circuit.
- D9: Connected to the TRIG pin of the HC-SR04 Ultrasonic Sensor.
- D10: Connected to the ECHO pin of the HC-SR04 Ultrasonic Sensor.
- SCL: Connected to the SCL pin of the LCD Display 16x4 I2C.
- SDA: Connected to the SDA pin of the LCD Display 16x4 I2C.
LCD Display 16x4 I2C
- SCL: Connected to the SCL (Serial Clock Line) on the Arduino UNO for I2C communication.
- SDA: Connected to the SDA (Serial Data Line) on the Arduino UNO for I2C communication.
- VCC: Connected to the 5V output on the Arduino UNO.
- GND: Connected to the ground (GND) on the Arduino UNO.
Documented Code
void setup() {
}
void loop() {
}
- File Name: sketch.ino
- Description: This Arduino sketch is the template for the embedded code that will control the HC-SR04 Ultrasonic Sensor and the LCD Display 16x4 I2C. The
setup()
function is intended to initialize the sensor and display, while the loop()
function will contain the main logic for measuring distance and displaying it on the LCD.
Note: The provided code is a template and does not contain the actual implementation for controlling the HC-SR04 Ultrasonic Sensor or the LCD Display 16x4 I2C. The implementation details need to be added to the setup()
and loop()
functions.