Home Chapter 17 Maxuino/Arduino active infrared

Site Search


Chinese (Simplified) French German Italian Portuguese Russian Spanish
Maxuino/Arduino active infrared
Active infrared sensors allow you to have your sensor on a moving platform as they send out a beam of infrared light at 40Khz (40,000 times a second) and look for only that frequency back. There are a variety of these sensors that can sense from a few feet on up. Some can give you a fixed distance and some can give you variable distances.  A good source for these sensors is Acroname.com and be sure to order the correct ones as they all look quite similar.



The ones that give you a fixed distance require less code and are very easy to use such as the GP2YDO2YK a one bit sensor that returns a 0 or a 1 to your microcontroller so they are very quick and responsive. I suggest you carefully add the yellow, black (middle wire) and red to the white mini terminal connector first and then attach to the sensor. 



 Here is a schematic of how to wire the GP2YODO2YK to your microcontroller. This sensor can detect an object as far away as 80 cm (30") and down to a 2 inches (5 cm).