Encoder Front Page
SRS Home | Front Page | Monthly Issue | Index
Search WWW Search seattlerobotics.org

Using photoresistor array in robotic applications

Dusan Grujic

Copyright 1999, Dusan Grujic All Rights Reserved



The Idea

The idea of implementing vision systems in robots is very attractive. However, due to limited resources ( microcontrollers are commonly used in robots ), using cameras isn't the best solution for many reasons: they cost much, software would be incredibly complicated ( neural networks? ), and so on the list may be infinite. Because of this, home-made robots might have low resolution vision system ( described very well by Kevin Ross ). This system must satisfy several demands: first and the most important would be low cost, then that it's made of avalible components etc. Using photoresistors packed in array might serve well. How to pack photoresistors using minimum of components? This will be described in the following text.


Schematics and principles of operation


On the schematics 4X4 array is shown. Inputs 1-4 should be connected to electronics that will control array, and outputs 1-4 should be connected to 4-chanel A/D converter ( assumed 5V reference voltage ). You will notice R and 4R by resistors. R is resistance of resistor exposed to 'average' light, and 4R represents 4*R resistance.Electronic that control array must have tristate outputs. This is important for array operation. Let's 'simulate' how array oprates. If the input 1 is connected to 5V and other inputs are connected to outputs which are in high impedance, outputs 1-4 will represent voltages on resistors in first row. If the input 2 is connected to 5V and other to high impedance outputs, array outputs 1-4 will represent voltages on resistors in second row and so on. So the algorithm of reading whole array would be:

i:=1 to 4

Apply 5V to input i, connect other inputs to high impedance

Convert array (analog) outputs ( row i )

Send values to microcontroller, computer or something else

Why are resistors ( not photoresistors ) having 4 times greater resistance? This is because if the photoresistors resistance is say 1k at 'average' light, 1k resistor should be used ( to make voltage divider, and to assure that average light will be converted as 128 by 8-bit A/D converter ). If you take a better look at array schematics and read algorithm, you should see something like this ( for one analog output )

Diagram 1.

Inputs 2-4 are labeled as not connected, which is true, because they are connected to outputs in high impedance. Because of this, photoresistors on inputs 2,3 and 4 aren't affecting other resistors. Simplified diagram 1 is diagram 2, which is shown below.

As you can see, connection is like in Kevin Ross's Low Resolution Vision System, which I recomend to all readers of this article. This is because four 4*R resistors are in parallel connection and equal resistance is R. Output is directly proportional to brightness. If you would like to build bigger or smaller arrays, you should change the 4R resistor value. Resistor value can be calculated by multiplying number of rows ( inputs ) by photoresistors resistance while exposed to 'average' light.


Possible improvements

Some of the improvements I can think of are: using photodiodes instead of photoresistors ( photodiodes that have different characteristics, for colors ), using surface mount photoresistors to get 'high' resolution ( if exist ), using two sided PCB, and placing photoresistors on one and resistors on other side etc. Write me if you make any improvements or whatever...


How to contact

If you have any sugestions, improvements, comments, questions, if you find informations presented here usefull or you just want to contact me, my e-mail is grujic@madona.net , or you can send mesage to SRS robotic newsgroup (not guaranteed that i'll get it by this way).