Let's Make Robots!

Cheap home made IR compound eye

Allows your robot to see and track nearby objects
Mr._General.bas5.15 KB
Compund_eye_instructions.jpg1.24 MB
Mr__General.zip3.24 KB

The purpose of this cheap, easy to make eye is to allow your robot to track movement of nearby objects (within 200mm). After much experimentation and various degrees of success I have finally got a good working design for my IR tracking system which is really a simple 4 element compound eye. Compound eyes are found in Arthropods such as insects. They are of relatively low resolution compared to the human eye but more responsive to movement. Unlike Insect eyes, my design includes it's own light source and is blinded by excess ambiant IR making them better suited to indoor and nocturnal activities.

In my earlier designs I used a transistor to amplify the signal from the phototransistors but this caused some problems with calibration and did not increase the range as much as I had hoped. When I did increase sensitivity to about 500mm I ran into other problems such as a white wall in the background reflecting light better than an object such as my hand causing my robot to look away from my hand instead of towards it.

The eye consist of 4 IR LEDs and 4 pairs of photo transistors. The phototransistor pairs are connected in parallel to increase their sensitivity. The phototransistor pairs are then connected to your analog inputs the same way you would connect an LDR. This circuit is really 4 FritsLDRs but using phototransistors instead of LDRs. The main reason for this is that the lens on the phototransistors makes them more sensitive to light directly in front of them and because LDRs are very slow to respond to changes in light.

The demonstration video is of a new robot being produced by DAGU called Mr. General. He is basically a "Start Here" robot based on my Bot 08M. Click on the schematic for a larger picture.

 As you can see, the eye is very simple to make. Using it to guide two servos in a pan/tilt mechanism is a little more complicated. I have included the sample program used in the demonstration video to try and help. Mr. General is designed to work with any processor but unfortunately I can only provide a sample in picaxe basic at this time.

The program basically compares left and right inputs for pan, up and down inputs for tilt. The bigger the difference, the faster the servo needs to move to follow the object. Another thing the program does is look at the average value of the inputs to gauge distance. The closer the object, the higher the readings. This is used to scale the results and prevent the servo from over correcting.

Having said that, I haven't perfected the scaling yet. at the moment, the program divides the readings to get a scale factor but since the light returning to the sensors is inversly proportional to the distance² I should really use a square root funtion in calculations. As a result of my crude scaling technique the robot seems to have developed a bit of personality. It likes one of our technicians and behaves well for him in the first video but does not like Claudia and shakes it's head at her (due to servo overcorrection) in the second video.

For those who would rather buy than make one, DAGU will soon have these available as a robot accessory.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

wawoo...really impressive; it is one leap further towards the one & only OPENCV application...will you someday take the first step and launch a standalone face tracking arduino? that would be one hot selling sheild.

I think I saw a shield similar to what you described on Kickstarter.

If you do want to play with a camera and an Arduino then there is a shield already here: http://nootropicdesign.com/ve/


Excuse me sir


about the Mr__General.zip

what language did you use??

is it applicable to Arduino Uno?


There is Mr. General code for both picaxe and arduino. Picaxe code has the "bas" extension, Arduino has the "pde" or "ino" exension.

Look at the "Understanding Mr. General" tutorial. http://letsmakerobots.com/node/24348


using PIR would be applicable?

No, they are designed to detect motion but cannot tell what direction.

any other idea for increasing the range? what if i use only phototransistor at the receiver?  actally i wana have a range of 1m .. using PIR would be applicable?

The lenses built into the phototransistors make them "Short sighted". Basically they need glasses.

If you want to track a flame then the IR camera from Rocket Brand Studios is much better. It can track up to 4 flames at once and is easy to communicate with using the provided library and an I2C interface.


The original project can be found here.



sir oddbot, can u  plz guide me if i give current pulses to led;s ad use convex lens infront of led;s to make the beam directed ,,can it increase the range??


Maybe, the lens is the most important part I think.