Motion-activated camera

Source: InternetPublisher:iHoY50qWT Keywords: Motion-triggered camera Updated: 2026/02/27

I created a relatively simple accessory for my Canon SLR camera to create a motion-triggered camera using an Arduino. This part is largely based on and inspired by The Honey Jar's interval meter project. I made some changes to his circuitry, replacing the reed relays with 4N35 optocouplers.

Here are the materials you will need:

This is a Canon SLR camera that uses a 2.5mm headphone jack for remote shutter/focus control. I'm using an XSi, but it should work on other models as well.

Arduino board (I used Duemilanove)

(2) 4N35 optocoupler (can be obtained through All Electronics, etc., I don't know if Radio Shack has it)

2.5mm stereo headphone plug

(2) 1k resistor

Passive infrared motion detector from Parallax

Extension cable with 3-pin connector from Parallax

The box is used to hold all the parts.

The motion detector is very sensitive, so I cut a small hole in the box to try and reduce its field of view. This might not be a big problem at night, but it causes constant false alarms during the day.

First, solder some wires to the 2.5mm headphone plug. Then, connect the plug and electronic components according to the diagram below:

Motion-triggered camera

The source code I used is:

/**********************

Motion Activated Camera

Dan Bridges 2009

For schematics and more documentation see:

https://www.dayofthenewdan.com/projects/motion-camera

**********************/

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)) {

takePicture();

delay(interPictureDelay);

}

}

void takePicture() {

//If you want the camera to focus first set

//The focus variable is set to true.

if (focus) {

digitalWrite(focusPin, HIGH);

delay(focusPressDelay);

digitalWrite(focusPin, LOW);

delay(250);

}

digitalWrite(shutterPin, HIGH);

delay(shutterPressDelay);

digitalWrite(shutterPin, LOW);

}

Interval meter

The same circuit (minus the PIR detector) can also be used as a standard interval meter. In the future, I may add a potentiometer and an LCD screen to allow for customized time intervals.

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号