Skip to content

robzarry/timelapse-zero-w

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Raspberry Pi Zero W v1.1 — Timelapse Camera

A timelapse application tuned for the Pi Zero W v1.1 — single-core BCM2835 ARM11 @ 1 GHz, 512 MB RAM, legacy camera stack (picamera, not picamera2).

Looking for the Pi Zero 2W version? → robzarry/timelapse


Key differences from the Zero 2W version

Pi Zero W v1.1 (this repo) Pi Zero 2W
SoC BCM2835 · 1-core ARM11 @ 1 GHz BCM2710A1 · 4-core Cortex-A53 @ 1 GHz
RAM 512 MB 1 GB
Camera library picamera (legacy stack) picamera2 (libcamera)
OS Raspberry Pi OS Bullseye (32-bit) Bullseye or Bookworm
ffmpeg preset ultrafast (encode speed priority) medium (quality priority)
Default resolution 720p (1280×720) 1080p (2592×1944)
Encode time (1 hr session) ~10-30 min ~2-5 min

Hardware

Component Notes
Raspberry Pi Zero W v1.1 BCM2835 SoC
Pi Camera v1 or v2 Connected via CSI ribbon cable
microSD card ≥16 GB recommended (Class 10 / A1)
Power supply 5 V / 1.2 A micro-USB

Important — 2.4 GHz WiFi only. The Pi Zero W v1.1 does not support 5 GHz networks.


First-Time Setup (run once)

Boot into Raspberry Pi OS Lite (32-bit, Bullseye) and run:

sudo bash setup.sh

The script will:

  1. Enable the legacy camera stack in /boot/config.txt (start_x=1, gpu_mem=128) and prompt to reboot if needed
  2. Prompt for WiFi SSID, password, and country code → writes wpa_supplicant.conf
  3. Enable and start SSH
  4. Install python3-picamera, ffmpeg, and tqdm
  5. Optionally install a systemd service

Running the App

python3 timelapse.py

Prompts:

Parameter Example Notes
Interval (seconds) 10 Time between photos
Duration (minutes) 60 Total session length
Resolution 2 (720p) See table below
Playback FPS 24 Frames per second in output video

Resolution options

Choice Resolution Notes
1 1920×1080 Best quality — long encode time
2 1280×720 Default — best balance on BCM2835
3 960×540 Faster encode, smaller files
4 640×480 Fastest option

Output

~/timelapse/
└── 20241215_143022/
    ├── frames/
    │   ├── frame_000001.jpg
    │   └── ...
    └── timelapse_20241215_143022.mp4

Output is written to an attached USB drive (if mounted under /media) or ~/timelapse/ on the SD card as a fallback.


SSH Access

# Discover the Pi on your local network
ping raspberrypi.local

# Connect
ssh pi@raspberrypi.local

# Copy finished video to your laptop
scp pi@raspberrypi.local:~/timelapse/20241215_143022/timelapse_20241215_143022.mp4 ~/Desktop/

Performance notes (BCM2835)

  • Capture is fast — the bottleneck is the SD card write speed.
  • Encoding with libx264 -preset ultrafast on a single ARM11 core:
    • ~0.3 s per frame at 720p → 2 500 frames ≈ 12 min encode
    • ~0.8 s per frame at 1080p → 2 500 frames ≈ 33 min encode
  • A USB drive (via OTG adapter) is strongly recommended for large sessions to avoid SD card wear.

Stopping Early

Press Ctrl+C during capture. The app will finish the current frame, stop cleanly, and compile whatever was captured into a video.


Troubleshooting

Symptom Fix
picamera import error sudo apt install python3-picamera
mmal: No data received from sensor Legacy camera not enabled — re-run setup.sh and reboot
Black / green frames Camera ribbon not seated properly; check both connectors
WiFi not connecting Verify country code in wpa_supplicant.conf; 5 GHz networks unsupported
ffmpeg not found sudo apt install ffmpeg
Very slow encode Expected on BCM2835; switch to 720p or 540p
Setup flag missing Delete .setup_complete and re-run setup.sh

About

Raspberry Pi Zero W v1.1 timelapse camera — legacy picamera stack, BCM2835 optimised

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors