IR sensor module.


Interfacing Arduino IR Sensor Module

by Lewis Loflin

The Keyes Infrared IR Sensor Obstacle Avoidance Sensor board is an inexpensive solution to avoidance detection for robotics and other electronics uses. Costing under $5 with shipping operation is simple and straightforward.

This 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 a onboard status LED. It's very easy to interface directly with Arduino, Picaxe, or Microchip PIC 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 (centered 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.

Download the Arduino code arduino_ir.txt.

Stepper Motors

Serial LCD Display and assorted Sensors

Web site Copyright Lewis Loflin, All rights reserved.
If using this material on another site, please provide a link back to my site.