Time Lapse met raspberry pi

Time lapse photography is a great way to record the passage of time. It adds the dimension of time to videos that we can not see with our naked eyes. The problem with time lapse photography is that you must leave the camera for a long time at the same place.

1. What do you need:

1.1 This tutorial is made use of the raspberry pi 3B


  • Computer
  • Router
  • network cable: RPI 3B also has a Wi-Fi connection
  • A working debian system
  • Micro SD card
  • Camera for RPI : NoIR camera V2


2. Roadmap

2.1 SSH into your Raspberry Pi and configure

Use putty:


PuTTY is a free telnet- SSH client. It is software that anyone can connect to another computer, usually these are servers with a UNIX-based operating system. PuTTY is a replacement for a terminal (also called Teletype, TTY named), a machine that was used for the introduction of the personal computer to connect to a server. The connection between the terminal and the server software now proceeds via the SSH protocol, which is seen as a safer replacement for the obsolete telnet protocol.


PuTTY has no installation and can be put down anywhere on the hard drive. The software is available for Windows and Unix-like operating systems.




Login with your username and password directly on your Raspberry Pi, open a terminal. Use the command sudo ifconfig to determine the IP address. The following figure shows that use become the wifi (Wlan0): address is



Enter the IP address and click open.

Once opened Log in with your username and password: This standard will raspberry pi his.

Use the command sudo grater-config in order to arrive in the configuration of the raspberry.

It opens a raspberry pi software configuration tool, here you go turn on the camera and expand the SD card.

Navigate to interfacing options, select the P1 camera and turn it on. Under advanced options expands d SD card. If this 2 his affairs in order, Raspberry Pi gives you a complete update with the command:

Sudo apt-get update and press enter

Sudo apt-get upgrade and press enter



Apt-get update will download the package lists the repositories and “update” them to get information on the latest versions of packages and their dependencies.

An update should always be performed before an upgrade or dist-upgrade.

Apt-get upgrade retrieves new versions of packages that are on the machine when APT is aware of these new versions via apt-get update.


2.2 Setting up the camera and the script

You go to the directory /home/pi

Use the command pwd to see what directory you are, if you are in a different directory as /home/pi use the command cd /home/pi to go to the right directory.

Use the command ls -l to list the directory.


Once in the correct directory, test to see if the camera works. For this you typed the command:

raspistill -o photo.jpg

If you're from list all the command ls -l, you will see a file photo.jpg created under directory /home/pi, wants to see this picture, you have to go look directly at the rasperry pi. You can also save to a network this photo, This is not an issue, more information related to network folders can be viewed at:



2.3 create script

The next step is a little script that automatically photos available, these photos we store them in a separate folder.

SSH back into the pi via putty or directly on the pi. Create a directory with the command sudo mkdir photos, Do this under your home directory.

Once the folder is created, you going to go into it with the command: cd photos

If you are in the photos folder, you can use the command: sudo nano photos.sh Creating the script.

Copy the code below and paste it into the configuration file, beat on ctrl o one of sluit ctrl x.

DATE=$(date +”%Y-%m-%d_%H%M”)
raspistill -o /home/pi/photos/$DATE.jpg

To make sure that the script works use the command: sudo sh photos.sh

Go to your directory and photos here will now 1 pictures are in.

2.4 Automating the timelapse

What we want to do is, take pictures at specified intervals. For this we go cronjobs use.


A Cronjob or crontab is a Unix command that executes a program or script at a specified time. Cronjobs used in Unix-like systems such as Linux, BSD Apple Macintosh. The word "cron’ comes from the English word chronograph, which is a kind stopwatch. Later job here (task) added to. A cron job that runs a system service is called a daemon. These are usually server applications.

Cronjobs often used for retrieving e-mail, sending e-mail or checking for updates. As a Cronjob a (web)server is used, is often to create a backup of a database, calling a PHP or Perl script or perform a server command. Most web hosts offer cronjobs in a control panel such as Plesk or DirectAdmin.

Cron can be compared with the scheduler under Microsoft Windows and works exactly the same. Who cronjobs through the terminal finds difficult to set, There are several programs with a graphical user interface (GUI) which can be created via a cron job a few clicks.



Type in your terminal sudo crontab -e, This command will open the crontables for you. Select continue option 2. /bin/nano

Once opened, go all the way down and add the following into the configuration file:

*/5 * * * * sh /home/pi/photos/photos.sh

Save the file with ctrl ctrl or x

Start the service with sudo service cron start

This will ensure that every 5 minutes a picture word, you want to be made faster pictures you can 5 change to eg. 1 minute.


To check all you can under the directory /home/pi/photos the command sudo watch ls to carry out, after each 5 minutes or else there will be one more picture to be added here.

If you have enough pictures, you can copy it to your computer to organize them for a time lapse. For this purpose consists enough software to be able to achieve this.

On you tube I found a video of a guy who explains it in a clear way, mainly used free software and comes to a good result.

Leave a Reply

Your email address will not be published. Required fields are marked *