IR SENSOR ESP32

 EX NO 6                                                    IR SENSOR

LINK : IR SENSOR

Aim

To interface an IR sensor with an ESP32 microcontroller and detect nearby objects by generating an alert through a buzzer.

Requirements

Hardware Requirements

  • Espressif Systems ESP32 Development Board

  • IR Sensor Module

  • Buzzer

  • USB cable

  • Breadboard

  • Jumper wires

  • Computer or laptop

Software Requirements

  • Arduino IDE

  • ESP32 Board Package

  • USB Driver for ESP32 Communication

Procedure

  1. Connect the IR sensor module to the ESP32 board using appropriate input and power connections.

  2. Interface the buzzer with the designated digital output pin of the ESP32 board.

  3. Connect the ESP32 board to the computer through a USB cable.

  4. Open the Arduino IDE and select the suitable ESP32 board and communication port.

  5. Create a program to configure the IR sensor pin as an input and the buzzer pin as an output.

  6. Write the program logic to continuously monitor the IR sensor status.

  7. Configure the buzzer to activate whenever an object is detected by the IR sensor.

  8. Compile and upload the program to the ESP32 development board.

  9. Open the Serial Monitor to observe the sensor output values.

  10. Place an object near the IR sensor and verify the buzzer response during object detection.

Result

The IR sensor was successfully interfaced with the ESP32 board, and the buzzer was activated whenever an object was detected by the sensor.

No comments:

Post a Comment