Introduction: Arduino Wildlife Night Camera
We live up against an open space preserve, and I wanted to build a camera with infrared imaging capabilities and motion detection that could capture some of the wildlife I know is out there, but doesn't get seen during the day. I'm also a newbie to electronics and programming, so it was as much about figuring out how to build it and code it as it was to get something that worked. This is the second version I built the first was built from an old cell phone and a servo as a trigger. It kind of worked, but cell phone CCDs have an IR filter on them. I tried to peel the filter off and destroyed my ccd, so that was that. This one does most of what I want, but it's also a stepping stone to version 3. I'm also into the fast and lowbrow construction methods. This means a plastic tupperware type container and glue gun for holding things in place. Not pretty or neat, but easier to build without lots of fine tools.
Current features (with details, limitations or constraints)
- TTL serial camera ( has built in IR LEDs and motion detector in a nice housing, but only up to 640x480 image size)
- Motion detection (not PIR but visual motion detection which means it captures more than critters like branches)
- Saves files to micro SD Card (very slow - takes 30 seconds to capture 1 640x480, 320x240 much faster, 160x120 fastest but low quality)
- Has LCD screen for displaying status (so I don't have to be hooked up to a computer to know what is happening)
- Powered on from extension cord (because as configured uses too much power for a battery pack)
Step 1: Parts
To build this camera you will need the following items. Items in brackets are what I used for this project. I included prices for the ones that are more individual priced items for this project. Assume you can get your own enclosure.
- Arduino (Uno) $25
- Camera compatible with Arduino (ideally with IR LEDs and motion detection built in. Adafruit's TTL weatherproof serial camera) $55
- SD Card (Adafruit breakout board with micro SD) $7.50
- LCD matrix for displaying status (2x16 Adafruit) $10
- button to turn off backlight on LCD at night (can't recall where I got this)
- An enclosure (I'm a fan of tupperware type things with seal tight lids
- Hot glue gun
- jumpers, electrical tape, a breadboard, hot glue gun, drill bits, misc tools and supplies
Step 2: Assembly
I didn't take a lot of pictures along the way so I'll just describe the basic elements and construction. This is based on other builds out there, so it's pretty easy to setup the components using the following guides
I did a bunch of configuring inside a couple plastic enclosures to make it accessible to get at the SD card, but also mostly watertight. Not pretty at all, but works. Lots of wires because of all the components. Had to customize a few wires to meet my needs (e.g. resistor wire, button wires, etc.)
Step 3: Code
The code I built for arduino is based on hacking together a number of other items. Specifically, I used the LCD Matrix Code, the SD Breakout Code, and the Camera example from Adafruit "MotionCapture" All were modified to work together the way I wanted. I also added some code for the button to switch off the backlight of the camera. I also wrote another program to delete the files off the SD Card. Since you capture a lot, I wanted a way to delete in batches. Initial uses of codes that I found didn't work for a variety of reasons so I cobbled together one that looked for filenames that matched mine (of the format IMAGE000.JPG) and deleted them in sequence. Right now I can't quite get it to stop deleting when it runs out, but I'm working on that.
Attached are the Arduino files and txt versions
Step 4: Take Pictures
I've had this running the last bunch of nights outside my house. Just feet from my back fence. I set it up at night and leave it until the morning. As you can see lots of action in the neighborhood. I do get a ton of other pictures of nothing in particular (falling leaves, blurry birds) and the good ones are less frequent than the mostly blank ones. the bobcat this morning was the best so far.