Arduino Time Lapse

13K576

Intro: Arduino Time Lapse

That's what we are going to do:


We need:
-Arduino board.
-Sd Breakout Board.
-TTL Serial JPEG Camera.
-RTC Breakout Board (optional).

STEP 1: Wiring

This is how wiring works:

Camera:
5V -> 5V
GND -> GND
TX -> D2
RX -> 10K Resistor -> D3

SD:
5V -> 5V
GND -> GND
CLK -> D13
D0 -> D12
DI ->D11
CS -> D10

***RTC:
GND -> GND
5V -> 5V
SDA -> A4
SCL -> A5

***This part is optional. I use it to save files with this date format:
DDHHMMSS.JPG
D for day
H for Hour
M for Minute
S for Seconds

This way, I could mix this project with a weather station to know how was the sky when the moisture value was XX%.
The other reason is that I could plug out the board and plug in back without file overwriting issues.

I had long wire to the camera, this way I could fix it to something and keep the SD somewhere where the the card manipulation wouldn't move camera support (I toke the SD card out some seconds to check everything was fine).

STEP 2: Firmware

This are the libraries that you might need:

SD (adafruit) >> https://github.com/adafruit/SD

Camera >> https://github.com/adafruit/Adafruit-VC0706-Serial-Camera-Library

RTC >> https://github.com/adafruit/RTClib


---------------------------------------------------------

Full Code:
https://github.com/xfoguet/TimeLapse

If you are not going to use the RTC for naming files, just declare an int variable and ++ on every loop.
You'll have to fill the file name array with 0 to keep names in alphabetic order (I did had some issues with that).
I'll try to upload a new code for this version soon.

STEP 3: Jpg Capture to Avi

I used a 2Gb SD card.

The cam takes a picture every 15 seconds (what I takes to save each image to SD).
Every image is 47Kb, so make your math.

For this test video I used 3000 pictures (24h ), 150Mb.

Video Editing:

I used: "PhotoLapse 3"

URL: http://home.hccnet.nl/s.vd.palen/

Just choose the containing jpg's folder, "Load files from current folder". Then choose a FPS that suits your project (20FPS make it smooth and nice cloud movement).
> Create Movie

Watch it, did you liked it?¿
If so, time to share it!!! But... You might have noticed that it might be 1Gb of video (as it isn't compressed). I suggest you to use this freeware tool:
VirtualDub
With it, you can compress the movie to div-x or any other format. There are tons of tutorials. I even editted the video and cut some night hours, as nothing happened.

Enjoy your Vids!!!

5 Comments

Hi there! it looks like the link to your GitHub repo might be broken - would you be able to fix?

Nice tutorial! I would rather save the photos on the SD card, display directly to a TFT display (3.5 "or larger), you would have any schematic to do this?
Thank you very much

Hi xfoguet thanks for this great project. It runs very well after including

#include <SPI.h>

I
have a question. Is it possible to show the taken picture an a
sainsmart 1.8 TFT while the arduino ist saving the picture on the SD
card?

Then I can see the pictures an have the chance to make the camera position better.

Greetings from Berlin, Germany

Ulli