Introduction: How to Shoot Timelapse-video With the Intel Galileo Gen 2

Picture of How to Shoot Timelapse-video With the Intel Galileo Gen 2

In the following we will show you how to shoot a timelapse-video with the Intel Galileo Gen 2 or a similar board.
We will use a 2.5mm jack to connect the board to a Canon DSLR and then control the shutter with our board.

Generally Canon DSLRs do not have a function to make a timelapse on their own and remote triggers (or intervalometers) are often expensive. If you have a Galileo board or something similar laying around, there is an easy and cheap solution to accomplish stunning Timelapse-videos with it. You can also control every aspect like exposure, duration, change in exposure etc. individually simply by editing or adding additional code to our basic program.

Timelapse-videos can show us another view and the beauty of slow processes (for example moving clouds) because they sum up a big time interval in just a few seconds of video. In timelapse-photography the camera takes a picture every X seconds and repeats this step a few hundred times. Depending on your choice of X and how long your resulting video should be, this can take from 10 minutes to hours of shooting. When the timelapse is finished and you put the pictures together to create a videofile, the hours of shooting get shrinked down to a few seconds of video.

To get an idea how a timelapse looks like, you can find many examples on the internet or just look down at the samples we shot with the Galileo board.

Now let's get started!

Step 1: What You Need:

Picture of What You Need:

For the circuit you will need the following:
- 2,5mm audio jack
- opto-isolator (PC817 or something similar)
- resistor (680 Ohm)
- wires
- a soldering iron or a breadboard to connect the components

Step 2: How to Build the Circuit:

Picture of How to Build the Circuit:

To build the circuit you need to connect the wires as shown in the pictures above.

To trigger the camera we just need to plug the 2,5mm jack in the camera. The camera will trigger if you connect the outer most contact to the inner one (as shown in the picture, marked with Cam+ and Cam-).

The Opto-isolator will be connected with the Resistor on one side to pin 13 and GND to the Galileo board and on the other side to the 2,5mm jack. If we now power pin 13 on the board, the Opto-isolator will connect Cam+ and Cam- and the camera will act as if the trigger is pressed. Therefore if we set the camera to manual-mode and the exposure to bulb we can even control the shutter speed by powering pin 13 for a certain time. If we dont want to control the shutter speed, we can just use manual-mode and a fixed exposure. Generally manual-mode is a good idea to assure a flicker free video in the end. If we have changing light conditions (e.g. at sunrise/sunset), we can use a special program on the Galileo to adapt the shutter speed over time.

Step 3: How to Program the Galileo Board:

To get started load one of the following programs with the Arduino IDE on your Intel Galileo Board Gen 2.

The Serial Monitor provided in the Arduino IDE will give feedback about the progress of the timelapse.

1. A simple program for a timelapse:

/*<br>  Simple Timelapse:
  This program shoots a timelapse with the given parameters: shots, shutter and wait.
  With this setup the board will take 300 pictures
  with 0.5 seconds exposure every 2.5 seconds.
  The progress will be shown in the serial monitor.
*/
 
 int shots = 300; // Number of pictures to be shot
 int shutter = 500; // Shutter speed (in ms)
 int wait = 2500; // Waiting time between the pictures (in ms)

 void setup() {
  pinMode(13, OUTPUT); // Set Pin 13 as output
  Serial.begin(9600);  
  delay(5000);         // Wait 5 seconds to get ready
  
  Serial.println("Starting Timelapse.");

  for (int i = 1; i <=shots; i++) { // Repeat shooting pictures until all shots are done 
    shoot();
    showProgress(i);            
    delay(wait);
  }
  Serial.println("Timelapse complete.");
}

// Force the camera to take a picture with the given shutter speed 
void shoot() {
  digitalWrite(13, HIGH); 
  delay(shutter);
  digitalWrite(13, LOW);
}

// Show progress on the Serial Monitor
void showProgress(int i){
  Serial.print("Pictures shot: ");
  Serial.print(i);
  Serial.print("/");
  Serial.print(shots);
  Serial.print(", Time remaining: ca. ");
  // Evaluate the remaining time in minutes and seconds
  Serial.print((shots-i)*(shutter+wait)/60000);  
  Serial.print("m ");
  Serial.print(((shots-i)*(shutter+wait)%60000)/1000); 
  Serial.print("s\n");
}

void loop() {
   delay(1000);
}


2. A more advanced version with changing exposure:

/*<br>  Timelapse with changeing exposure.
  This program shoots a timelapse starting with the shutter speed given in shutterStart
  and then adapts the time every shoot until it reaches the time given in ShutterEnd.
  The progress will be shown in the serial monitor.
*/
 
int shots = 120; // Number of pictures
int shutterStart = 500; // Shutter speed at the beginning of the timelapse(in ms)
int shutterEnd = 2000; // Shutter speed at the end of the timelapse (in ms)
int wait = 4000; // Waiting time between the pictures (in ms)

void setup() {
  pinMode(13, OUTPUT);  // Set pin 13 as output
  Serial.begin(9600);
  delay(5000);          // Wait 5 seconds to get ready
  Serial.println("Taking initializing start picture.");
  //Sometimes the first picture has a wrong exposure, therefore take initializing picture
  shoot(1000);
  Serial.println("Done. Waiting for the camera.");
  delay(3000); //The camera needs some time to process the image
  
  Serial.println("Starting Timelapse.");
  for (int i = 1; i <=shots; i++) {
    shoot(shutterStart + (shutterEnd-shutterStart)*i/shots);  // Adapt the exposure over time
    showProgress(i);   
    delay(wait);
  }
  Serial.println("Timelapse complete.");
}

// Force the camera to takes a picture with shutter speed x
void shoot(int x) {
  digitalWrite(13, HIGH);
  delay(x);
  digitalWrite(13, LOW);
}

// Show Progress on the Serial Monitor
void showProgress(int i){
  int shutter = (shutterStart + shutterEnd)/2; // Average shutter speed for time calculation
  Serial.print("Pictures shot: ");
  Serial.print(i);
  Serial.print("/");
  Serial.print(shots);
  Serial.print(", Shutter: ");
  // Print current shutter speed:
  Serial.print(shutterStart + (shutterEnd-shutterStart)*i/shots);
  Serial.print("s, Time remaining: ca. ");
  // Evaluate the remaining time in minutes and seconds
  Serial.print((shots-i)*(shutter+wait)/60000);
  Serial.print("m ");
  Serial.print(((shots-i)*(shutter+wait)%60000)/1000);
  Serial.print("s\n");
}

void loop() {
   delay(1000);
}<br>


It is of course possible to edit these programs to accomplish special goals like e.g. a waiting time changing over time or what ever is desired.

Step 4: The Resulting Video:

To test our project we shot two short sample videos, one showing the board itself while shooting the timelapse and one in the cafeteria at the RWTH Aachen University.

Step 5: What Else Could Be Possible?

This project is part of the Multi Modal Media Madness Lab held by the Media Computing Group at the RWTH Aachen University: http://hci.rwth-aachen.de/m3_ss15.This is just a small example to show what is possible with the Galileo board. To really get a use for the massive power provided by the board it would be possible to extend the functionality and maybe try to get the liveview image from the camera by plugging a Micro-USB-Cable in the camera and the Galileo board. It then could be possible to send this live image via the ethernet-connector on the Galileo board in the internet and then control the camera from everywhere in the world.

Because the Galileo board is capable of handling different kinds of sensors it could be possible to connect a lightsensor aswell. With this sensor it would be possible to meassure the surrounding light, even up the results and then choose an exposure corresponding to these values. The resulting resulting timelapse would adapt without any additional settings precisely to the light changes in the environment.

With some basic skills in engineering and some motors it could be possible to shoot rotating or sliding timelapses because every little component would be controlled by the Galileo board.

Comments

WERAQS (author)2015-11-14

just install magic lantern

amberrayh (author)2015-05-05

That's really cool that you can make a non time-lapse camera into a time-lapse camera. Great work! I hope we see more from you in the future!

About This Instructable

3,926views

34favorites

License:

More by Lukas O:Arduino Latency Measurement ToolkitHow to shoot timelapse-video with the Intel Galileo Gen 2
Add instructable to: