Cameras

To investigate the visible spectrum beyond the water surface MR TURTLE (The Unmanned Radio Telemetry Limnology-Exlorer) is equipped with a camera on deck. Due to the pre-existing Raspberry Pi the decision was made during the preliminary stages to choose a Raspberry Pi Camera. Furthermore relevant arguments are the cheap price as well as the unproblematic installation.

The following text describes the Raspberry Pi Camera V2.1 installation, including an example for an automatic picture recording script combined with an auto boot script using crontab.

The Raspberry Pi is pre-installed with the free-to-use operating system "Noobs", available on: https://www.raspberrypi.org/downloads/noobs/

The Camera is plugged into the CSI-Interface.

Fig. 1: Camera connected to the Raspberry Pi

Afterwards the camera can be activated using the following settings.

Settings -> Raspberry-Pi-Configuration -> Interfaces -> Camera enable

The camera can be alternatively activated using the console.

sudo raspi-config -> interfacing options -> Camera enable

Now a new document can be created applying an arbitrary editor. The document will include the camera script, taking pictures each second for one minute and saving them indicating a filename with integrated timestamp. An auto boot script (Crontab) executes the camera script each minute.

#Picture directory 
IMGDIR='/home/pi/camera' 

# timestamp
TIME=$(date +%d%m%Y_%H:%M)

# picture label with continuous, binary numbers
BILD=$Bild%02d 

# create filename 
FILENAME=$IMGDIR/$TIME:$BILD.jpg 

# sequence of images
raspistill -w 1200 -h 800 -tl 1000 -t 58000 -o $FILENAME -n 

The script should be saved local using the file extension ".sh". For futher investigation it is recommended to save the script using the path "/home/pi/camerascript".

Explanations:

raspistill: comand to take pictures
-w          width of resolution
-h          height of resolution 
-tl 1000:   taking pictures eath second 
            (Raspberry Pi enables max. 900 (millisecond) continuous repetition rates)
-t 58000:   period of time
-o          save location
-n          to quash the preview

Thereafter a crontab will be created to execute the camera script after booting the Raspberry Pi.

Type into the console

sudo crontab -e 

An editor has to been choosen before running crontab the first time. The nano editor is easy to handle (select 2 and confirm with enter)

Now add a new last line:

*/1 * * * * sh cameraskript 

Aftwards save the script using Strg + o. The following (memory) location is important.

/etc/ . /cron.d/crontab

The script will now be executed once per minute. Detailed description handling with crontab can be found here: https://github.com/mileusna/crontab

There are a lot of possible ways for a water-resistant camera integration. On deck of the TURTLE, the Raspberry has been laid into a waterproof box, the camera tentative wrapped with foil. But there are countless ideas online. For example 3d printing cases: https://tinkererblog.wordpress.com/2015/07/28/how-i-designed-a-compact-weatherproof-raspberry-pi-case/

To move the camera vertial and horizontal a "Pan-Tilt HAT" by Pimoroni Ltd. has been integrated additionally.