Reader small image

You're reading from  Raspberry Pi Robotics Essentials

Product typeBook
Published inJun 2015
Publisher
ISBN-139781785284847
Edition1st Edition
Concepts
Right arrow
Author (1)
Richard Grimmett
Richard Grimmett
author image
Richard Grimmett

Dr. Richard Grimmett has been fascinated by computers and electronics from his very first programming project, which used Fortran on punch cards. He has bachelor's and master's degrees in electrical engineering and a PhD in leadership studies. He also has 26 years of experience in the radar and telecommunications industries, and even has one of the original brick phones. He now teaches computer science and electrical engineering at Brigham Young University, Idaho, where his office is filled with his many robotics projects.
Read more about Richard Grimmett

Right arrow

Connecting Raspberry Pi to an infrared sensor


Your robot can now move around, but you'll want to be able to sense a barrier or a target. One of the ways to do this is with an IR sensor. First, a tutorial on IR sensors is required. An IR sensor has both a transmitter and a sensor. The transmitter sends out a narrow beam of light, and the sensor receives this beam of light.

The difference in transit ends up as an angle measurement in the sensor, as shown in the following figure:

The different angles give you an indication of the distance from the object. The sensor turns these angle measurements into a voltage that you can sense to determine the distance. Unfortunately, the relationship between the output of the sensor and the distance is not linear, so you'll need to do some calibration in order to predict the actual distance and its relationship to the output of the sensor.

Note

IR sensors are quite accurate, certainly with a low percentage of errors; however, they may not work well if the...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Raspberry Pi Robotics Essentials
Published in: Jun 2015Publisher: ISBN-13: 9781785284847

Author (1)

author image
Richard Grimmett

Dr. Richard Grimmett has been fascinated by computers and electronics from his very first programming project, which used Fortran on punch cards. He has bachelor's and master's degrees in electrical engineering and a PhD in leadership studies. He also has 26 years of experience in the radar and telecommunications industries, and even has one of the original brick phones. He now teaches computer science and electrical engineering at Brigham Young University, Idaho, where his office is filled with his many robotics projects.
Read more about Richard Grimmett