Motion Activated Camera

December 20, 2009

I made a relatively simple attachment to my Canon SLR to create a motion activated camera using Arduino. A lot of this was based on and inspired by the intervalometer project at The Honey Jar. I made some changes to his circuit to use a 4N35 optocoupler instead of reed relays. Here is what you will need:

The motion detector is really sensitive so I cut a small hole in the box to try and and reduce its field of view. This might not be as much of a problem at night, but during the day it would constantly give false positives.

First solder some wires to the 2.5mm headphone plug. Then connect the plug and electronics as shown in the schematic below:

Schematic Diagram

Motion Activated Camera
Dan Bridges 2009

For schematics and more documentation see:

boolean focus = false;

int shutterPin = 2;
int focusPin = 3;
int PIRPin = 4;

int shutterPressDelay = 200;
int focusPressDelay = 200;
int interPictureDelay = 500;

void setup(){
  pinMode(shutterPin, OUTPUT);
  pinMode(focusPin, OUTPUT);

void loop(){
    if (digitalRead(PIRPin)) {

void takePicture() {
    //If you want the camera to focus first set
    //the focus variable to true.
    if (focus) {
        digitalWrite(focusPin, HIGH);
        digitalWrite(focusPin, LOW);
    digitalWrite(shutterPin, HIGH);
    digitalWrite(shutterPin, LOW);


The same circuit (minus the PIR detector) can also be used as a standard intervalometer. At some point I’ll probably add a potentiometer and a LCD screen to allow for custom time intervals on the go.


arduino make programming


Hawk Dove Game Theory →