Book Image

Learning Robotics using Python

Book Image

Learning Robotics using Python

Overview of this book

Table of Contents (19 chapters)
Learning Robotics Using Python
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Working with the IR proximity sensor


Infrared sensors are another method to find obstacles and the distance from the robot. The principle of infrared distance sensors is based on the infrared light that is reflected from a surface when hitting an obstacle. An IR receiver will capture the reflected light and the voltage is measured based on the amount of light received.

One of the popular IR range sensors is Sharp GP2D12, the product link is as follows:

http://www.robotshop.com/en/sharp-gp2y0a21yk0f-ir-range-sensor.html

The following figure shows the Sharp GP2D12 sensor:

The sensor sends out a beam of IR light and uses triangulation to measure the distance. The detection range of the GP2D12 is between 10 cm and 80 cm. The beam is 6 cm wide at a distance of 80 cm. The transmission and reflection of the IR light sensor is illustrated in the following figure:

On the left of the sensor is an IR transmitter, which continuously sends IR radiation, after hitting into some objects, the IR light will...