MAKE A TIME-LAPSE CAMERA WITH THE RASPBERRY PI

hi guys,
lets make a raspberry pi timelapse camera. the raspberry pi can be programmed to click pictures at regular intervals. theses pictures can be used to create a time-lapse video.

Let us begin

Parts you will need:

  • Raspberry pi
  • Raspberry pi camera
  • Camera stand

If you are using the raspberry pi camera for the first time and need some help, here is a tutorial on how to install the camera module. The SimpleCV installation is optional though.

The  Camera Stand

nokia 5230 stand
The time-lapse camera will work best if the camera is steady when clicking pictures, hence a stand is necessary .

There are stands and mounts available for the raspberry camera for a few bucks.

You can also be a bit creative and make one from old parts. For e.g.I have used my old Nokia phone stand to make a stand for the camera. Just  a Polystyrene foam cube and a few pins did the trick.

The Final part

  • Connect the camera to the raspberry pi and mount it to the stand
  • Boot up the pi
  • Make a folder on the desktop for the camera pics. Name it as timelapse
  • Here is the the program. copy and paste it in a new python window and save it as timelapse.py
from picamera import PiCamera
from time import sleep

camera = PiCamera() #starts the camera
max_pics=60 #adjust the value for max no of pics
delay = 60 #seconds #adjust this value too

#camera.start_preview() #uncomment to start camera preview

i=0
while i<(max_pics):

   camera.capture('/home/pi/Desktop/timelapse/'+str(i)+'.jpg')#capture photo
   sleep(delay) #delay in between pics
   i+=1 #increment i by one unit
 
camera.close() #close camera after its done
  • Adjust the ‘max_pics‘ value to limit the amount of pics to be clicked.
  • You’ll need to do one more thing. that is adjust the time in between clicking pics.
    to do that change the value of ‘delay’ in the program
  • Make sure the camera is positioned in the correct direction before clicking pics. you can view the camera feed by uncommenting the ‘#camera.start_preview()’. 
  • Run the program. it will click pics continuously untill the max_pics limit is raeched
  • The pics will be saved in time-lapse folder you have created.

raspberry pi timelapse camera top view

After the program runs you’ll end up with a lot of camera pics in the timelapse folder.

To make a time-lapse video from these pics you will have to use a software like the timelapsetool for windows. Just download and install the software from the website. and import the pics to the software to create videos.

That’s it for this post. Like, share, comment and follow for more such projects.

Advertisements

One thought on “MAKE A TIME-LAPSE CAMERA WITH THE RASPBERRY PI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s