decorative bevel

Photovore

Description

Photovores are robots that seek out and move towards light sources, exhibiting some of the simplest animal-like behaviors. The robot detailed in this example uses two photoresistors - sensors that respond to changes in light - placed at opposing 45 degree angles from the front of the robot. The robot uses two continuous rotation servos to locomote, and turns in the direction of whichever sensor "sees" more light.


Materials

To try this at home, you will need:
  • A Cerebellum
  • A power source capable of providing at least 500 mA of current at between six and eight volts. The provided DC adapter will not be sufficient to power this robot
  • Two photoresistosr (~200 Ohms in ambient light)
  • Two 330 Ohm resistors
  • A breadboard
  • Two continuous servos
  • Two wheels and a caster
  • A robot base

Photoresistor Circuit

A photoresistor varies its resistance according to the amount of light hitting its surface - as more light hits the photoresistor, it's resistance decreases. In this sensing circuit, +5V is connected to one lead of the photoresistor, while the other lead connects to a fixed value resistor, the other lead of which is grounded. This forms a voltage divider that creates a signal voltage which varies according to the following equation:

signal voltage = 5V * (330 Ohms/photoresistor value+330)

Code

You will need the following to compile this program:

References

Check out the following pages in the manual for more information: