QB096 Infrared Obstacle Avoidance Sensor

1.Product Introduction

../../_images/Infrared_Obstacle_Avoidance_Sensor-1.png

The infrared obstacle avoidance sensor transmits infrared light through a transmitter, and detects the change in the amount of light reflected by the detection object or blocked by the receiver to obtain an output signal.

The working principle of infrared obstacle avoidance sensor is based on the photoelectric effect, which converts photon energy into electron energy. Infrared obstacle avoidance sensor mainly includes light source, receiver, signal processing circuit and other parts. Among them, the light source is mainly used to irradiate the object to be detected with a certain light intensity, and the receiver receives the light signal reflected, transmitted, scattered or emitted from the object to be detected through the photosensitive element, and converts it into an electrical signal. Finally, the signal processing circuit amplifies, filters, compares and counts the electrical signal to realize the detection and control of the object.

Application reference: Automatic doors, elevators, security systems, etc.

2.Parameter Specification

Parameter Value/Representation
Operating voltage 3.3~5V
Operating temperature -40°C~+70°C
Input signal Digital signal
Size 3.16cm*2.38cm
../../_images/Infrared_Obstacle_Avoidance_Sensor-2.png

3.Wiring Diagram

Hint

Expansion board is attached to esp32 controller board.

../../_images/Infrared_Obstacle_Avoidance_Sensor-3.png
Infrared Obstacle Avoidance Sensor ESP32
VCC 5V
GND GND
Sign Digital Pin 23

4.Sample Code

 1#define PE 23        //Define the pins of the infrared obstacle avoidance sensor
 2
 3void setup() {
 4  
 5  pinMode(PE, INPUT);                  //Set the infrared obstacle avoidance sensor pin to input mode
 6  Serial.begin(115200);                //Initialize baud rate
 7}
 8
 9void loop() {
10  if (digitalRead(PE) == 0) {  // Detects whether the infrared obstacle avoidance sensor detects an obstacle
11    Serial.println("Obstacle detected!"); 
12    delay(1000);
13    }
14
15}

5.Test Result

After you have successfully connected the circuits according to the wiring diagram and successfully uploaded the correct program, the serial monitor will output “Obstacle detected!” when it detects a person or obstacle approaching.

../../_images/Infrared_Obstacle_Avoidance_Sensor-4.png

6.Related Resources

PDF and Code

7.Get One Now

B2B Business: info@acebott.com

Related posts

Leave the first comment

Apply for a Free Trial

This product trial is prioritized for educators and academic institutions.

By filling out and submitting this form, you agree to the
Acebott Product Trial Terms and Conditions.

Unlock Your Exclusive Education Discount Today

Fill out this form to apply for special discounts tailored for educators and institutions. Enjoy at least 5% off on our STEM kits—because education deserves a reward!

Please fill out the form above, and our team will get in touch with you promptly!
😊🚀

Get A Free Quote! 🎉

Can’t find the perfect STEM kit ? Want the best wholesale prices ?
Interested in becoming a distributor ?

Just fill out the form above, and we’ll get back to you ASAP with all the info you need! 😊🚀

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.