Objectives:
To design a system that detects and avoids obstacles using an IR sensor.
To implement a simple autonomous navigation system using IR technology.
Components Required for IR Sensor with Arduino
1.Arduino UNO
2.USB cable for uploading the code
3.IR sensor
4.Buzzer and an LED
5.Jumper wires and a breadboard
6.220-ohm resistor
Theory: The IR sensor emits infrared light and detects the reflection from nearby objects. By measuring the intensity of the reflected light, the sensor can determine the presence and distance of obstacles. The microcontroller processes these signals and controls the motors to navigate around the obstacles, ensuring smooth movement without collisions.
Implementation Process:
Block Diagram:
Create a block diagram representing the connections between the IR sensor, microcontroller, buzzer ,arduino uno,Led.
Step-by-Step Implementation:
Connect the IR sensors to the Arduino uno board.
Connect the buzzer with Arduino uno board using connecting wires.
Write the code to read data from the IR sensors.
Implement the logic to control the motors based on the sensor data to avoid obstacles.
Upload the code to the Arduino uno software and test the system.
CIRCUIT DIAGRAM
IR SENSOR
BUZZER
Circuit Diagram:
- Create a circuit diagram showing the connections between the IR sensor, microcontroller, motor driver, and motors. This can be done using tools like Fritzing.
- int val = 0 ;
- void setup()
- {
- Serial.begin(9600); // sensor buart rate
- pinMode(2,INPUT); // IR sensor output pin connected
- pinMode(6,OUTPUT); // LED
- pinMode(7,OUTPUT); // BUZZER
- }
- void loop()
- {
- val = digitalRead(2); // IR sensor output pin connected
- Serial.println(val); // see the value in serial monitor in Arduino IDE
- delay(500);
- if(val == 1 )
- {
- digitalWrite(6,HIGH); // LED ON
- digitalWrite(7,HIGH); // BUZZER ON
- }
- else
- {
- digitalWrite(6,LOW); // LED OFF
- digitalWrite(7,LOW); // BUZZER OFF
- }
- }
pin management
Result and Discussion:
- Capture and describe the behavior of the system when encountering obstacles.
- Discuss any challenges faced and how they were resolved.
Implementations:
- The system can be implemented in various robotics applications such as autonomous vehicles, robotic vacuum cleaners, and obstacle detection systems in industrial automation.
Conclusion:
- Summarize the success of the experiment in creating an obstacle avoidance system using IR sensors.
- Reflect on the effectiveness of the IR sensor in detecting obstacles and the responsiveness of the system.
0 Comments