Infrared Recording Device for Moles

Project Description

As part of a potentially larger project, we need a prototype device with an infrared camera, capable of capturing and live-streaming of mole activity. The idea is to have such device integrated into an active mole tunnel to record their movements.

This is for a home hobby project, so the cost of parts must be "reasonably low". We are looking for a "proof of concept" mockup device that can capture, record, and stream videos and still pictures.

Completion Notes

This project was completed in a sense that after a few iterations we have assembled what seems to be a working gadget capable to capture underground images for long periods of time (several days and weeks). We fixed water condensation problem on camera lens using silica gel. After about a week of monitoring, we were able to capture mole activity in the portion of the tunnel where the camera was installed.

The mole dug around the excavated portion of the tunnel and effectively sealed the camera. No mole images were captured in our experiment. However, ground movements during mole digging were captured. Small bugs (woodlice and smaller) and earthworm movements have been also recorded.

Below is a little animation, a time-lapse video. Frames originally captured each minute, played back each second instead. Mole activity starts on the 11th second of the time-lapse video.

Mole digging animation captured with infrared recording gadget

Project Plan

Let's see what we need to have this project done. For example:

To have a realistic low-cost solution, let's consider a Raspberry Pi - based solution with a connected infrared camera. We'll build a gadget with them and embed it into a tunnel. As Raspberry Pi has WiFi connectivity, we'll use it to talk to it underground. We'll use a permanently connected 110V power via a long extension cord to the unit in the field. This keeps our power source reliable and stable, and things simple, and hopefully practical for a hobby project. A solution could be deployed as on the picture below. The gadget is underground with extension cord and power supply on lawn grass.

Permanent power connected to undeground mole recording device
Permanent power connected to undeground mole detecting device

In other words, we aim at building our unit out of generally available parts that we can talk to via a regular home WiFi connection. It should be protected from rain water coming down through soil.

Required Parts for Mole Detector

Below are the parts we used for prototyping.

Raspberry Pi

I used Raspberry Pi 3 in partial clear casing.

Raspberry Pi 3 in clear case for mole detecting gadget
Raspberry Pi 3 in clear case with power supply connected

Infrared Camera

Below is a photo of an infrared camera we used in mole activity recording gadget.

Infrared camera for mole detecting device
Infrared camera for mole detector

CSI Cable

Note: this cable may come with a camera. Mine was 15 cm long. To keep things tidy, you may be better off with a 10 cm cable for this project.

CSI cable for connecting camera to Raspberry Pi in mole recording device
CSI cable for connecting camera to Raspberry Pi

Infrared LED

Note: the LED provides infrared source in complete darkness so that we could see better. I used the "infrared light" that came with my camera (see the picture below), which is actually a little light-sensitive circuit with a photo-transistor. It powers up the infrared LED only on low natural light condition. For this project it is an overkill, and any infrared LED would probably work.

Infrared LED for mole activity recording gadget
Infrared LED for mole detector

Current Limiting Potentiometer

You'll need to restrict the current going to the LED, as it will be supplied from a Raspberry Pi pin. I used a 220 Ohm, which I then tuned to limit the current from 3.3V pin to 10 mA. You can also used a fixed resistor, appropriate for your LED.

Here, we mounted a potentiometer on a 2x8cm prototyping board, and soldered some wiring to connect the LED to Raspberry Pi pins.

Current limiting potentiometer with wiring for mole recording unit
Current limiting potentiometer with wiring

A Piece of Styrofoam

To mount things on, we'll use a piece of styrofoam. It is slightly over 1 inch thick, shown below.

Styrofoam material for mole detector mockup
Styrofoam material for mole detector mockup

Plastic Cover

To protect circuitry from water coming from top such as rain or lawn watering we'll use a simple plastic cover like on the picture below. This one is reused from some old packaging for something else.

Plastic cover for mole detector prototype
Plastic cover for mole detector

Mole Detector Gadget Design

Here is our schematic drawing of mole detector parts assembled together and placed on top of an existing mole tunnel to hopefully observe and record mole movements.

Mole detector gadget design
Mole detector gadget design

We'll open an existing tunnel. We'll then put our mockup board with a camera on top and use it to take and transmit images and live video.

Wiring

Initial Mole Recorder Prototype

Below is a view of our styrofoam piece from bottom. You can see the camera mounted in the center and the LED on the left.

Infrared camera and LED mounted in styrofoam in mole activity recorder
Infrared camera and LED mounted in styrofoam

Here is how our mockup board looks from the top, with Raspberry Pi mounted, camera and LED inserted.

Initial prototype of Raspberry Pi based mole detector
Raspberry Pi based mole detector - initial prototype

Testing Mole Recorder

A photo below shows one of our first still images of the underground mole tunnel.

Still underground image of mole tunnel before water condensation
Still underground image before water condensation

While we were able to capture images and video with the above board initially, a problem arose after about an hour of use in the actual ground. Water is condensing on the camera lens making images blurry. Water condensation is rather significant and must be dealt with. Also, notice that the water condensation is also happening on the inside of plastic cover under ground.

Dealing with Water Condensation

Let's see if we can fix the water condensation problem with ventilation. In this iteration of our mole recorder prototype, we basically have approximately the same mockup board as above, with 2 holes drilled from both sides to the lens opening. We also have two small plastic hoses inserted in these holes for ventilation.

We put our unit on top of grass and took a few pictures over significant amount of time in between to see what happens. Below are the results.

Infrared photo of grass by mole recorder taken immediately after placement on grass
Infrared photo of grass by mole recorder taken immediately after placement on grass
Infrared photo of grass by mole recorder taken after half hour stay on grass
Infrared photo of grass by mole recorder taken after half hour stay on grass
Blurry image taken by by mole recorder in the morning due to condensed dew on lens
Blurry image in the morning due to condensed dew on lens

The above happens because of dew condensation on the lens. See pictures of the gadget and the lens with dew on them below (taken in the morning after overnight stay on lawn grass).

Dew condensed on mole detector prototype in the morning
Dew condensed on mole detector prototype in the morning
Dew condensed on mole detector lens in the morning
Dew condensed on mole detector lens in the morning

So, our little ventilation improvement did not solve water condensation problem entirely.

Fixing Water Condensation Problem with Silica Gel

We need to figure out how to fix the dew condensation problem. We can try warming up the camera or reduce humidity of the surrounding air. Another thing to try is to isolate the camera into some kind of enclosure with dry air inside.

Let us see what we can accomplish with silica gel.

Silica gel bag for mole activity recorder
100 gram silica gel bag for mole detection device

Silica gel is the material that can absorb water from the air. You can buy them in bags like on the picture above. This one is about 100 gram bag with silica gel granules inside. If you looks inside, they look like this, approximately 3 mm in diameter.

Silica gel granules 3mm diameter
Silica gel granules 3mm diameter

Let us know create a new styrofoam mounting base for the mole detector, which incorporates silica gel around camera enclosure, and also has a thin plastic film on the bottom to isolate the air that faces the camera.

I don't have a close-up picture of the bottom of new mounting unit (the part that integrates silica gel), but here is how it looks from top.

Another iteration of mole recording device mounting unit
New mole detector mounting unit

Basically, the area around the camera looks like before, with the following changes:

I also re-done infrared lighting with a couple of smaller infrared LEDs. Whether or not this is a good thing it is difficult to say at this time. The new lighting board looks like this. Basically it's a circuit with 2 LEDs, and current limiting resistors (220 Ohm) connected to 3.3V power source on the Pi.

Infrared lighting board for mole detector device
Infrared lighting board for mole recordfer

Finally, I put the entire remaining bag of silica gel on top of the board. This is probably unnecessary, as my theory is that it is the camera enclosure silica gel that mostly helps. Here is how the new mole detector looks before putting it in the ground.

Raspberry Pi based mole detector with silica gel
Mole detector with silica gel

Infrared Images of Mole Tunnel

The gadget was set to take a still photo every minute for "proof of concept" work. This could be the reason why we did not capture any images of moles, because it was fast enough to move between photo taking moments.

Apparently, with some hardware, software, and process improvements, one could do much better and capture the creature on camera underground.

Below are some still images captured with the above device. The small round object at approximately 1 o'clock is a pin I put on the right hand side of the tunnel entry to hopefully detect a movement if a mole passes through. Also, the soil on the bottom is soft, I was expecting to see some significant change to it, if the creature passes through, and it happened on August 30, 2016, or 9 days after the gadget was installed on August 21.

Mole tunnel on 2016-08-21 at 23:44
Mole tunnel on 2016-08-21 at 23:44
Mole tunnel on 2016-08-24 at 20:00
Mole tunnel on 2016-08-24 at 20:00

So far, no luck with capturing moles on camera. Working on it... But here are some nice pictures of woodlice bugs in mole tunnel.

Woodlouse bug in mole tunnel at 8 o'clock
Woodlouse bug in mole tunnel at 8 o'clock
Woodlouse bug in mole tunnel at 5 o'clock
Woodlouse bug in mole tunnel at 5 o'clock
Woodlouse feeding on a plant underground close up
Woodlouse feeding on a plant underground close up

Here is an unsuspecting earthworm in the mole tunnel, approximately a week after we installed the camera.

Eathworm in mole tunnel
Eathworm in mole tunnel

And while we are at it, the mole is actually elsewhere (30 meters from the place with the camera), busy doing usual damage on a freshly watered lawn.

Mole hill on a lawn away from mole recording device
Mole avoiding the camera doing damage elsewhere

Hello Mole!

But wait, the mole appeared in the tunnel 9 days after we installed the device. During 20 minutes of activity, it managed to seal the camera off completely by pushing the ground from elsewhere. This selection of still images shows mole activity from 14:11 GMT up to 14:31 GMT on August 30, 2016 (early morning hours local time).

Ground 1 minute before mole moving in
Ground 1 minute before mole moving in
Mole started to push ground in tunnel
Mole started to push ground
Mole digging 1 minute later
Mole digging 1 minute later
Mole digging 6 minutes later
Mole digging 6 minutes later. Notice that the pin at 1 o'clock disappeared.
Mole started to push ground to seal the camera
Mole started to push ground to seal the camera
Mole sealing off the camera, 12 minutes from start
Mole sealing off the camera, 12 minutes from start
Mole working on sealing off the camera, 13 minutes from start
Mole working on sealing off the camera, 13 minutes from start
Mole almost sealed off our camera after 14 minutes of digging
Mole almost sealed off our camera after 14 minutes of digging
Mole sealed off the camera completely in 20 minutes
Mole sealed off the camera completely in 20 minutes

Project Summary

After experimentation and a few prototype iterations to fix water condensation issue, we managed to build a simple device capable to capture infrared imagery of a mole tunnel long-term (days and weeks). Water condensation presented a serious challenge, which was solved by isolating of the air facing the camera lens from the rest, and with usage of silica gel.

Image quality, although relatively low, remains consistent over the course of days and weeks. We built a gadget that can be used to record what is happening in mole tunnels.