Help Center
  • FAQ
    browse most common questions
  • Live Chat
    talk with our online service
  • Email
    contact your dedicated sales:
  • Call Us
    9:00 - 18:00, Mon.- Fri. (GMT+8)
0

How to Make a Motion Activated Santa Camera

Published on 2/21/2017 12:00:00 AM

Description

<style>.e_editor{font:14px/24px Arial,'microsoft yahei','Times New Roman','b8bf53';}.e_editor div,e_editor p,e_editor td,e_editor th,e_editor li{font-weight:inherit;font-size:inherit;font-style:inherit;font-family:inherit;}.e_editor ul{margin:-10px 0 20px;}.e_editor li{padding:5px 0;}.e_table{width:96%;border-collapse:collapse;empty-cells:show;}.e_table th,.e_table td{padding:5px;border:2px solid #eee;}.e_img{padding:10px 0;text-align:center;}.e_p{line-height:20px;padding:0 0 20px;text-indent:0em;}</style> <div class="e_editor"> <div class="e_p"> Every year Santa slides down the chimney, leaves presents, consumes the milk and cookies and disappears without a trace. For most believers in Santa Claus, the sudden appearance of presents and the disappearance of the milk and cookies is proof enough, but there are some out there who insist on hard evidence. To satisfy these doubters, I have designed a simple motion activated camera rig that will capture pictures of Santa in action and prove once and for all that Santa is, in fact, real. </div> <div class="e_p"> <strong>Materials:</strong> </div> <div class="e_p"> Camera (with an external shutter switch) </div> <div class="e_p"> Arduino Microcontroller </div> <div class="e_p"> PIR Motion Sensor Module </div> <div class="e_p"> Diode </div> <div class="e_p"> Jumper Wires </div> <div class="e_p"> Breadboard </div> <div class="e_img"> <img src="https://file.allpcb.com/bbs/17/03/15/140932074.jpg" alt="" width="500" height="281" title="" align="" /><br /> </div> <div class="e_img"> <img src="https://file.allpcb.com/bbs/17/03/15/141002726.jpg" alt="" width="500" height="349" title="" align="" /><br /> </div> <p> <br /> </p> <p> <strong><br /> </strong> </p> <p> <strong>Connecting to the Camera's Shutter Switch Terminals</strong> </p> <p> <br /> </p> <div class="e_p"> Many cameras are able to connect to an external shutter switch. For instance, my Canon Rebel can connect to an external shutter switch with a 2.5mm stereo plug. The barrel of the plug connects to ground on the camera. The center ring connects to the focus function. The end contact controls the shutter. These functions are activated by connecting the contacts to the ground contact. Different camera models may use different connectors and activate the functions differently. So consult your camera's manual to be sure that you know how everything works. </div> <div class="e_img"> <img src="https://file.allpcb.com/bbs/17/03/15/140717744.jpg" alt="" width="500" height="357" title="" align="" /><br /> </div> <div class="e_img"> <img src="https://file.allpcb.com/bbs/17/03/15/140900198.jpg" alt="" width="500" height="337" title="" align="" /><br /> </div> <div class="e_p"> <strong>Connecting the Camera's Shutter Switch to the Arduino</strong> </div> <div class="e_p"> We will be controlling the camera with an Arduino microcontroller. To do this we need to connect the ground pin on the camera's remote shutter switch to the GND pin on the Arduino with a jumper wire. This will give the two devices a common reference ground. </div> <div class="e_p"> Then we need to connect the shutter contact on the camera to one of the digital pins on the Arduino with a diode. The cathode of the diode should be connected to the digital pin on the Arduino and the anode of the diode should be connected to the shutter contact of the camera. With the diode in this configuration, the Arduino will be able to activate the shutter when the digital pin sends out a LOW signal but when the Arduino sends out a HIGH signal, the diode will block it and protect the circuits in the camera. </div> <div class="e_p"> <strong>Connecting the Motion Sensor to the Arduino</strong> </div> <div class="e_p"> To detect when someone is in front of the camera, I am using a passive infrared (PIR) motion sensor. This module has three pins. The GND pin on the module connects to the GND pin on the Arduino. The Vcc pin on the module connects to the 5V pin on the Arduino. The OUT pin on the module connects to one of the digital pins on the Arduino. When the sensor detects motion, it sends a HIGH signal to the digital pin that can be read with a digitalRead function. </div> <div class="e_img"> <img src="https://file.allpcb.com/bbs/17/03/15/141041924.jpg" alt="" width="500" height="329" title="" align="" /><br /> </div> <div class="e_p"> <strong>The Arduino Code</strong> </div> <div class="e_p"> The code for this project is really simple. The Arduino uses the digitalRead function on pin 10 to monitor the output of the motion sensor. If a HIGH signal is detected (motion is present), then the digital pin that is connected to the shutter (pin 6) is set LOW. This activates the shutter function on the camera. There is a short delay to allow for the camera to focus and take the picture. Then digital pin 6 is set HIGH again to reset the shutter on the camera. </div> <div class="e_p"> Here is a simple example code that you could use: </div> <div class="e_p"> <p> &nbsp; </p> int shutterPin = 10; // shutter contact connected to digital pin 10 int sensorPin = 7; // motion sensor connected to digital pin 6 int val = 0; // variable to store the read value void setup() { pinMode(shutterPin, OUTPUT); // sets the digital pin 13 as output pinMode(sensorPin, INPUT); // sets the digital pin 7 as input } void loop() { val = digitalRead(sensorPin); // read the signal from the motion sensor if(val == HIGH) { digitalWrite(shutterPin, LOW); // sets the shutter pin LOW to activate the shutter delay(3000); //delay for camera to focus and take picture digitalWrite(shutterPin, HIGH); // sets the shutter pin HIGH to de-activate the shutter } } </div> </div>

113

comment

All comments

Unknown

5718

0

113

Go to Order My Own PCB

Rules about cashback: 1. Valid time: ALLPCB cashback activity will end on April 1st. 2. Capped amount: The capped amount of cashback for each account is $5,000. Each order can get a maximum of $2,000 cashback. That means every author can get $5,000 max. 3. Cashback range: The cashback activity only covers the corresponding PCB order. The order amount for other combined payment products will be invalid. 4. Clicking your own promotional link will be invalid. The same email address, shipping address, contact information, and phone number are all recognized as the same account. 5. ALLPCB has the final interpretation right of the cashback activity.

ALLPCB will donate 2% to the author for this promotion link.

Other Projects

Home / Industrial Automation low Cost with Arduino an ESP01

2460

0

314

Alternate Text josemarjr