Introduction: Building an Active Infrared DSLR Camera Trap for Wildlife Photography


An Active Infrared (IR) DSLR Camera Trap uses industry-standard Active IR sensors to detect when an object breaks the beam and sends a signal to a DSLR camera to release the trigger. An Active IR sensor is what is commonly used in home security motion detectors or factory automation systems. Instead of tripping an alarm or a counter, we are going to use the IR sensor to fire a camera to capture what crossed the sensor's beam.

Adding Decision Making to the Camera Trap

An Arduino microprocessor will add some intelligence to this Instructable. Upon receiving a signal that the infrared beam has been broken indicating the presence of a critter, the Arduino sends a signal to the camera a user-configurable amount of times, also with a user-configurable pause between captures. This allows us to capture several images of anything that has tripped the sensor.

Any photographer who has tried to capture an in-flight image of a Tree Swallow knows how frustrating the experience can be. I captured this image of a Tree Swallow in flight with an Active IR sensor. I knew the Tree Swallow would cross a point along a path that was roughly 12"x12" as he approached his nesting box. The Active IR camera trap allowed me to capture this small, fast, erratic bird exactly where I pre-focused the camera. Using the Arduino, I was able to trigger the camera four consecutive times to maximize the opportunity for a successful image capture.


Different than a Passive Infrared (PIR) motion sensor, an active IR sensor eliminates any false triggers from wind moving objects and normal sun-based radiation. Another feature of an IR system is that you can mount the sensors higher off the ground to exclude smaller mammals like skunks, raccoons, or mice while capturing larger predators. In the fox picture, the IR sensors were mounted 2' off the ground which allowed smaller rodents to pass under the sensor without firing the camera.

Step 1: Materials and Tools

To make this project, you will need the following items.



  • soldering iron
  • solder
  • glue gun
  • glue ammo
  • digital multi-meter
  • drill

Step 2: Infrared Beam: Transmitter and Receiver


The IR Transmitter (the unit on the left with 2 wires) sends a modulated beam of infrared to the IR receiver (on the right with 3 wires). When the IR receiver detects the transmitted beam of IR, the system is active. When the beam is interrupted by an animal or other object, the IR receiver's OUTPUT is LOW and a signal is sent to the camera though the Arduino.


  • Both the transmitter and receiver have to be aligned in a straight line.
  • Works well at distances of up to 8 meters or 25', although for camera trapping, shorter distances are adequate.
  • Both IR transmitter and receiver both require 5V power.
  • The Receiver is powered by the Arduino,
  • The Transmitter uses a AA battery pack and a DC-DC converter to meet the required 5V.
  • Because an IR system monitors a specific area, they are less prone to false positives.
  • Incredibility accurate

Step 3: Canon N3 Shutter Cable

Canon uses a propitiatory cable to its high-end DSLRs for remote triggering. I use the Canon RS-80N3 listed in the previous step, but E-bay and Amazon are full of remote shutter release cables that you can modify for this project.

Preparing the Shutter Cable

  1. Remove the screws on the shutter release cable plastic case and open the case
  2. Remove the screws holding the motherboard in the case
  3. Remove the motherboard form the case.
  4. De-solder, cut, or otherwise detach the cables from the motherboard
  5. On this cable, we are interested in the Red (Photo) and Yellow (Ground) cables, as shorting these cable, or touching them together, will trigger the camera. Other shutter release cables from different manufactures use different colors. Most boards are labeled.

What Does This Mean for Us?

The shutter release is basically a couple of contact switches. Connecting the focus pin to ground and the camera will focus, while connecting the shutter pin to ground and the camera takes a picture. For our camera trap, we will create a digital switch to connect the (Yellow) ground pin to the (Red) shutter pin to take a picture when motion is detected. We could do this directly to the camera, but if something goes wrong, you can damage your camera, so make sure you use an Optocoupler.


The following Canon camera's support the N3 connector:

D30, D60, 10D, 20D, 30D, 40D, 50D, 5D, 5D Mark II, 5D Mark III, 5D Mark IV, 5DS, 5DS R, 6D, 7D, 7D Mark II,1D,-1Ds, 1D Mark II, 1Ds Mark II, 1D Mark II N, 1D Mark III, 1Ds Mark III, 1D Mark IV, 1D X, 1D X Mark II, 1D C

Step 4: Getting to Know the Optocoupler 4N26

What does an Optocoupler do?

The Arduino is connected through a resistor to an Optocoupler 4N26 that closes the circuit of the camera when motion is detected. An Optocoupler is a digital switch that uses LED emitters paired with a photo detector transistor. This means that you can use them to isolate the battery, Arduino, and IR sensor from the camera connection without having any electrical contact between the two circuits.

Pin Numbers

Locate the circular notch on the Optocoupler, this is is the Pin 1 indicator. Use the Optocoupler diagram to reference the pin numbers when you assemble your camera trap. We will be connecting the N3 shutter and ground pins from the previous step to Pins 4 and 5 of the Optocoupler in the next step.

Step 5: Building the Active IR Camera Trap - Receiver

Active IR Receiver and Arduino

The Arduino allows us to create some custom settings to control the camera and how we want to capture images. These include:

  • how long to wait after sensor is broken before firing the camera (default is 0 seconds)
  • how many times to fire the trigger (default is 4 times)
  • how long to wait between shutter each release (default is 3 seconds)


Follow these steps to complete the Receiver section of the camera trap. Use the fritzing diagram as a reference.

  1. Connect the positive (+) or Red wire of the IR sensor to the 5V pin of the Arduino
  2. Connect the negative (-) or Black wire of the IR sensor to the Ground pin of the Arduino
  3. Connect the signal or Yellow wire of the IR sensor to to Digital Pin 9 on the Arduino
  4. Connect Pin 1 of the Optocoupler to Pin 2 on the Arduino
  5. Connect Pin 2 of the Optocoupler to Ground on the Arduino
  6. Connect the ground wire of your shutter cable to Pin 4 of the Octocoupler
  7. Connect the postive (+) wire of your shutter cable to Pin 5 of the Octocoupler.

After confirming that you have made all the connections and that the Receiver and Arduino is working with the IR Transmitter, you can mount the IR Receiver, Arduino, breadboard, and battery pack, in a weather-protective case. This Instructable uses a Pelican 1060 case, but any weatherproof case will work.

Step 6: Active IR Camera Trap Code

If you used the same pin numbers listed on the previous step, you can copy this code to your Arduino, making any timing adjustments for your needs. I find the default settings in the code to meet all of my camera trapping requirements, but your needs may vary.

* Active IR Camera Trap - 5/3/2017 * * * Active IR Sensor DSLR Camera Trap using E18-8MNK transmitter/Receiver pair. * * The IR output pin goes to LOW if motion is present. * */ /*-----( Declare Constants )-----*/ #define IRsensor 9 // Active IR Sensor #define opto 2 // 4n26 optocoupler

/*-----( Declare Variables )-----*/ int detector_state; /* Holds the last state of the switch */ int trigger = 4;

void setup() /*----( SETUP: RUNS ONCE )----*/ { detector_state = 0; pinMode (IRsensor, INPUT ); pinMode (opto, OUTPUT ); Serial.begin(9600);

Serial.println ("DSLR CritterMaster 1.0b1 - Active IR"); delay(5000); Serial.println ("Ready "); }/*--(end setup)---*/

void loop () /*----( LOOP: RUNS CONSTANTLY )----*/ { detector_state = digitalRead (IRsensor); if ( HIGH == detector_state) { digitalWrite (opto, LOW ); } else { for (int x = 0; x < 4; x++) { digitalWrite (opto, HIGH ); delay (200); digitalWrite (opto, LOW); delay (1000); Serial.println("Motion detected "); } } delay (100); }/* --(end main loop )-- *

* ( THE END ) */

Step 7: Building the Active IR Camera Trap - Transmitter

Active IR Transmitter


The Active IR Camera Trap uses a transmitter and a receiver to monitor an area. This step explains how to assemble the transmitter. The transmitter simply sends an infrared signal to the receiver. The transmitter performs no other action.

The transmitter requires 5VDC power, this step describes the power supply and how to use a DC-DC converter to adjust the power requirements for the transmitter.

Power Supply Requirements

Note the the transmitter's specs require 5VDC power. Make temporary connections between your battery and the DC-DC module. Use a digital multi-meter to monitor the voltage on the output pins of the DC-DC module, adjust the voltage screw on the module until it reads 5 volts.


After confirming that the DC-DC module's output is 5 volts, follow these steps to complete the Active IR transmitter module. Use the fritzing diagram as a reference.

  1. Connect the battery positive (+) pin on the power supply to the + input pin on the LM2596 DC-DC module.
  2. Connect the battery negative (-) pin on the power supply to the - input on the LM2596 DC-DC module.
  3. Connect the ground wire (-) of the DC-DC module Output to the Black wire of the IR transmitter.
  4. Connect the postive (+) wire of the DC-DC module Output to the Red wire of the transmitter.
  5. Insert the batteries and test

You will want to mount the transmitter, battery pack, and DC-DC module in a weather-protective case. This Instructable uses a Pelican 1060 case with the bottom half of the rubber liner removed, but you may find other cases that meet your needs.

Step 8: Installing the Completed Active IR Camera Trap


Field Installation

Consider where you want to place your Active IR Camera Trap and determine the best settings for your location and lighting. The range for this transmitter/receiver pair is up to 8 meters (25 feet), although the furthest I place them is less than 10 feet because animal trails are usually quite small.

These pictures show how I can aim the sensors at a broken off branch on this oak tree. I used this set up for the bluebird pictures in the Sample Images section at the end of this Instructable.

  1. Position the Transmitter in-line to where you want to capture an image and connect power.
  2. Power on the Receiver, the LED on the rear of the sensor will be ON, indicating that there is no active connection with the Transmitter.
  3. Align the Receiver with the Transmitter. The Red LED on the Receiver will turn OFF when a connection is established between the Transmitter and Receiver. The LED on the Transmitter is always ON when there is a 5V power connection.
  4. Use something that you can pre-focus the camera and then set lens to manual focus.
  5. Make ISO, TV, and AV adjustments
  6. Connect N3 cable from the IR Camera Trap to your camera.
  7. Confirm that the Active IR Camera Trap is working BEFORE leaving the location by using your hand to break the beam and that the camera is triggered as expected.

Adjustable Options

My backyard is a breeding ground for mice, voles, and rabbits. Using a Passive Infrared (PIR) sensor and its wide field of view, I routinely capture ten of these smaller nuisance animals on any given night. The abundance of prey animals guarantees a healthy supply of predators. Using an Active IR Camera Trap, I can mount the Transmitter/Receiver higher off the ground so that rabbits, mice, and most prey animals will pass undetected beneath the sensors, so that I can capture only the predators that roam the fields behind my house. If I were only interested in capturing deer, I could mount the sensors even higher because everything smaller than a deer would pass underneath the sensors.

Step 9: Sample Images

The Active IR Camera Trap allows me to capture images that otherwise would be impossible for me to capture. These images of a male Eastern Bluebird sitting on this oak branch before entering his nesting box to feed the female would otherwise have been a frustrating experience. If I were to go anywhere near his nest, he would fly to the far side of the yard and wait for me to leave the area. I ran the Active IR Camera Trap from 10:00 a.m. until just after 4:00 p.m while I did errands. These are the best images from the day.

Photography Contest 2017

Second Prize in the
Photography Contest 2017