Help with a project

Si_price:
Hi all,

I'm looking for advice with regards to a project I'm working on for university. I need to build a robot which turns when it encounters a light source.

Do you need it to turn in a specific direction (ie, if the light is to the left, turn away to the right, and vice-versa), or just in a random direction?

Si_price:
The way I can see doing this is to use light dependant resistors on the robot itself and when the value fluctuates send a message to the motor to turn it either left or right,

Well - you have this basically right. If you just need the robot to turn randomly away, then a single light sensor is all you need - see this:

http://playground.arduino.cc/Learning/PhotoResistor

If you wanted directional control, then you would want a couple of extra sensors (one pointing off to the left, and the other to the right - with one pointing straight ahead). This way, the robot could determine (to some level) what direction the light comes from.

Then you just need to code up the motor control (which will require an h-bridge for each motor - a motor shield or similar, depending on your motor needs - will work ok) - but for now, get the light sensor(s) working.

Also - for the light sensor(s) - place a dark tube (black construction paper or opaque tubing - small bits of brass/copper/aluminum tubing can work too) around each sensor - this will make the sensor much more directional to the light (instead of vague ambient light tripping it).

For future projects along this same line, check out this sensor:

http://www.seattlerobotics.org/encoder/jan97/lowresv.html