.
DIY Canon Intervalometer using Arduino Reviewed by Unknown on 22:07 Rating: 4.5

DIY Canon Intervalometer using Arduino



An intervalometer allows you to take photos at set intervals to view a slow process in super fast speed. Watching paint dry is just as boring in fast motion as it is at normal speed, however, when you point your camera to the clouds in the sky, you can get some amazing effects.
 
By taking a picture every 3 seconds, and then playing the sequence back at 30 frames a second, you will get to see a 10 minute event in just 7 seconds.To get a nice flowing motion picture, you need to get a good balance between the recording frame rate, and the play-back frame rate.
 

Clouds moving over city

 
The recording frame rate is limited by the amount of memory you have in your camera, the length of the captured event, battery charge, and the camera's general capabilities. The playback frame rate needs to be fast enough to prevent jittering, but not so fast that you lose the event in a blink of an eye. The more you practice with different subject matters, the more you get a feel for how long you need to keep the camera running and how long to leave between shots.
 
When taking pictures of the clouds, you can generally use a 3-5 second frame rate, depending on their speed across the sky. To capture the flow of traffic, I would recommend a picture every 1-2 seconds. However, for really slow events like a plant growing, you may need to extend the frame capture rate significantly. You will get a better idea once you try it for yourself.
 
 
City Traffic

 
This tutorial follows on from the Arduino selfie tutorial, so you might notice some similarities. However, in this tutorial, we will have more control over the intervalometer by using a sliding potentiometer and an LED bar. The pin layout is slightly different from the Arduino Selfie tutorial - so best to start from scratch to avoid pin misconfigurations.
 

Warning : Any circuit you build for your camera (including this one) is at your own risk. I will not take responsibility for any damage caused to any of your equipment.
 
I found out that my Canon Powershot SX50 HS camera has a port on the side for a remote switch. In the "Optional Accessories" section of the camera brochure, it identifies the remote switch model as RS-60E3. I then looked up the model number on this website to find out the size of the jack (3 core, 2.5mm), and the pinout (Ground, focus and shutter) required to emulate the remote switch. Once I had this information, I was able to solder some really long wires to the jack and connect up the circuit (as described below).
 
I use Time-Lapse tool to stitch all of the pictures together to create a movie/animation.
 
You will need to download and install the LED_Bar library from Seeedstudio into your Arduino IDE libraries folder in order to use the LED Bar in this tutorial. For more information about the LED Bar - visit the LED Bar Seeed-Studio wiki.
 

Parts Required:





 

Fritzing Sketch


 

 

 

 


 
 

Connection Tables


 
Arduino to Relay Module:
 

 
 
Relay Module to Camera:
 

 
 
Arduino to Slide Potentiometer:
 

 
 
Arduino to LED Bar:
 


 
 

Arduino Sketch


 
  1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
    
/* ===============================================================
      Project: DIY Canon Intervalometer using Arduino
       Author: Scott C
      Created: 9th October 2014
  Arduino IDE: 1.0.5
      Website: http://arduinobasics.blogspot.com/p/arduino-basics-projects-page.html
  Description: Use Arduino as an intervalometer for Canon PowerShot SX50 HS
               A slide potentiometer is used to control the time between photos.
               The LED Bar is used to display the delay between photos.
               A 3 core 2.5mm jack is used to connect the Arduino and Relay module to the Camera.
================================================================== */

 /* You will need to download and install the LED_Bar library from here: https://github.com/Seeed-Studio/Grove_LED_Bar */
 #include <LED_Bar.h>

 /* Connect 5V on Arduino to VCC on Relay Module
    Connect GND on Arduino to GND on Relay Module */

 #define CH1 7   // Connect Digital Pin 7 on Arduino to CH1 on Relay Module
 #define CH3 6   // Connect Digital Pin 6 on Arduino to CH3 on Relay Module
 
 int potPin=A0; //Connect Slide potentiometer to Analog Pin 0 on Grove Base Shield
 int potValue=0; //The variable used to hold the value of the potentiometer

 LED_Bar bar1(9,8); //Connect LED Bar to Digital I/O 8 on Grove base shield.
                   //The LED Bar actually uses digital pin 8 and 9.

 void setup(){
   pinMode(CH1, OUTPUT);
   pinMode(CH3, OUTPUT);
   
   //Turn OFF any power to the Relay channels
   digitalWrite(CH1,LOW);
   digitalWrite(CH3,LOW);
   delay(2000); //Wait 2 seconds before starting sequence
   
   //Focus camera by switching Relay 1
   digitalWrite(CH1, HIGH);
   delay(2000);
   digitalWrite(CH1, LOW); //Stop focus
   delay(3000);
 }

 void loop(){
      // Read the slide potentiometer and convert the reading to a value between 0 and 10.
      potValue=constrain(map(analogRead(potPin),0,1000,0,10),0,10);
      
      //Use the pot value to create a visual count-down display on the LED bar.
      for(int i = potValue; i>0; i--){
        bar1.setLevel(i);
        delay(1000);
      }
      
      //If the pot value is less than 1, then delay for 30 seconds.
      if(potValue<1){
        delay(30000);
      }
      
      //Turn LED Bar off when taking photo
      bar1.setLevelReverse(0);
      
      //Press shutter button for 0.1 seconds. Modify delay if required.
      digitalWrite(CH3, HIGH);
      delay(100);
      digitalWrite(CH3,LOW); //Release shutter button
 }



 


The Video


 



This project shows how to make your Canon Powershot SX50 HS a whole lot smarter using an Arduino. There are so many things that look so different with an intervalometer. While I connected a slide potentiometer to the Arduino to provide extra flexibility, and an LED Bar for visual feedback, there are many other sensors out there that can be combined with the camera. For example, you could use a PIR sensor to take a picture when movement is detected. Or take a picture when a laser trip-wire is broken. What about sound activation, light activation, leak detection.... the options are limitless.
 
This has been one of my favorite projects, it was a lot of fun, and very interesting.
I highly recommend that you try it out!



If you like this page, please do me a favour and show your appreciation :

 
 
Visit my ArduinoBasics Google + page.
Follow me on Twitter by looking for ScottC @ArduinoBasics.
Have a look at my videos on my YouTube channel.


 
 

 
 
 


However, if you do not have a google profile...
Feel free to share this page with your friends in any way you see fit.



Description: DIY Canon Intervalometer using Arduino Rating: 3.5 Reviewer: Unknown ItemReviewed: DIY Canon Intervalometer using Arduino
Relay Module Reviewed by Unknown on 07:53 Rating: 4.5

Relay Module

WARNING: Mishandling or incorrect or improper use of relays could result in

  • serious personal injury or DEATH
  • possible physical damage of the product
  • faulty operation
  • or create serious/dangerous hazards.

Please make sure that you read and understand how your relay/relay module board works, the voltage and current it is rated for, and the risks involved in your project BEFORE you even attempt to start putting it together. Seek professional and qualified assistance BEFORE you undertake ANY high power projects.

If you choose to follow the instructions in this tutorial, you do so at your own risk. I am not an electrician, and am not a qualified electrical engineer - so please do your research and seek advice BEFORE undertaking a project using a relay. Please check your connections and test them BEFORE turning the power on.

I accept no responsibility for your project, or the risk/damage/fire/shock/injury/death/loss that it causes. You take full responsibility for your actions/project/creation, and do so at YOUR OWN RISK !!!

Please note: It is illegal in some countries to wire up a high power project without an electrician. Please check your country's rules/laws/regulations before you undertake your project. If you have any doubts - don't do it.


 

What is a relay

A Relay is an electrically operated switch. Many relays use an electromagnet to mechanically operate the switch and provide electrical isolation between two circuits. In this project there is no real need to isolate one circuit from the other, but we will use an Arduino UNO to control the relay. We will develop a simple circuit to demonstrate and distinguish between the NO (Normally open) and NC (Normally closed) terminals of the relay. We will then use the information gained in this tutorial to make a much more exciting circuit. But we have to start somewhere. So let's get on with it.

Parts Required:

Fritzing Sketch


 


 
 

Table of Connections



 
 

Arduino Sketch


 
  1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46


/* ===============================================================
      Project: 4 Channel 5V Relay Module
       Author: Scott C
      Created: 7th Sept 2014
  Arduino IDE: 1.0.5
      Website: http://arduinobasics.blogspot.com.au
  Description: Explore the difference between NC and NO terminals.
================================================================== */

 /*
  Connect 5V on Arduino to VCC on Relay Module
  Connect GND on Arduino to GND on Relay Module 
  Connect GND on Arduino to the Common Terminal (middle terminal) on Relay Module. */
 
 #define CH1 8   // Connect Digital Pin 8 on Arduino to CH1 on Relay Module
 #define CH3 7   // Connect Digital Pin 7 on Arduino to CH3 on Relay Module
 #define LEDgreen 4 //Connect Digital Pin 4 on Arduino to Green LED (+ 330 ohm resistor) and then to "NO" terminal on relay module
 #define LEDyellow 12 //Connect Digital Pin 12 on Arduino to Yellow LED (+ 330 ohm resistor) and then to "NC" terminal on relay module
 
 void setup(){
   //Setup all the Arduino Pins
   pinMode(CH1, OUTPUT);
   pinMode(CH3, OUTPUT);
   pinMode(LEDgreen, OUTPUT);
   pinMode(LEDyellow, OUTPUT);
   
   //Provide power to both LEDs
   digitalWrite(LEDgreen, HIGH);
   digitalWrite(LEDyellow, HIGH);
   
   //Turn OFF any power to the Relay channels
   digitalWrite(CH1,LOW);
   digitalWrite(CH3,LOW);
   delay(2000); //Wait 2 seconds before starting sequence
 }
 
 void loop(){
   digitalWrite(CH1, HIGH); //Green LED on, Yellow LED off
   delay(1000);
   digitalWrite(CH1, LOW); //Yellow LED on, Green LED off
   delay(1000);
   digitalWrite(CH3, HIGH); //Relay 3 switches to NO
   delay(1000);
   digitalWrite(CH3,LOW); //Relay 3 switches to NC
   delay(1000);
 }


 

The Red light on the Relay board turns on when power is applied (via the VCC pin). When power is applied to one of the Channel pins, the respective green light goes on, plus the relevant relay will switch from NC to NO. When power is removed from the channel pin, the relay will switch back to NC from NO. In this sketch we see that power is applied to both LEDs in the setup() method. When there is no power applied to the CH1 pin, the yellow LED will be on, and the Green LED will be off. This is because there is a break in the circuit for the green LED. When power is applied to CH1, the relay switches from NC to NO, thus closing the circuit for the green LED and opening the circuit for the yellow LED. The green LED turns on, and the yellow LED turns off.

I also show what happens when you apply power to a channel (eg. CH3) when there is nothing connected to the relay terminals. The respective onboard LED illuminates. This is useful for troubleshooting the relays, and knowing what state the relay is in (NC or NO). NC stands for Normally closed (or normally connected) NO stands for Normally open (or normally disconnected)

Here is a circuit diagram for two of the relays on the relay module (CH1 and CH2).
This was taken from the iteadstudio site.

 


 
 

The Video


 



 

This tutorial will become very useful in the future. I now have an easy way of switching a circuit electronically. Yes, I could do this with a transistor, but sometimes it is nice to hear that mechanical click. I am not sure why I like relays, but I find them to be quite fun !!

If you liked this tutorial - please show your support :


 
 


 
 

Description: Relay Module Rating: 3.5 Reviewer: Unknown ItemReviewed: Relay Module
Back to top