The Hedgehog Camera Project
By Patrick Wigmore, , published: , updated
We had been talking about having some kind of wildlife camera in the garden to capture images of hedgehogs.
I already had an old webcam, which I’d previously modified to remove its infrared filter, so I set about looking for a way to use that. How hard could it be?
Cameras and infrared
Most digital camera sensors are sensitive to infrared light, but colour cameras usually have a filter to block it out. If a camera is going to capture colours as the human eye sees them, then it must exclude infrared.
Nevertheless, the IR filters are rarely 100% effective. Pointing a TV remote at a video camera to see the flashes of infrared light is a well-known trick.
I had hoped the infrared filter might just pop out of my old, cheap webcam as a loose part, but it turned out to be firmly bonded in place and I ended up totally destroying the filter in my attempt to remove it. It was a tough, thin, glass-like material, which ultimately crumbled into tiny pieces.
With the filter removed, the colour image is no longer accurate if there is any infrared in the scene, such as from sunlight, but the camera gains the ability to capture a scene that is illuminated purely by invisible infrared light.
Plan A: a very long USB cable
The first plan was to buy a really long USB extension cable; the kind that has electronics in it because it exceeds the maximum length of a standard USB cable; plug the camera into that somewhere out in the garden, and run it back to the house and inside through a window. I also built a USB-powered infrared illuminator to give the camera some light to see by.
This worked pretty well and gave a nice, clear image. But it quickly became clear that it wasn’t practical. I didn’t have a computer that I could dedicate to recording videos, so I had to keep attaching my laptop to the end of the cable, which was inconvenient. I also couldn’t shut the window properly over the thick and inflexible USB cable, which let a lot of heat out of the house. A rethink was needed.
Plan B: stand-alone recording equipment
I realised that, if I could put the computer out in the garden with the camera, I could power it through a much thinner cable that would fit through a closed window and access the video footage via WiFi.
Raspberry Pi Zeroes were out of stock and ideally I wanted to spend less than the cost of an off-the-shelf wildlife camera, so I decided to use a second-hand WiFi router running OpenWRT. Routers don’t really have the best specifications for this application, but they are very cheap on eBay.
This project turned out to be an education in hardware limitations and workarounds: the router’s weak CPU, the flaky webcam, the write endurance and power consumption characteristics of USB flash drives and more!
Nevertheless, I eventually got it all working and managed to capture some nice images of our resident wildlife.
You can read more about various aspects of the project in the subsections listed in the project contents.