Let's Make Robots!

Cheap home made IR compound eye

Allows your robot to see and track nearby objects
AttachmentSize
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.
IR given off by hot objects is a different frequency to IR used by TV remotes. The persons body temperature should have little if any effect. I found the reason it shook it's head was due to the way you held your hand. Claudia held her hand vertically making it small enough for the robot to have trouble locking on.
That and the fact that Claudia's hands are way much smaller than yours... ^^
Wow! Awesome idea. Definately gonna try this out at some point :)

Good day sir!

am a student from philippines.

our prof required us to make a robot.Our group then choose to have a line trcking robot.hence,i saw ur robot.

I am interested in making one, our robot for the project will then be  a line tracking-IR  eyed one.Hope you cn provide us the information on how u made this one.(wer're wondering on how u made the base)Please!!! XD,our project will be due on OCT 16,nearing a month from today.All will be of educational purposes only.Hoping to hear from you soon.Thank you very much.

The schematic shown here is the complete sensor circuit for the eye, it is very simple. The four outputs connect directly to your processors analog inputs. The important part is the program which must control the servos using data from these four analog inputs.

The base of the robot just has another four sensors in the corners to detect if the robot is going to fall of the edge of a table. These sensors are the same except they only have one photo transistor each and a different value of resistor. They connect to the digital inputs instead of the analog inputs.

For anyone writing programs in BASIC, Oddbot's Mr_General.bas program is an excellent example of a well written, well, documwented, and well formatted program.

We should all write our programs so well.

 Myc 

Thanks for the compliment, I am trying to document my programs better.

Forget about brilliantly, efficiently, beautifully, etceterally. It just works. That in itself is a huge achievement and a bit of an LMR Holy Grail.

Thanks for sharing Oddbot.

Your welcome :-)

wow!  It's quite startling to see a mechanical robot act like a little animal.  Congratulations!

 A note: you aren't shielding the IR LEDs from the transistors, thus getting extra light which isn't reflected off a target.  Does this have any effect on performance? I understand some obvious things, like dark plastic, do *not* block IR, and so are not useful as a shield.

I'm probably going to build/buy one of these, as it looks fun and easy.  Thanks!