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.
This project is 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.
Let's see what we need to have this project done. For example:
A field or property with active moles and an established tunnel system.
Access to electronic parts such as cameras or microcontrollers.
Materials for mockup.
To have a realistic low-cost solution, let's consider a Raspberry Pi - based solution with a connected camera. We'll build a unit with them and embed it into a tunnel. As Pi has WiFi connectivity, we'll use it to talk to it, even slightly 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.
Undeground mole recorder - detector
In summary, we aim at building a "vertically waterproof" (potential water coming from top down) unit out of generally available parts that we can talk to via a regular home WiFi connection.
Required Parts for Mole Detector
Below are the parts used for initial prototyping.
I used Raspberry Pi 3 in partial clear casing.
Raspberry Pi 3 in clear case with power supply connected
Infrared camera for mole detector
Note: this cable may come with a camera. Mine was 15 cm. 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
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 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 have 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
A Piece of Styrofoam
To mount things on, we'll use a piece of styrofoam. It is slightly over 1 inch thick.
Styrofoam material for mole detector mockup
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
Here is our "theory" about how we could observe and record mole movements.
Mole detector theory
We'll open an existing tunnel from the top. We'll then put our mockup board with a camera on top. We'll then use the system to take and transmit images and live video.
Connect CSI cable to the camera. Contacts on the camera module are opposite to the lens. If you look at the lens with connected cable to the module, you should see a blue ribbon. Contacts are on the opposite side of the cable (facing away from the lens). Contacts on the Raspberry Pi are on the HDMI connector side with the blue ribbon facing the Ethernet connector. If you insert the cable incorrectly, the Pi will not be able to recognize the camera.
For infrared LED circuit connect the plus voltage to pin 1 on Raspberry Pi (+3.3V), and the minus to ground on pin 6.
This is a the top part with removed styrofoam material to mount a camera in the center and a LED on the left.
Camera and infrared LED for mole detector
Here is how our mockup board looks from the top, with Raspberry Pi mounted, camera and LED inserted.
Raspberry Pi based mole detector - initial prototype
While I was 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.
Still underground image before water condensation
Dealing with Water Condensation
Let's see if we can fix the water condensation problem with ventilation. In this iteration, we basically have approximately the same mockup board as above, with 2 holes drilled from both sides to the lens opening. We also have twio small plastic hoses inserted in these holes for ventilation.
A still image of deck surface taken with prototype 2. One of ventilation hoses is under the unit.
Mole detector unit sitting on grass
Mole detector unit sitting on grass after half an hour
Blurry image in the morning due to condensed dew on lens
The above happens because of dew condensation on the lens. See pictures below.
Dew condensed on mole detector prototype in the morning
Dew condensed on mole detector lens in the morning
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 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
Let us know create a new 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.
Unfortunately, at this time 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.
Mole detector mounting unit
Basically, the area around the camera looks like before, with the following changes:
Large holes are made in this enclosure, digging further into styrofoam board. Holes do not make it through the board, so you don't see it on top of the board.
Holes are partially filled for silica gel granules, then sealed with scotch tape, which is then perforated with a needled to allow air exchange.
The entire enclosure is capped with a plastic film to isolate inside air in hope to keep it dry. Notice that this reduces our picture quality but solves the condensation issue.
Notice that I re-done the infrared lighting too 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
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.
Mole detector with silica gel
Infrared Imagery 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 catch any mole images, 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, 9 days after the gadget was installed on August 21.
Mole tunnel on 2016-08-21 at 23:44
Mole tunnel on 2016-08-22 at 20:00
Mole tunnel on 2016-08-23 at 20:00
Mole tunnel on 2016-08-24 at 20:00
So far, no luck with catching 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 5 o'clock
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.
Worm in mole tunnel
And while we are at it, inventing viagra, the mole is actually elsewhere (30 meters from the place with the camera), busy doing usual damage on a freshly watered lawn.
Mole avoiding the camera doing damage elsewhere
But wait, the mole appeared in the tunnel 9 days after we installed the device. During 20 minutes of activity, it managed to sealed 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
Mole started to push ground
Mole digging 1 minute later
Mole digging 2 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 sealing off the camera, 12 minutes from start.
Mole working on sealing off the camera, 13 minutes from start.
Mole almost sealed off the camera, 14 minutes from start.
Mole sealed of the camera completely in 20 minutes
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. So, in theory we do have a gadget that can be used record what is happening in mole tunnels. Did not catch any moles on camera yet, so the show must go on, it seems...