Raspberry Pi time lapse camera
2022-01-27
Using the Raspberry Pi’s High Quality Camera module I made a time lapse camera in my living room.

FIGURE 1 Assembled camera sitting in my living room window
Download
1 Case
I designed a case with a large lens hood and a recessed lens so that it can block the light from the room. This would allow the camera to take photos at night.

FIGURE 2 CAD screenshots of the case design
Download

FIGURE 3 Assembled camera
Download

FIGURE 4 Camera chassis with HQ module on one side and the Raspberry Pi on the other
Download

FIGURE 5 Camera chassis reverse side showing the Raspberry Pi
Download
1.1 STL files
The files are also available on Thingiverse.
2 Capture code
I decided to strive for maximum image quality even at night, by capturing a stack of images and summing them up.
3 Lens
I found a Basler C125-0618-5M-P on eBay which seems to have good image quality and fits the Raspberry Pi HQ Camera.

FIGURE 6 Picture of lens
Download

FIGURE 7 The lens has significant barrel distortion but that is compensated for by my code above.
Download

FIGURE 8 The lens is quite sharp and can resolve even 200 lp/mm. This chart is at f/1.8, polychromatic, 0.5 m working distance.
Download
4 Gallery

FIGURE 9 Picture taken by Raspberry Pi camera
Download

FIGURE 10 Picture taken by Raspberry Pi camera
Download

FIGURE 11 Picture taken by Raspberry Pi camera
Download

FIGURE 12 Picture taken by Raspberry Pi camera
Download

FIGURE 13 Picture taken by Raspberry Pi camera
Download

FIGURE 14 Picture taken by Raspberry Pi camera
Download

FIGURE 15 Picture taken by Raspberry Pi camera
Download

FIGURE 16 Picture taken by Raspberry Pi camera
Download

FIGURE 17 Picture taken by Raspberry Pi camera
Download

FIGURE 18 Picture taken by Raspberry Pi camera
Download

FIGURE 19 Picture taken by Raspberry Pi camera
Download

FIGURE 20 Picture taken by Raspberry Pi camera