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:

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.
- Homemade handheld electromagnetic pulse therapy device
- Design of a simple refrigeration air conditioner
- Computer power safety socket
- Practical digital medicine-taking reminder circuit
- Design and production of automatic deodorizer for refrigerator
- Share a home telephone recorder circuit diagram
- Wireless charger design
- Feiyue WP-600 computerized microwave oven computer control diagram
- Broadband high frequency amplifier
- Tube amplifier TDA1541 parallel circuit diagram
- Car voice cell phone call reminder circuit diagram
- Car mobile phone charger circuit diagram
- Practical circuit diagram that enables remote wake-up/shutdown
- Cell phone detector circuit diagram
- Key debounce circuit diagram
- Philips shaver circuit diagram
- Design and production circuit diagram of wireless FM microphone
- AD7780 electronic scale circuit diagram
- Illustration of the design principles and applications of mobile phone radio frequency circuits
- Wireless frequency modulation (FM) microphone circuit diagram using Q5337







京公网安备 11010802033920号