The photocell is from
Sparkfun. Photocells are also known as Light Dependent Resistors - they vary their resistance depending on the amount of light falling onto the sensor.
By placing a photocell on the outside of the payload it should be possible to detect whether it is night or day, unfortunately a photocells resistance is also temperature dependent so it'll be interesting to see how well it works at altitude.
If there is a significant difference in reading this could be used in future long duration flights to detect night and day which could be useful in controlling altitude and ballast drops.
Using an instructables
guide I was easily able to rig up a photocell and read the light intensity using one the AVR's analog pins. With this setup you are just creating a voltage divider, the photocell acting as R1 and then a normal resistor as R2, by connecting the analog pin between the 2 resistors you'll be able to read the resulting voltage. This voltage will vary according to the resistance of the photocell which will be related to the light intensity.
3.3v-------Photocell-----Resistor------GND
|
Analog 0