Object Detection Arduino Ultrasonic Project Report
Object Detection Arduino Ultrasonic Project Report
1. Introduction
Embedded systems play a vital role in modern electronic design, especially for tasks requiring automation,
control, and real-time responses. This project demonstrates a basic object detection system using Arduino
Uno and an ultrasonic sensor. The objective is to measure the distance of an object using the HC-SR04
sensor and trigger visual/audible alerts when the object is detected within a predefined range.
2. Objectives
3. Components Required
3. Breadboard - 1 unit
5. LED - 1 unit
4. Working Principle
The HC-SR04 sensor uses sonar to determine the distance to an object. It emits an ultrasonic wave through
Project Report: Object Detection using Arduino Uno and Ultrasonic Sensor
the trig pin, and measures the time taken for the echo to return via the echo pin. The formula used is:
Speed of sound = 343 m/s. Time is measured in microseconds and converted accordingly.
5. Circuit Diagram
Connections:
6. Arduino Code
long duration;
int distance;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(ledPin, OUTPUT);
pinMode(buzzerPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
Project Report: Object Detection using Arduino Uno and Ultrasonic Sensor
digitalWrite(trigPin, LOW);
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
7. Applications
- Industrial automation
8. Conclusion
The project successfully demonstrates a basic object detection system using an Arduino and ultrasonic
sensor. This system can be used as a foundational block for more complex automation systems.
9. Future Scope
10. References
- HC-SR04 Datasheet