Raspberry Pi powered time lapse dolly (RasPiLapse)

 by rickadam
FeaturedContest Winner
vlcsnap-2012-12-30-17h16m26s58.jpg
Here's my instructable for a home build timelapse dolly. The pro rigs for this are pretty pricey, so I made my own :)

Please vote if you like this project!
 
Remove these adsRemove these ads by Signing Up

Step 1: Software

code.jpg
The heart of this machine is a Raspberry PI, a low cost small footprint computer. It runs linux so it's easy to write and deploy code on it. It also has a GPIO (General Purpose Input/Output) connector which we can control.

The code is pretty basic and written in python

I use the Raspian distro on my Raspberry Pi.

First, I installed Python, WiringPI and WiringPI-Python.

Next, I export the pins I will be using. I need two pins as outputs, so in a shell I type:

gpio export 18 out
gpio export 23 out

Now I can play around with pin 18 and 23.

Next, I write a python script to allow me to input exposure time, interval and number of shots. Here it is:

import wiringpi  #get wiringpi-python
from time import sleep 
io = wiringpi.GPIO(wiringpi.GPIO.WPI_MODE_SYS) 
triggerpin = 18 #set my pins
motorpin = 23
io.pinMode(triggerpin,io.OUTPUT) 
io.pinMode(motorpin,io.OUTPUT)
wiringpi.pinMode(triggerpin,1)
wiringpi.pinMode(motorpin,1)
exposure = input('exposure time: ') # pick exposure, interval and number of shots
interval = input('interval: ')
shots = input('number of shots: ')
motor = 72.8/shots
print 'begin'
while shots != 0:  # loop through actions until complete
    io.digitalWrite(triggerpin,io.HIGH)
    sleep(exposure) 
    io.digitalWrite(triggerpin,io.LOW)
    sleep(0.5)
    io.digitalWrite(motorpin,io.HIGH)
    sleep(motor)
    io.digitalWrite(motorpin,io.LOW)
    sleep(interval)
    shots = shots-1
    print shots

You may notice the motor time is 72.8 / number of shots - this means I can select a number of shots and the Pi works out the motor times needed to run the length of the track.

I save this to a file named 'timelapse.py'.

To make this easier to run in the field, I create a bash script to export the pins then run the python script:

#! /bin/bash
gpio export 18 out
gpio export 23 out
python timelapse.py

And save this as t.sh. I made it executable, so I simply need to type ./t.sh in a shell to get things up and running.
kjegelan says: May 19, 2013. 11:59 AM
Hello....! I really like your concept, and would like to build something similar...I bought the Raspberry Pi a while ago, and will try to make something with the thing. Not that into Linux, so there is some work to do there...I might find some info in here, that can explain for me in detail. Keep up the good work, and thank you for sharing..!
jtharkness says: Jan 15, 2013. 8:30 PM
Impressive
quixotiCfluX says: Jan 14, 2013. 3:18 PM
Very nice instructable, I can't wait to get into using the GPIO pins on my pi for cool stuff like this. And congrats on making it to the newsletter.
rickadam (author) in reply to quixotiCfluXJan 15, 2013. 12:29 AM
Cheers! Getting the GPIO running is satisfying, nothing like breaking out of software into the real world :)
Machine says: Jan 14, 2013. 4:20 AM
Very nice instructable and you do seem to have a lot of skill with Linux, Android and Python.
rickadam (author) in reply to MachineJan 14, 2013. 5:11 AM
Cheers!
fred_dot_u says: Jan 13, 2013. 9:06 AM
A simple elegant project, nicely executed. Those with Canon cameras that use CHDK will be able to use a 5v source to trigger the shutter, requiring only a tiny modification to your original configuration.

One could also easily modify this to rotate the camera and perform automated panorama photos.
rickadam (author) in reply to fred_dot_uJan 14, 2013. 5:11 AM
I really like the idea of adding panning to this rig, and will probably add that at some point :)
emils_s says: Jan 10, 2013. 3:03 AM
One more Is it possible to program computer to control 2 or maybe 3 motors wits 12v?
rickadam (author) in reply to emils_sJan 10, 2013. 3:03 AM
yeah it sure is - although at that voltage I'd be thinking about using a relay to switch the motor on and off...
wooac says: Jan 9, 2013. 9:01 AM
Nice. Better if it sat on one tripod. Fort Point might have more interesting vantage points.
rickadam (author) in reply to wooacJan 10, 2013. 12:26 AM
Cheers, it probably could be adapted to sit on one tripod quite easily - I find I can position it with two fairly well, and it keeps it nice and stable :)
emils_s says: Jan 9, 2013. 11:38 PM
Hello,

Great job! Could you please give more info about software and hardware. Where can I get that control unit? Maybe there is some special instructions found on internet for programming timelapse controller? if possible please post here or email me emils@emils.lv
rickadam (author) in reply to emils_sJan 10, 2013. 12:25 AM
Hi! The controller is a Raspberry Pi - it's a tiny computer that runs linux. I wrote the software myself in Python. I have a website for the project here: https://sites.google.com/site/raspilapse/

Cheers,

Rick
zorwick says: Jan 8, 2013. 12:41 AM
Super great job! Congrat!
rickadam (author) in reply to zorwickJan 10, 2013. 12:22 AM
cheers!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!