Plant growth time-lapse camera
Build it step by step
0 of 5 doneSet up headless
In Raspberry Pi Imager set the Wi-Fi, user name and SSH before writing the card, so you never need a screen.
Fit the camera
Use the narrower Zero camera cable. Contacts face the board on the Zero.
Test
SSH in and run rpicam-still -o test.jpg, then copy it to your laptop to check focus and framing.
Set the scene
Put the pot against a plain wall with steady light (a desk lamp on a timer helps at night).
Run for days
Start the script, check a frame each day, then build the video with the ffmpeg command.
How do you build a plant growth time-lapse camera?
A Raspberry Pi Zero 2 W with a camera takes a photo every 10 minutes for days, then ffmpeg joins them into a time-lapse video of a seed sprouting. You need Raspberry Pi Zero 2 W, Raspberry Pi Camera Module 3, SanDisk microSD card 32 GB (A1, Class 10), 5 V 2 A USB adapter and USB A to micro-USB cable (data). It takes 5 steps and about 60 minutes.
- Level
- Beginner
- Time
- About 60 min
- Parts
- 5
Wiring
| From | To | Why |
|---|---|---|
| Camera | Pi Zero camera connector (narrow cable) | Contacts facing the board |
| Micro-USB PWR IN | 5 V 2 A adapter | Power (use the port marked PWR) |
Code
Raspberry Pi OS Lite or Desktop (Bookworm). Picamera2 and ffmpeg are preinstalled. Run it as a systemd service so it survives power cuts.
# Capture: python3 timelapse.py (Ctrl+C to stop)
# Make video: ffmpeg -framerate 24 -i ~/timelapse/img_%05d.jpg -c:v libx264 -pix_fmt yuv420p plant.mp4
import os, time
from picamera2 import Picamera2
FOLDER = os.path.expanduser("~/timelapse")
EVERY = 600 # seconds between photos (10 minutes)
os.makedirs(FOLDER, exist_ok=True)
cam = Picamera2()
cam.configure(cam.create_still_configuration(main={"size": (1920, 1080)}))
cam.start()
time.sleep(2) # let exposure and white balance settle
n = len([f for f in os.listdir(FOLDER) if f.endswith(".jpg")]) # continue numbering after a restart
while True:
path = os.path.join(FOLDER, f"img_{n:05d}.jpg")
cam.capture_file(path)
print("Saved", path)
n += 1
time.sleep(EVERY)Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| rpicam-still test | A sharp 1080p photo of the pot |
| After one hour | 6 new images in ~/timelapse |
| Storage per day | 144 photos, roughly 100 to 150 MB |
| Five days at 24 fps | About a 30-second video |
If it does not work
Night frames are black
Add a lamp on a timer, or delete night frames before making the video.
Video flickers
Auto exposure changes between frames. Fix exposure with cam.set_controls({"AeEnable": False, "ExposureTime": 20000, "AnalogueGain": 2.0}).
Numbering restarts after a power cut
The script continues from the number of files already saved.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the plant growth time-lapse camera?
Raspberry Pi Zero 2 W, Raspberry Pi Camera Module 3, SanDisk microSD card 32 GB (A1, Class 10), 5 V 2 A USB adapter and USB A to micro-USB cable (data). Raspberry Pi Camera Module 3: Use the Zero camera cable.
How long does the plant growth time-lapse camera take to build?
About 60 minutes for a beginner maker, in 5 steps.
How do I know the plant growth time-lapse camera works?
rpicam-still test: A sharp 1080p photo of the pot. After one hour: 6 new images in ~/timelapse. Storage per day: 144 photos, roughly 100 to 150 MB.
Night frames are black: what should I check?
Add a lamp on a timer, or delete night frames before making the video.
Video flickers: what should I check?
Auto exposure changes between frames. Fix exposure with cam.set_controls({"AeEnable": False, "ExposureTime": 20000, "AnalogueGain": 2.0}).
Numbering restarts after a power cut: what should I check?
The script continues from the number of files already saved.
