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.

Oddbot,

   Thanks for this post.  I'd played around with IR sesning a bit, but I was less than satisfied with my results.  After reading this, I tried again with parts I had on hand.  I experimented with a single emitter and detector.  I used an IR pair from the the dreaded RadioShack.  They are actually quite good.  The emitter has a forward current of 150 ma and forward voltage of 1.3V typical.  I used a 33 Ohm resistor to get about 112 ma.  This was triggered by a plain old 2N3904 NPN.  I tried various resistor values for the phototransistor.  For mine, 100k Ohms gave really nice results.  1M Ohm worked fairly well, but I like the increments of the 100k Ohm better.  The range was about 30 cm without having to PWM the LED.  This is perfect for my current needs.  I used my hand and a white piece of paper as the target.  I only notice a small difference in value between them. 

   I like the effect you get in the videos with the four point detection.  That could be a lot of fun with my kids.  I'm on my way to Dagu now to price out the board. 

Thanks again!

Tom

I have done some experimenting to increase the range of the eye but found that even with brighter LEDs and more phototransistors in parallel (or series) I still had a limit of 20-30cm depending on ambient IR. I think that the lenses built into the LEDs and phototransistors limit the range. In effect the eye is short sighted and in need of a monacle :D

That's the problem I had with my CanBot built back in the 80's. It would hit the wall before reverse could be triggered. Never did get the range expanded. Maybe an array of ultrasonics?

I think the reason I cannot increase the range, even with more powerful LEDs was because the lens's molded into the LEDs and particularly the IR phototransistors limit the range, in effect making the robot short sighted.

I would love to get a customized lens made for the eye (effectively giving it glasses) but it is so hard to find an optometrist who can work with a robot that sees infrared :(

What? Are those IR leds black??? in finland they sell only transparent ir leds and phototransistors

No, the LEDs are clear and the photo transistors are black.

The dark colouring is additional filtering to help block visible light. You can get black IR LEDs and you can get clear phototransistors. it all depends on the manufacturer and what the component was designed for.

Sorry mate, this is only a short range device. Although the range can be increased significantly the sensor then picks up multiple objects and won't lock on well.

To track object at long range your best options are:

1. Ultrasonic rangefinders - Check out Gareth's scanner: http://letsmakerobots.com/node/11259
2. Laser range finder / scanner
3. Camera and object recognition software

What's the range on this? because my next project requires tracking things at long distances.

I have QRB1134 sensors that are usualy used in line following or encoders. Can I just place 4 of those to follow stuff?

 

This is the specification of the sensor from the official page:

"The QRB1133/1134 consists of a infrared emitting diode and an NPN silicon phototransistor mounted side by side on a converging optical axis in a black plastic housing. The phototransistor responds to radiation from the emitting diode only when a reflective object passes within its field of view. The area of the optimum response approximates a circle of .200 inch in diameter."

The two biggest issues with using the QRB1134 are that:
• Neither the LED or phototransistor have lenses, so they're not very directionally sensitive.
• The LED and phototransistor are angled towards each other, which means that when an object is more than an inch or so away it can't be seen at all.