Electronic – Different ways to detect seals?

cameralaserpirraspberry pisolar cell

I would like to build an underwater mammal detector to take videos of seals when they get in and out of their cave (the entrance of their cave is underwater).

It will be a waterproof sealed box with a camera in it, fixed on the rocks (underwater, in front of a cave), which will record video whenever a seal is swimming in front of it, probably connected to a solar panel placed on the ground (on the shore, not underwater). The device should be autonomous for about a week.

I can think of a few solutions:

  • Just use a regular smartphone with a waterproof case (connected to a solar panel), with an app which process the video and record it when something is moving,
  • Same thing with a Raspberry PI and a webcam (infrared?),
  • Use a Raspberry PI, a webcam and PIR sensor to trigger the video recording,
  • Same thing with a laser trigger (probably not the best solution)

I would emphasize on simplicity and robustness.
So I have a few questions:

  • What solar panel would I need to power an iPhone processing/recording video non-stop (it will be in Greece with good sunlight conditions) (which power/specs, not which brand/model)? How will the battery evolve? Will a Raspberry PI consume less power?
  • Would a PIR sensor work underwater? Which one should I get (which specs)? How will it react to ambient light changes (day/night)?

The smartphone solution is attractive because of its simplicity, the PIR sensor solution might be better because it will consume less power.

Edit: Seals are mammals, they have warm blood (37°C), but it does not mean their skin is warmed than water. "Seals keep their skin at just 34°F (1°C) when lying on ice" Mammal Anatomy: An Illustrated Guide.

I don't know if they would be detected by PIR sensor + infrared is quickly absorbed by water.

Best Answer

I would suggest you use Motion on a RaspberryPi with a USB webcam.

The Pi is up there in a waterproof box by the solar panel.
Put the webcam in a watertight box down below watching the seals.

I would go this way for several reasons:

  1. The camera is the cheapest part of the system. If the waterproofing fails then all you've lost is the camera. A short won't kill anything, and you could put a sacrificial USB hub between the Pi and the camera just in case.
  2. Motion does its job very well - it detects motion from the camera pictures and decides when to record. It also has a buffer so that you can tell it to record the last X seconds before the detection and then continue recording afterwards until there is no motion for some other length of time - that way, you don't lose any part of the scene you wanted to capture. Motion is highly configurable.
  3. Many (if not all) webcams are actually IR sensitive and have an IR filter that can be removed. This will get you an IR camera for cheap that will record the seals even at night.
  4. You can use a really cheap, low resolution webcam to start, and upgrade cheaply to a camera with better resolution once you've tested the system.
  5. If you need a longer connection, you can replace the webcam with an IP camera with power over ethernet.
  6. The Pi and webcam solution will be fairly low power. The Pi operates on 5Volts at maximum 1A, so 5Watts worst case. The camera consumption is counted in that since it is powered from the Pi, and the Pi power supplies usually only provide 1A.

I have used Motion with a webcam in a rain shield to make videos of birds around our bird feeders. I used an old laptop and let it run 24/7 to record everything. Motion can also control the brightness and other things automatically - it managed to catch a flyby from a bat one night because it had cranked up the brightness automatically in the dark.

Given the way most webcams are built, I suspect the easiest way to get a good image is to drill a hole in your waterproof box and put the lens of the camera in from outside the box and waterproof that. Then you screw the naked webcam board onto the lens from inside the box. This gets the lens outside in the water and the electronics inside nice and dry.

You will have to play with the focus - water has a different index of refraction than air, so the focus will act differently. If you install it as I suggested, then you will focus by rotating the camera board inside the box rather than rotating the lens.

Focus is also different between visible light and IR. If you find that IR is useful but also want to take normal light videos, you may want to use two webcams - one modified for IR, and one with the IR filter still in it.

USB has some length restrictions, but I have used USB extensions of upto 4 meters. Try to get a single long cable rather than connecting several in series. Each junction causes problems (signal loss,) and must also be waterproofed.

Given that you want this to run for up to a week, I would suggest adding some mass storage to the Pi. A large USB flash drive or a small USB harddisk would be needed. Recording large amounts of data on the Pi's SD card would kill it in relatively short order.

Some informative links:

  1. Motion on a Pi
  2. Webcam IR conversion