Skip to main content

Worldwide Shipping · Secure Payments

At a glance

This pir / ir and optical sensor is a good fit for makers, students and electronics hobbyists. Main specs: working current (ma) More than 20mA; operating temperature (°c) -10 to 50 centigrade degree; signal output TTL Level.

Key Highlights

  • Working Current (mA): More than 20mA
  • Operating Temperature (°C): -10 to 50 centigrade degree
  • Signal Output: TTL Level

Ideal For

  • Arduino, ESP32 and Raspberry Pi projects
  • School and college lab work
  • Prototypes and test rigs

Buying Tip

Compare the pin layout and operating voltage with your circuit, and order a spare or two: small parts are easy to damage while soldering.

Specifications

Working Current (mA)More than 20mA
Operating Temperature (°C)-10 to 50 centigrade degree
Distance Measure (cm)2 - 40cm
IO interface4 line (- / + / S / EN)
Signal OutputTTL Level
Effective Angle35 degree
Weight (g)5
Dimensions (L x W x H) mm40 x 16 x 11
Shipping Weight0.01 kg
Shipping Dimensions5 × 2 × 2 cm

Overview

The Infrared Obstacle Avoidance Sensor Module is listed in our pir / ir and optical sensor range and suits makers, students and electronics hobbyists. The notes below explain the main specifications and what to check before you order.

Specifications explained

  • Working Current (mA): More than 20mA (your supply must deliver at least this much current)
  • Operating Temperature (°C): -10 to 50 centigrade degree
  • Distance Measure (cm): 2 - 40cm
  • IO interface: 4 line (- / + / S / EN) (confirm your cable or board uses the same connector)
  • Signal Output: TTL Level
  • Effective Angle: 35 degree
  • Weight (g): 5 (important for drones, RC models and anything you carry)
  • Dimensions (L x W x H) mm: 40 x 16 x 11 (measure your mounting space before ordering)

Before you order

Compare the specifications with your project or device, and check delivery times and return terms for your country in our help centre. Questions about this item? Email [email protected] with the product code.

This Infrared Obstacle Avoidance Sensor Module is an inexpensive solution to avoidance detection for robotics and other electronics uses.

It comes as an assembled module, as shown above, there are only four pins: +5-volts, GND, output, and EN. Output is an active LOW and has an onboard status LED. It's very easy to interface directly with Arduino or other micro-controllers. It also works with the Raspberry Pi with a voltage range of 3-6 volts. Connect Vcc to 3-volts!

The enable pin "EN" will disable the device when HI (Vcc) and enable when LO (GND). The onboard jumper can be left open to allow external control of enable/disable of the module. I see no use for this function and would leave the jumper on and the pin disconnected. There are two potentiometers on the module one controlling operating frequency (centred at 38 kHz) the other controlling intensity. The detector was designed for 38 kHz and the onboard oscillator circuit is based on a 555 timer. Tweaking gives a little better range but I'd suggest leaving it alone because the useful range is narrow. It worked well as is. The maximum reliable range in my test was around 30-40 cm and depended on the type of material. A smooth white surface worked far better than a black or rough surface.


Sample Code:
int detector = 8; // define the obstacle avoidance sensor interface
int val ;
 
void setup ()
{
  pinMode(13, OUTPUT);     // Built in Arduino LED
  digitalWrite (13, LOW);
  pinMode (detector, INPUT) ;// define the obstacle avoidance sensor output interface
}
 
void loop ()
{
  val = digitalRead (detector) ;
  if (val == HIGH) // When the obstacle avoidance sensor detects a signal, LED flashes
  {
    digitalWrite (13, HIGH);
    delay(100);
  }
  else
  {
    digitalWrite (13, LOW);
    delay(100);
  }
}


Package Includes:

1 x Infrared Obstacle Avoidance Sensor Module

Quick specs

Working Current (mA)
More than 20mA
Operating Temperature (°C)
-10 to 50 centigrade degree
Distance Measure (cm)
2 - 40cm
IO interface
4 line (- / + / S / EN)
Signal Output
TTL Level
Effective Angle
35 degree
See all specifications