Arduino UNO Controlled Ultrasonic Distance Measurement with Servo Actuation and LCD Feedback
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit integrates an Arduino UNO microcontroller with a Tower Pro SG90 servo motor, an HC-SR04 Ultrasonic Sensor, and an LCM1602 IIC LCD module. The Arduino UNO serves as the central processing unit, controlling the servo motor and reading distance measurements from the ultrasonic sensor. The LCD module is used to display information or readings from the sensor. The circuit is powered by the Arduino's 5V output, which is distributed to the other components. Communication with the LCD module is established via the I2C protocol using the SDA and SCL lines.
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
Tower Pro SG90 Servo
- Description: A small and lightweight servo motor suitable for RC vehicles and robotics.
- Pins: Signal, +5V, GND
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic distance sensor capable of measuring distances from 2cm to 400cm.
- Pins: VCC, TRIG, ECHO, GND
LCM1602 IIC LCD Module
- Description: A 16x2 character LCD display with an I2C interface.
- Pins: GND, VCC, SDA, SCL, and others for direct LCD interfacing (not used in I2C mode)
Wiring Details
Arduino UNO
- 5V: Provides power to the LCM1602 IIC, HC-SR04 Ultrasonic Sensor, and Tower Pro SG90 servo.
- GND: Common ground for LCM1602 IIC, HC-SR04 Ultrasonic Sensor, and Tower Pro SG90 servo.
- A4 (SDA): Connected to the SDA pin of the LCM1602 IIC for I2C communication.
- A5 (SCL): Connected to the SCL pin of the LCM1602 IIC for I2C communication.
- D10: Connected to the ECHO pin of the HC-SR04 Ultrasonic Sensor.
- D9: Connected to the TRIG pin of the HC-SR04 Ultrasonic Sensor.
- D8: Connected to the Signal pin of the Tower Pro SG90 servo.
Tower Pro SG90 Servo
- Signal: Connected to pin D8 on the Arduino UNO.
- +5V: Receives power from the Arduino UNO's 5V pin.
- GND: Connected to the common ground on the Arduino UNO.
HC-SR04 Ultrasonic Sensor
- VCC: Receives power from the Arduino UNO's 5V pin.
- TRIG: Connected to pin D9 on the Arduino UNO.
- ECHO: Connected to pin D10 on the Arduino UNO.
- GND: Connected to the common ground on the Arduino UNO.
LCM1602 IIC LCD Module
- VCC: Receives power from the Arduino UNO's 5V pin.
- GND: Connected to the common ground on the Arduino UNO.
- SDA: Connected to pin A4 (SDA) on the Arduino UNO.
- SCL: Connected to pin A5 (SCL) on 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 Documentation (documentation.txt)
No additional documentation provided in the code input.