Advertisement

Motion Activated Camera

Not rated 24,282

#motion detection #camera #4N35 #optocoupler #Canon SLR #intervalometer #sensor #automation
Motion Activated Camera
Motion Activated Camera

Description: A straightforward attachment for a Canon SLR camera designed to create a motion-activated camera using an Arduino. This project draws inspiration from the intervalometer project at The Honey Jar, with modifications made to the circuit by utilizing a 4N35 optocoupler in place of reed relays. To mitigate the sensitivity of the motion detector, a small hole was cut in the enclosure to reduce its field of view. While this issue is less prominent at night, it tends to cause false positives during daylight hours. The code implementation includes the following variables: a boolean for focus, pin assignments for shutter, focus, and PIR sensor, as well as delays for shutter press, focus press, and inter-picture intervals. The setup initializes the shutter and focus pins as outputs, while the loop continuously checks the PIR sensor for motion. Upon detecting motion, the camera takes a picture after the specified inter-picture delay. The same circuit, without the PIR detector, can function as a standard intervalometer. Future enhancements may include adding a potentiometer and an LCD screen for adjustable time intervals.

The motion-activated camera system incorporates various components to achieve its functionality. The primary microcontroller, typically an Arduino, interfaces with a Passive Infrared (PIR) motion sensor to detect movement. The PIR sensor outputs a digital signal that triggers the camera's shutter mechanism via an optocoupler, specifically the 4N35, which provides electrical isolation between the Arduino and the camera circuitry.

The circuit configuration includes the following connections: the shutterPin is connected to the camera's shutter release input, while the focusPin connects to the autofocus mechanism. The PIRPin is wired to the output of the PIR sensor. The use of the 4N35 optocoupler ensures that the high voltage from the camera does not affect the low voltage Arduino components, thus protecting the microcontroller from potential damage.

In the Arduino sketch, the setup() function configures the shutterPin and focusPin as outputs, preparing them to control the camera's functions. The loop() function continuously monitors the PIRPin for any changes in state, indicating the presence of motion. When motion is detected, the takePicture() function is called, which can optionally engage the autofocus feature if the focus variable is set to true. The function then activates the shutterPin, simulating a button press to capture the image.

This system can also be adapted for use as a standard intervalometer by omitting the PIR sensor. This versatility allows for customizable photography experiences, such as time-lapse photography, where the user can set specific intervals for capturing images. Future modifications may include the integration of a potentiometer to adjust timing and an LCD display for real-time feedback and settings adjustments, enhancing the user experience and functionality of the device.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. /* 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) { takePicture(); delay(interPictureDelay); } } void takePicture() { //If you want the camera to focus first set //the focus variable to true.

if (focus) { digitalWrite(focusPin, HIGH); delay(focusPressDelay); digitalWrite(focusPin, LOW); delay(250); } digitalWrite(shutterPin, HIGH); delay(shutterPressDelay); digitalWrite(shutterPin, LOW); } The same circuit (minus the PIR detector) can also be used as a standard intervalometer. At some point IG ‚¬ ll probably add a potentiometer and a LCD screen to allow for custom time intervals on the go.


Related Circuits