Table of Contents
Time-lapse photography reveals the invisible — plants growing, clouds moving, construction progressing. A Raspberry Pi with a camera module creates an affordable, fully automated time-lapse rig that can run for weeks. This project is perfect for gardening enthusiasts, science students, and content creators in India.
Why Use Raspberry Pi for Time-Lapse Photography
- Affordable: Complete setup under ₹5,000 vs ₹15,000+ for a dedicated time-lapse camera.
- Programmable: Customise intervals, resolution, exposure, and schedule.
- Always-on: Runs unattended for days or weeks on minimal power.
- Remote monitoring: Check progress over SSH or via a web interface.
- Versatile: Capture plant growth, weather patterns, art projects, or construction.
Camera Module Selection Guide
| Camera | Resolution | Best For |
|---|---|---|
| Pi Camera Module 3 | 12MP, autofocus | General purpose, close-ups |
| Pi Camera Module 3 NoIR | 12MP, no IR filter | Night/low-light, wildlife |
| 5MP Camera Module (V1.3) | 5MP, fixed focus | Budget option, wide angle |
| Arducam IMX477 HQ | 12.3MP, C-mount | Professional quality, lens options |
Camera Modules on Zbotic.in
Hardware Assembly and Positioning
- Connect the camera ribbon cable to the Pi’s CSI port (lift latch, insert, close latch).
- Mount the Pi in a case with camera access hole or use a camera mount.
- For plant growth: position the camera 30-50cm above the plant, pointing down.
- Ensure consistent lighting — use an LED grow light on a timer for indoor plants.
- Use a stable mount (tripod, 3D-printed bracket, or clamp) to prevent movement between shots.
Time-Lapse Script with picamera2
# Install dependencies
sudo apt install python3-picamera2 -y
# Create the time-lapse script
cat << 'PYTHON' > /home/pi/timelapse.py
#!/usr/bin/env python3
# Time-lapse capture script for Raspberry Pi Camera
from picamera2 import Picamera2
from datetime import datetime
import os
import time
# Configuration
INTERVAL = 300 # Seconds between captures (5 minutes)
RESOLUTION = (4056, 3040) # Full resolution for Camera Module 3
OUTPUT_DIR = "/home/pi/timelapse"
PREFIX = "plant"
# Create output directory
os.makedirs(OUTPUT_DIR, exist_ok=True)
# Initialise camera
picam2 = Picamera2()
config = picam2.create_still_configuration(
main={"size": RESOLUTION},
controls={"AwbMode": 1} # Auto white balance
)
picam2.configure(config)
picam2.start()
time.sleep(2) # Warm up
print(f"Time-lapse started. Interval: {INTERVAL}s")
print(f"Saving to: {OUTPUT_DIR}")
try:
frame = 0
while True:
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
filename = f"{OUTPUT_DIR}/{PREFIX}_{frame:06d}_{timestamp}.jpg"
picam2.capture_file(filename)
print(f"Captured: {filename}")
frame += 1
time.sleep(INTERVAL)
except KeyboardInterrupt:
print(f"nStopped. Total frames: {frame}")
finally:
picam2.stop()
PYTHON
chmod +x /home/pi/timelapse.py
# Test with a single capture
python3 /home/pi/timelapse.py
# Press Ctrl+C after confirming it works
Automating with cron and systemd
# Create a systemd service for auto-start
sudo tee /etc/systemd/system/timelapse.service << 'SERVICE'
[Unit]
Description=Time-lapse Camera Service
After=multi-user.target
[Service]
Type=simple
User=pi
ExecStart=/usr/bin/python3 /home/pi/timelapse.py
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
SERVICE
sudo systemctl enable timelapse
sudo systemctl start timelapse
# Check status
sudo systemctl status timelapse
# View recent captures
ls -la /home/pi/timelapse/ | tail -5
Compiling the Time-Lapse Video
# Install ffmpeg
sudo apt install ffmpeg -y
# Compile images into a video
cd /home/pi/timelapse
# 30fps video from numbered images
ffmpeg -framerate 30 -pattern_type glob -i 'plant_*.jpg'
-c:v libx264 -pix_fmt yuv420p -crf 18
-vf "scale=1920:1440"
timelapse_output.mp4
# Options:
# -framerate 30: 30 frames per second (each 5-min interval = 1/30th of a second)
# -crf 18: High quality (lower = better, 18-23 is good)
# -vf "scale=1920:1440": Resize to HD resolution
# Calculate video duration:
# 5-min intervals for 7 days = 2016 frames
# At 30fps = 67 seconds of video
Weatherproofing for Outdoor Use
- Use an IP65-rated enclosure or a waterproof case.
- Seal the camera lens opening with a glass window or clear acrylic.
- Use silicone sealant around cable entry points.
- Power via a weatherproof extension cord or PoE (with a PoE HAT).
- Position under an overhang when possible to reduce direct rain exposure.
- During Indian monsoon season, add silica gel packets inside the enclosure to absorb moisture.
Frequently Asked Questions
How long can a Raspberry Pi run a time-lapse?
Indefinitely, with power and storage. A 64GB microSD card holds approximately 10,000+ full-resolution images. For longer projects, use an external USB drive or delete transferred images periodically.
What interval should I use for plant growth?
For fast-growing plants (beans, sunflowers): 5-10 minutes. For slow-growing plants (succulents, trees): 30-60 minutes. For flowers opening/closing: 1-2 minutes. Experiment based on the growth rate.
Can I use Pi Camera Module 3 for night photography?
The standard Camera Module 3 struggles in low light. Use the NoIR version with IR LEDs for night-time capture. This is especially useful for wildlife time-lapses.
How much storage does a time-lapse project use?
At full resolution (12MP), each JPEG image is about 4-6MB. Capturing every 5 minutes for 30 days produces ~8,640 images, using approximately 40-50GB of storage.
Can I view the time-lapse remotely while it is running?
Yes, set up a simple web page using Python Flask to serve the latest image, or use VNC to view the Pi desktop. You can also use SSH with scp to download recent images.
{“@context”: “https://schema.org”, “@type”: “FAQPage”, “mainEntity”: [{“@type”: “Question”, “name”: “How long can a Raspberry Pi run a time-lapse?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “Indefinitely, with power and storage. A 64GB microSD card holds approximately 10,000+ full-resolution images. For longer projects, use an external USB drive or delete transferred images periodically.”}}, {“@type”: “Question”, “name”: “What interval should I use for plant growth?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “For fast-growing plants (beans, sunflowers): 5-10 minutes. For slow-growing plants (succulents, trees): 30-60 minutes. For flowers opening/closing: 1-2 minutes. Experiment based on the growth rate.”}}, {“@type”: “Question”, “name”: “Can I use Pi Camera Module 3 for night photography?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “The standard Camera Module 3 struggles in low light. Use the NoIR version with IR LEDs for night-time capture. This is especially useful for wildlife time-lapses.”}}, {“@type”: “Question”, “name”: “How much storage does a time-lapse project use?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “At full resolution (12MP), each JPEG image is about 4-6MB. Capturing every 5 minutes for 30 days produces ~8,640 images, using approximately 40-50GB of storage.”}}, {“@type”: “Question”, “name”: “Can I view the time-lapse remotely while it is running?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “Yes, set up a simple web page using Python Flask to serve the latest image, or use VNC to view the Pi desktop. You can also use SSH with scp to download recent images.”}}]}
Get All Your Raspberry Pi Components from Zbotic.in
India’s trusted store for genuine Raspberry Pi boards, HATs, accessories, and components. Fast shipping across India with expert support.
Add comment