Raspberry Pi Zero W Time-Lapse Deck View Camera

Controlling a Point & Shoot Camera with a Raspberry Pi Zero W

I really want to shoot some great time-lapse video here on the island. We have beautiful clouds, sunsets, oceans waves… all kinds of things that a time-lapse might be fun to view. I have also collected a handful of point and shoot digital cameras over the years. I tested everything in my arsenal.

The Cameras

ImageDescription
Canon EOS 80D
Pixels (effective) 24.2 megapixelsPixels (total) 25.8 megapixelsMaximum resolution 6000 × 4000 pixels (3.7 μm pixel size)Sensor Size 22.3 × 14.9 mm (APS-C format)
Panasonic Lumix DMC-FH27
Pixels (effective) 16.1 MegapixelsPixels (total) 16.6 Total MegapixelsSensor Size 1/2.33-inch
Canon PowerShot ELPH 330 HS
Pixels (effective) 12.1 MegapixelsPixels (total) 12.8. Megapixels
Panasonic Lumix DMC-ZS50
GoPro Hero 3+ Black Edition

https://maskaravivek.medium.com/how-to-control-and-capture-images-from-dslr-using-raspberry-pi-fdfa9d600ec1

Install libgphoto2 and gphoto2

libghoto2 library lets you interface with 100s of supported DSLR cameras and ghoto2 is a command-line utility for using libghoto2. Here are the steps for installing both these libraries.

Prerequisites

Install the following dependencies:

sudo apt-get install git make autoconf libltdl-dev libusb-dev libexif-dev libpopt-dev libxml2-dev libjpeg-dev libgd-dev gettext autopoint

Install libghoto2

Download the latest code for libgphoto2 from:

git clone https://github.com/gphoto/libgphoto2.git

Execute the following commands to install libgphoto2

cd ~/libgphoto2
autoreconf --install --symlink
./configure
make
sudo make install
cd ~

Install ghoto2

Download code for gphoto2

git clone https://github.com/gphoto/gphoto2.git

Build and installgphoto2

cd ~/gphoto2
autoreconf --install --symlink
./configure
make
sudo make install
cd ~

Update Configs

Add the following line in /etc/ld.so.conf.d/libc.conf

/usr/local/lib

Refresh cache before proceeding further.

sudo ldconfig

Generate udev rules for the camera

/usr/local/lib/libgphoto2/print-camera-list udev-rules version 201 group plugdev mode 0660 | sudo tee /etc/udev/rules.d/90-libgphoto2.rules

Generate the hardware database file for udev

/usr/local/lib/libgphoto2/print-camera-list hwdb | sudo tee /etc/udev/hwdb.d/20-gphoto.hwdb

Using ghoto2

Now that we have both the libraries installed, now we can use ghoto2 for interfacing with the camera. Make sure that the camera is connected to the Raspberry Pi.Execute the following command to see if ghoto2 can detect the camera.

gphoto2 --auto-detect

Canon EOS 80D

So, yes. This camera would work. It’s also my very best camera. I have no intention of putting this on the deck outside for extended periods of time!

pi@rpzw-deckcam:~ $ gphoto2 –list-config

/main/actions/syncdatetimeutc

/main/actions/syncdatetime

/main/actions/uilock

/main/actions/popupflash

/main/actions/autofocusdrive

/main/actions/manualfocusdrive

/main/actions/cancelautofocus

/main/actions/eoszoom

/main/actions/eoszoomposition

/main/actions/viewfinder

/main/actions/eosremoterelease

/main/actions/eosmoviemode

/main/actions/opcode

/main/settings/datetimeutc

/main/settings/datetime

/main/settings/output

/main/settings/movierecordtarget

/main/settings/evfmode

/main/settings/ownername

/main/settings/artist

/main/settings/copyright

/main/settings/customfuncex

/main/settings/focusarea

/main/settings/strobofiring

/main/settings/flashcharged

/main/settings/oneshotrawon

/main/settings/autopoweroff

/main/settings/depthoffield

/main/settings/capturetarget

/main/settings/capture

/main/settings/remotemode

/main/settings/eventmode

/main/status/serialnumber

/main/status/manufacturer

/main/status/cameramodel

/main/status/deviceversion

/main/status/vendorextension

/main/status/model

/main/status/Battery Level

/main/status/batterylevel

/main/status/lensname

/main/status/eosserialnumber

/main/status/availableshots

/main/status/eosmovieswitch

/main/imgsettings/imageformat

/main/imgsettings/imageformatsd

/main/imgsettings/imageformatcf

/main/imgsettings/iso

/main/imgsettings/whitebalance

/main/imgsettings/colortemperature

/main/imgsettings/whitebalancexa

/main/imgsettings/whitebalancexb

/main/imgsettings/colorspace

/main/capturesettings/zoomspeed

/main/capturesettings/exposurecompensation

/main/capturesettings/focusmode

/main/capturesettings/continuousaf

/main/capturesettings/aspectratio

/main/capturesettings/storageid

/main/capturesettings/highisonr

/main/capturesettings/autoexposuremode

/main/capturesettings/autoexposuremodedial

/main/capturesettings/drivemode

/main/capturesettings/picturestyle

/main/capturesettings/aperture

/main/capturesettings/shutterspeed

/main/capturesettings/meteringmode

/main/capturesettings/liveviewsize

/main/capturesettings/bracketmode

/main/capturesettings/aeb

/main/capturesettings/alomode

/main/other/d402

/main/other/d407

/main/other/d406

/main/other/d303

/main/other/5001

Panasonic Lumix DMC-ZS50

PC Mode

PTP Mode

So, No. This camera does not support my minimum needs (Nothing listed under capture choices)

/main/actions/opcode

/main/status/serialnumber

/main/status/manufacturer

/main/status/cameramodel

/main/status/deviceversion

/main/status/vendorextension

/main/status/batterylevel

/main/other/d406

/main/other/d407

/main/other/5001

Panasonic Lumix DMC-FH27

PTP Mode

So, No. This camera does not support my minimum needs (Nothing listed under capture choices)

Canon PowerShot ELPH 330 HS

So, No. This camera does not support my minimum needs (Nothing listed under capture choices)

Conclusion

In the end, I didn’t even need the Raspberry Pi Zero W here. The Hero 3+ has a wonderful interval timer. It’s also designed for rougher use and weather/water safe.

It’s turns out that the Hero like uses HTTP of all things as it’s remote protocol. And there the is a python library.

https://pypi.org/project/goprohero/

Sweet! It’s WiFi enabled too. This is my deck cam! GoPro Hero3+ Black edition for the win!

Leave a Reply