1 Photovore (November 2011) Allen J. Bell, Stephen R. Taylor, and William E. Abell, ELEC5530, Group 12 Abstract—This paper describes the theory, design, and assembly of an autonomous robot. Its purpose is to detect and move toward the greatest light source. IV. HARDWARE The goal of this assembly is to create an autonomous light seeking robot. With the aid of photo cells on each of the robot’s faces, the robot will be able to detect the direction with the greatest light source. Under these parameters the robot will be able to operate under a wide array of environmental lighting. The greatest obstacle in this project was to take a digital output from the microcontroller and use it as a mechanical switch to allow voltage to form across the DC motors. Our solution was to use a MOSFET "switch". With a 10k ohm resistor from gate to ground, a voltage can be held from an input signal such as the digital output from our microcontroller. The dc motor can then be attached to the drain of the MOSFET in parallel with a flyback diode. Lastly a 57 ohm resistor is placed in series to keep the voltage across the motor at the desired of 3 volts. II. THEORY OF OPERATION V. SOFTWARE I. INTRODUCTION The photo cells act as a variable resistor whose resistance is dependent on the amount of light incident on its "face". Under dark conditions the resistance reaches 1M Ohms but falls to approximately 10k Ohms under light conditions. By adding a 10k Ohm resistor in series the voltage can be read using an analog input on an Arduino Development Board. Because the photo cell acts as a variable resistor the voltage across the 10k Ohm resistor becomes a function of the amount of light incident on the area. This robot has four cell circuits, one on each side. The robot then reads the voltage values across the 10k Ohm resistor. The microprocessor then performs an analog to digital conversions and saves each value to memory. Once data has been taken the program can then compare and perform tasks under these conditions. III. SCHEMATIC One of the most critical aspects to this design is the analog to digital conversion. The choice of an Arduino was made with this concept in mind. The Arduino software and programming language makes analog to digital conversions simple. The board is able to take a voltage value from 0 to 5 volts and map it as a value in the range of 0 to 1023. The Arduino software is based on C/C++ language and provides new users a common ground on which to begin. Much like C/C++ control structures can be created and used such as 'if' loops. After the microcontroller obtains analog values from each photo cell circuit, the variables containing each digital conversion are compared via 'if' statements within a method that constantly loops. Because we wanted our robot to always move forward, the 'if' statements' conditions were always made with respect to the northern photo cell's value. These means there had to be four conditions for the greatest light source location: north, south, east, or west. The analog reading with the lowest value indicates the greatest light source. If the northern value is greatest, both motors should be allowed to rotate. If the southern value is greatest, the right motor is allowed to rotate while the left motor is not until the northern photocell becomes the highest value. If the eastern value is greatest, the right motor is allowed to rotate while the left motor is not until the northern photocell becomes the highest value. If the western value is greatest, the left motor is allowed to rotate while the right motor is not until the northern photo cell becomes the highest value. 2 VI. OBSERVATIONS Originally one 9 volt battery was applied to a +5 volt regulator and used to power the Arduino board. The amount of current needed to power two dc motors was too much under a previous design. The amount of current from the regulator would suffice for one motor so as an adjustment a second power supply and regulator were added. REFERENCES [1] [2] [3] Roland Siegwart, Illah R. Nourbakhsh, and Davide Scaramuzza, Introduction to Autonomous Mobile Robots(Book Style). Cambridge, Massachusetts: The MIT Press, 2004, pp.77-82. Richard C. Jaeger and Travis N. Blalock, Microelectronic Circuit Design (Book Style). New York, New York: McGraw Hill, 2008, pp. 275 - 341. Arduino Language Reference, ANSI Standard 2011. Available: http://arduino.cc/en/Reference/HomePage