DIY Outdoor Time-Lapse Photography

Update: Check out my latest Camera Axe project for a much more robust device that handles this.

There is a beautiful overlook of Worcester Massachusetts near my home.  I wanted to build a weatherproof camera box that automatically takes one picture an hour so I can make a time lapse video of the changing seasons.  One requirement was to keep it cheap and already had a Fuji F30 point and shoot camera.  If I had a Canon Powershot I would have used CHDK, but instead I hacked this together using an Arduino and my F30 camera.

The basic premise is to run an Arduino as a timer and once an hour it turns on a relay.  The reason for the relay is minimize power usage while the Arduino is running as a timer.  When the relay is powered up the servo and camera also get turned on. Then the Arduino uses a servo to turn on the camera and take a picture.  A 5 volt regulator is used to make sure the system could provide enough current to the servo and camera.  After seeing how little current my camera draws, I realized I could have used the 5 volt regulator on the Ardunio board, but the regulator is cheap so there is no harm in using it like I did.  You want to make sure the coil on the 5 volt relay you choose uses less than 40 mA or you will exceed the max current draw from an Arduino pin which could damage the Arduino after extended use.  If you want to use a relay with a greater than 40 mA current draw you should use a circuit like I described in this article.

This project only cost me $20 for the cheap lawn mower battery because I already had the camera, Ardunio, servo, 5v regulator, power plug, wire, wood, and paint. If you had just the camera and Arduino then a trip to Radio Shack and Home Depot would get you the parts you need for about $25.

Here is a block diagraph showing my system.

Here is a test video I made with it. The software I used to splice together the jpg images was the free JPGVideo. The video was just a quick indoor test of the system. I set it to take a picture every two minutes and it took about six hours for the ice to melt. This gave me about 180 images that I converted to this video. Next, I am going to use it to record a hardwood floor installation and then I’m going to setup outside to record the seasons. If I get any really cool videos I’ll try to update this article with them later.

Some of the most interesting data I collected during this project was the current use from the 12 volt battery.  The current draw when the relay is off is only around 0.07 mA.  I had no idea the Arduino used so little power (0.84 mW)!  The current draw when the relay and servo are on is around 210 mA.  The current draw with the relay, servo, and camera is around 300 mA. But remember these higher current draws only happens for a few seconds while you are taking a picture.

Below are some picture of the box I made. Note that these pictures were taken before I put on a plexiglass cover over the camera.  You can see I put a cheap lawnmower battery in there.  I’m not sure how long it will last, but I ran it for over 2 weeks and everything is still fine.  I suspect it would run much longer.  Just doing some napkin calculations yield 0.07 mA * 24 + 300 mA * 20/60/60*24 = 42 mA per day.  These batteries don’t say how many Amp hours they hold, but I’d be shocked if it’s under 10 which gives me 238 days of use.  This doesn’t matter to me though since my memory cards need to be swapped out every 2 weeks.  Another option for longer run times would be attaching a small solar panel to this system.

Here is the Arduino code I used:

// Maurice Ribble
// 3-5-2009
// http://www.glacialwanderer.com/hobbyrobotics
// This program uses a servo to triger a camera to take a picture every x minutes.
// The code depends on the built in servo library.  Arduino version 0013 has it.

#include 

// This is the pin you need to attach the servo to (only 9 and 10 are valid)
#define SERVO_PIN           9
#define RELAY_PIN           2

// These are the servo values that correspond to camera controls
// These will need adjusting for each setup
#define CAMERA_ON           100
#define CAMERA_PIC          80
#define CAMERA_NUEUTRAL     90

#define MINUTES_BETWEEN_PICS 1

Servo g_servo;

void setup()
{
  pinMode(SERVO_PIN, OUTPUT);
  pinMode(RELAY_PIN, OUTPUT);

  // Use serial to help debug
  //Serial.begin(9600);
  //Serial.println("Setup");
}

void loop()
{
  static int minutes = MINUTES_BETWEEN_PICS; // Start with a picture so we know it's working

  if (minutes >= MINUTES_BETWEEN_PICS)
  {
    digitalWrite(RELAY_PIN, HIGH);
    g_servo.attach(SERVO_PIN);
    g_servo.write(CAMERA_ON);
    delay(5000);
    g_servo.write(CAMERA_PIC);
    delay(5000);
    g_servo.write(CAMERA_ON);  // My camera turns off if you press on again
    delay(5000);
    g_servo.write(CAMERA_NUEUTRAL);
    delay(1000);
    g_servo.detach();
    digitalWrite(RELAY_PIN, LOW);

    delay(44000);
    minutes = 1;
  }
  else
  {
    delay(60000);
    ++minutes;
  }
}

One future improvement I might make is to add a light sensor so I can take pictures only during a sunset. Anyone else have other ides for improvements? Let a comment with your ideas.

I left out some of the details like the power plugs I used for my camera because every camera will be different, but if you have questions just ask and I’ll do my best to answer them.

11 Comments

  1. Jener8tionx said,

    March 11, 2009 @ 3:29 pm

    Very Nice!!!

  2. Mark Rehorst said,

    March 11, 2009 @ 10:42 pm

    Very nice! I am working on a similar project using a PIC to drive a servo. Can you post a more detailed photo that shows how you coupled the servo to the shutter button?

  3. Shutter @ arduino Forum said,

    March 13, 2009 @ 9:27 pm

    Use an external pot to control time interval between photos.
    Um, you could invest in a camera with a remote trigger instead of using servos,
    Or take apart a camera and hack it to use the arduino to control the power button and shot button.

  4. ribblem said,

    March 16, 2009 @ 2:17 pm

    Mark, if you click on the middle (vertical) right photo you can see a photo of how the servo presses the buttons. It’s basically some wire I just stuck into the standard servo control arms. I should have taken a picture of it before I assembled it, but I didn’t. Since I glued in the servo I can’t easily remove it anymore.

    Also worth mentioning here is that if your camera supports remote shutter triggering I did write a post about how to trigger the camera from the arduino awhile back. http://www.glacialwanderer.com/hobbyrobotics/?p=13

  5. Maurice Ribble said,

    March 30, 2009 @ 7:51 pm

    Here is a video I made with this camera of my hardwood floor getting installed.

    http://www.youtube.com/watch?v=LlvdiFXlCzs

  6. Inigo Montoya said,

    April 20, 2009 @ 3:13 pm

    Is there a particular reason you are using a 12v battery? To only thing getting 12v seems to be the Arduino, which can do fine on 5v. Wouldn’t 4 AA cells work, saving you from having to put in the 7805?

    Or am I missing something?

  7. Maurice Ribble said,

    April 20, 2009 @ 3:24 pm

    I used a 12 volt battery because I wanted a big battery (large number of amp hours). I got big lawn mower battery cheap.

    4AA cells would work and I actually tested with this. I’m not sure if you *need* the 5V regulator, but I wanted to drop the voltage going to the camera. My camera might be ok with a slightly higher voltage, but I’m not sure.

    Right now the box has been outside taking pictures for about 2 week. I will let it set there until it’s summer so I can watch spring happen in time lapse.

  8. vic said,

    June 15, 2009 @ 7:38 am

    Nice, but maybe you could try to hold the trigger half-pressed between shots. This way the camera would keep the same focus/white balance/exposure settings between all images and the end video would look much smoother. Of course you’d need to keep the camera always on then.

  9. Jason said,

    June 15, 2009 @ 12:01 pm

    Vic, as long as the camera isn’t fully automatic, you should be able to set it to manual focus, change the white balance from automatic to Daylight or whatever, and potentially keep the exposure settings the same. The issue with keeping the exposure settings the same is if you expose correctly for sunlight, a cloudy day will be dark and sunrise/sunset images will be very dark or black. I think you have to let the camera reset the exposure settings for each picture.

    Great articles!

  10. Andrew Miller said,

    December 7, 2009 @ 11:32 pm

    Nice work! Thanks so much for the low cost transmitter/reciever idea, it’s exactly what I’m looking for…

  11. free radio stations said,

    February 12, 2013 @ 6:01 pm

    Hi everyone, it’s my first go to see at this web page, and piece of writing is truly fruitful for me, keep up posting these articles.

RSS feed for comments on this post