Alberto writes -
The Witness Camera is an automated, self-recording surveillance camera, that uses a gigabyte-class flash card as recording media. I designed the Witnesscam because available surveillance solutions were too expensive or impractical for home use. I built the system from a VGA CMOS colour camera, a passive-infrared (PIR) movement sensor, an ATmega32 processor, and a 1GB SD-card. The prototype looks like an ordinary alarm detector. But when it detects people moving around, it silently starts recording.
HOW TO – Make a “Witness camera”, thanks Nutchip! – Link.