Averaging Time: A Raspberry Pi Camera’s Route to Year-Long Time-Lapse

Raspberry Pi, time-lapse

This is the read-only HTML version. For the full Visual Space experience, open the app.

Camera, sky, star trails — Ima

Camera, sky, star trails — Ima
Camera, sky, star trails — Ima

Source: Photographic Time Journey on Hackaday.io · Muth

Exposure, image stacking

Making a day pass in four seconds calls for more than widely spaced snapshots. Muth’s Raspberry Pi experiments combine repeated exposures into frames, exploring how averaging, bright-pixel stacking and light-sensor control change the way motion survives compression.

👀 1

A year-long time-lapse has two jobs: compress the calendar and make movement readable along the way. In Photographic Time Journey on Hackaday.io, Muth explores doing both with a Raspberry Pi and camera module, combining many photographs into each output frame rather than simply taking occasional snapshots. The goal is a sequence where each day lasts roughly four seconds, with the moon, stars and seasonal changes sharing the same accelerated timeline.

Created on June 22, 2015, the project’s supplied build logs run through December 29, 2016. They document short trials and evolving camera controls—not a completed year-long recording—but offer a useful look at what happens when time-lapse becomes an exposure problem as much as a scheduling problem.

Build the exposure from smaller pieces

At 24 playback frames per second, four seconds of footage needs 96 frames. Spread those across a day and the capture interval becomes one output frame every 15 minutes. Muth wanted motion blur across that interval, rather than isolated moments separated by large gaps.

The proposed workaround for the Pi camera’s exposure limits was to capture an image every five seconds, accumulate the red, green and blue pixel values in a wider numerical buffer, then divide by the image count. That produces an average of the captured images. It can blend motion across time, though it remains a combination of separate exposures rather than one uninterrupted 15-minute exposure.

The distinction matters most for brief lights. Muth points out that a passing car could illuminate an otherwise dark scene for only a few captures; averaging those bright values with many dark ones reduces their contribution. The project therefore also explored scaling the accumulated values so the brightest reaches the maximum output value of 255. That changes the brightness mapping, rather than recovering an identical physical long exposure.

An early June 25, 2015 test combined 120 images over ten minutes. Muth reported motion blur along the moon’s path, but also a much less welcome light source: the camera’s red LED reflected in the window in front of it. Removing the LED eliminated the red halo in the next reported test. Sometimes the first obstacle to photographing the sky is a light attached to the camera.

Night photography exposes the camera controls

Stacking couldn’t solve every capture limitation. Early tests found that automatic exposure wasn’t using the camera’s longest available settings. Muth modified the capture software and investigated different camera output paths, then tried another lens in a three-day run.

That July 2015 trial introduced a different concern: Muth reported a sun-related mark on the sensor or its covering filter, plus blur and uneven focus when the sun entered the frame. Heat-induced deformation was the creator’s hypothesis, not an established diagnosis.

By the December 14, 2016 Camera Module v2 tests, manually setting ISO 800 and a six-second exposure produced visible stars, according to Muth, even with the stock lens. The creator initially suspected the newer module was less sensitive, then attributed the darker automatic results mainly to its exposure algorithm choosing more restrictive settings. It’s an important distinction: a dark frame doesn’t by itself tell you whether the limit lies in the sensor or its controls.

Muth also tried a different stacking rule during the Geminids: retain the maximum value at each pixel, rather than the average. This emphasized star trails, but the log notes that it could make motion blur less natural. The choice is expressive as well as technical. Averaging lets a brief event fade into the surrounding interval; maximum-value stacking gives bright events more persistence.

The v2 log reports no sun-related sensor damage noticed at that point. Muth had also added a UV filter, while explicitly remaining unsure whether it helped. That observation shouldn’t be treated as proof that the setup tolerates prolonged direct sunlight.

The next challenge was smooth exposure

The last supplied build log, dated December 29, 2016, moves the experiment toward Python and external light measurement. Muth built a small circuit around an MCP3426 ADC and photoresistors, then used brightness thresholds to change exposure time. The creator reported brightness jumps with that approach and planned to improve the compensation.

The Python tests required picamera, PIL and NumPy. A May 2017 commenter identified the TimeJourney repository and asked about running a version without the ADC hardware; the supplied discussion doesn’t include a solution to that request.

The most useful lesson here is that capture settings and stacking rules shape the time-lapse together. A stack can carry motion across a long interval, but abrupt exposure changes can still make adjacent output frames jump in brightness. For a year-long sequence, the next revealing test would be a continuous dusk-to-night-to-dawn run: can the exposure controller preserve faint night detail without making its own adjustments the most noticeable movement in the film?

Source: Photographic Time Journey

Photography

1 Follower

A place to develop your eye and share how you make photographs. Explore composition, light, editing and visual storytelling; show work in progress, exchange thoughtful critique, and learn from the decisions behind each image.

Visual Space is built for projects like this—where creators collaborate, organize goals, and grow communities around real work.