Homemade sea water for testing an ROV

March 16, 2014

Our GHCHS Algilata OpenROV project is not located near the ocean.   The OpenROV community has found that salt water operation can be flakey compared to fresh water due to low resistance between the salt water and  external wires that connect the battery tubes and the motors.     This post deals with making simulated sea water for testing the OpenROV in the lab.

Sea water conducts electricity due to the dissolved salts that produce ions for transporting charge between conductors submerged into the water.   Typical sea water has 35 parts per thousand  by weight of salt in water.    Since water at standard conditions weighs 1000 grams/liter then we can say that sea water has 35g of salt per liter.

I wanted to use just a cup measure to make a batch of sea water.     So I weighed one cup some Himalayan salt and found that it weighed 8 oz.  So we can estimate the weight of salt using this ratio…about 1  avoirdupois oz weight per 1  fluid oz .   Of course this will vary with the granularity of the salt due to variations in packing density but it should be good enough for conductivity testing.

Given that there are 28.3 grams per avoirdupois oz and  33.8 fluid oz per liter the sea water concentration of 35 gm per liter converts to  1.24 avoirdupois oz per 33.8 fluid oz or

1 avoirdupois oz per 27.2 fluid oz.

Since 1 cup (8 fl oz) of Himalayan salt weighed 8 avoirdupois oz then I would need to mix this with 217.6 fluid oz of water or 27.2 cups of water (1.7 gallons)

So I now have a simple rule of thumb for adding granulated salt to water using a volume measure:

volume ratio salt:water  1 : 27.2 

Other useful equivalents:   5.7 oz salt per gallon of water

                                              1/4 cup salt to 6 3/4  cup water

                                             1 tablespoon  salt to  1.7 cups water

Measuring salinity using conductivity:

Scientist often use conductivity to estimate salinity.   Standard units of conductivity are Siemans/meter  (S/m).    The electrical conductivity of 35 ppt salt water at a temperature of 15 °C is 42.9 mS/cm  (ref).   Thus 35 ppt equates to 42.9 mS/cm.


Taken from wikipedia

Conductivity measurements assume that there are two parallel electrical plates of area A in water at a distance L apart.   If a voltage (V) is put across the plates and the current flow (I) measured then the conductivity  k = I/V*L/A =  L/(R*A)  where R is the resistance V/I.    Under ideal conditions the conductivity between the ROV wires and the water should be very low (high resistivity) but if a small area of copper is exposed  then conduction can occur. eg  some OpenROV forum members are finding resistance on the order of kiloohms rather than megohms.

Practically, if you put two probes from an ohm meter into water, the measured resistance will depend upon the area of the probe submerged and the distance between them.   You can use this as a reference to test your simulated sea water at home.

conductivity plug testerI made a simple  crude conductivity  instrument out of a two prong to three prong electrical plug adapter.   The plug prongs are separated by 1 cm and the exposed area between the prongs is almost exactly 1 sq sm.  I covered the non-facing sides with tape or you  could use paint or nail polish to insulate the surfaces from water.   See photo.

In the field,  dip the plug tester prongs into the water and measure the resistance between them.  Note the temperature since conductivity varies a lot with temperature.

Theoretical  plug conductivity prediction for sea water.

k = L/(R*A)  = 1/R            S/cm

= 1000/R    mS/cm

Typically sea water resistance in ohms for this homemade instrument  at 15 deg C would be

R_ohms = L/(A*k)= 1cm/(1cm ^2)/(42.9 mS/cm) = 1000/42.9 = 23.3 ohms

When creating your simulated sea water at  home you would like to have similar conditions.   You would add salt to your water tank/tub until the resistance level matched.


I did a quick conductivity test by dissolving 1 tablespoon of Himalayan sea salt in 1 3/4 cups of water.   The measured resistance  using my plug conductivity tester was around 3 kohms with a VOM meter and using the voltage / current method the resistance was 230 ohms.     So it is reading much higher than the theory.    The test was done at 70F (21C).   Temperature changes the conductivity about 2% per degree.  The measurement was 6 deg C higher so at most we would expect a 12%  increase over the 15 C reference.

The absolute measurements can vary too much with conductivity so I would recommend just using the 35g/kg  salt/water mixing method or just doing relative conductivity measurements..i.e.  matching field conductivity to home conductivity under similar conditions.


Making Fat Shark FPV goggles work with OPENROV ($7 solution ?)

March 7, 2014

Robodox ROV team is building an OPENROV 2.5 kit for Algalita Research Foundation to take on their July 2014 Pacific Gyre expedition.    The ORV catamaran , named Alguita, will take a team of scientist to sample and analyze the effects of plastic in the ocean on marine species.    To help extend their capability to locate plastic concentrations they are utilizing a variety of sensors.   One is a Phantom quadcopter drone equipped with a Fat Shark Predator V2 FPV system.

IMG_7776The Predator V2 uses two LCD screens to display video in goggles show below.


The Predator specifications are shown here.   Pictures are sent from an aerial camera platform to the goggles in real time over a 5GHz wireless link.

openrov 2.4The underwater ROV that Robodox is building will do a similar function by transmitting HD camera video to a topside Laptop computer over a two wire tether.    It would be desirable if the Fat Shark video goggles could also display the Laptop video sent by the ROV.    Unfortunately the video formats are not compatible without a VGA to composite video converter.   I did a little research into how this could be accomplished.

Here is the plan:

1) purchase a Tmart $3  VGA to A/V RCA converter.  03m-VGA-to-SVIDEO-and-RCA-Female-Cable_320x320

2) Purchase an $3.50 Allelectronics 3.5mm  A/V  to RCA cable with 6 ft  extension to allow freedom of movement between the laptop and the goggles.

3) Plug the VGA converter into the laptop VGA output port and then plug the 3.5mm A/V cable into the Fat Shark video input port via the extension.   Turn off the Fat Shark wireless receiver.

Seems like this would work…yet to be tested.

Wireless Connection to the Fat Shark

The transmitter side of the Fat Shark FPV system involves a small 600 TVL camera that plugs into a transmitter compatible with the receiver in the goggles.

Fat Shark tranmitter

If the transmitter is available on the boat (ie a spare that is used for the Phantom drone) then the output of the converter could be used in place of the camera output that plugs into the transmitter.   This way the goggles could be free from any wires. There would be another plug adapter to mate the composite video RCA plug to the plug on the xmitter.

Algalita OPENROV ready for testing

February 25, 2014


I wanted to share what the Robodox Algalita ROV engineering team has been up to for the last two months.  See Robodox Engineering ROV for ORV blog post : Feburary Status Update .   I am happy with their progress and we expect to have the underwater robot ready for the Algalita summer voyage.

Relevant posts:

Dec 20 2013 OpenROV Berkeley Trip

Robodox 599 Algalita 2014 Youth Summit Video Submission

Use of Robotics to support Algalita research into the Pacific garbage patch


http://robodoxrov.wordpress.com (build blog)

Algalita ROV project facebook page

OpenROV Cape Test Program (No Beaglebone required)

November 30, 2013

I decided to modify the OpenROV 2.4 Arduino source code to create an automatic test program that stimulates each of the cape outputs periodically to see if the Arduino ATmega328 chip and connecting circuitry are operating correctly.  Software has been tested with the cape operating  stand alone.  Hopefully it will run in a OpenROV cape with a Beaglebone attached provided the cape.(TBD)

Hardware Requirements:

OpenROV cape


LED lights

Battery Pack (12v)

ATmega328 programmer (Arduino Uno will do)


1) Remove the ATmeta328 chip from the Cape and use an Arduino board to load the Openrov_cape_test.ino with includes.

2)Place the ATmega328 chip back into the Cape and hook up the externals (motors, servo and lights) .

3) Connect the battery power to the Cape. (Typically 12v)

4) Watch motors , servo and light cycle periodically in sequence. Each command level lasts for 2 seconds.


Software Files: Download OpenROV_cape_test  folder from my dropbox. In it you will find the following OpenRov_cape_test.ino file.   Just use it instead of OpenRov.ino file.

/* OpenROV_cape_test  Written by Chris Siegert, 11.30.13 , vamfun@yahoo.com, https://vamfun.wordpress.com This program is designed to test the OpenROV Cape.  Program generates commands that cycles motors, tilt servo and lights sequentially.  No Beaglebone is required for the test. Power the cape using the battery input terminals and connect the output devices. All motors are cycled simultaneously with 2 second steps at magnitudes {135,90,45,90}. Motors are left in reset mode. Next the servo is commanded to {170,10,90}Basically full tilt up to full tilt down and back to neutral. The light goes to full brihtness then to half brightness and then off. The device sequencing is then repeated continuously. If running without the Beaglebone, load the sketch and its includes into the ATmega chip using an Arduino project board or programmer.  Then reinsert the chip back into the cape.   If running with the Beaglebone, one might be able to just upload the program using the OPENROV cockpit utility. */

#include <Servo.h>

#include <Arduino.h>

#include “Motors.h”

#include “Command.h”

#include “Device.h”

#include “Timer.h”

Motors motors(9, 10, 11);

Command cmd;

Device vout(“vout”, 0, vout.analog, vout.in);

Device light(“light”, 5, light.analog, light.out);

Timer time;

Servo tilt;   int array[MAX_ARGS];

int case_no=1;   void setup(){


pinMode(13, OUTPUT);





delay(3000);//wait for ESC to calibrate }

void loop(){

switch ( case_no)   {

case 1:


Serial.print(”  mag = “);



delay(2000); //cds  set step delay


Serial.print(”  mag = “);





Serial.print(”  mag = “);





Serial.print(”  mag = “);


Serial.println();    //motors.reset();




case 2:

Serial.print(“servo” );

Serial.print(”  mag = “);





Serial.print(“servo” );

Serial.print(”  mag = “);



Serial.print(“servo” );

Serial.print(”  mag = “);




Serial.print(“servo” );

Serial.print(”  mag = “);






case 3:

Serial.print(“light” );

Serial.print(”  mag = “);




Serial.print(“light” );

Serial.print(”  mag = “);




Serial.print(“light” );

Serial.print(”  mag = “);







case_no = 1;  //repeat sequence

} //end switch


Note 6 BBB: Creating OPENROV image with Virtualbox (problems still)

October 28, 2013

I followed the procedure   to use the Virtualbox /Vagrant approach to generate an OPENROV image.   I am really enthusiastic about the fact that I can run Linux easily on my Toshiba Win 7 machine.

Fixing the number of processors

The first problem I ran into was the Vagrantfile in the openrov-image-master GIT repository has a default of 2 cpu’s for the Virtualbox.    My Toshiba Satellite L655 intel processor doesn’t have hardware virtualization (VT-x) capability available in the bios.   The default value of 2 processors  requires VT-x.   I fixed this by editing the Vagrantfile to use 1 cpu and at least got ubuntu installed.  Here is the new Vagrantfile:


# -*- mode: ruby -*- # vi: set ft=ruby :

Vagrant.configure(“2”) do |config|  

# All Vagrant configuration is done here. The most common configuration  

# options are documented and commented below. For a complete reference,  

# please see the online documentation at vagrantup.com.   config.vm.box = “ubuntu-12.04-32bit”   config.vm.box_url = “http://files.vagrantup.com/precise32.box”   config.vm.provision :shell, :path => “build.sh”

config.vm.provider :virtualbox do |vb|          

vb.customize [“modifyvm”, :id, “–ioapic”, “on”]     

vb.customize [“modifyvm”, :id, “–memory”, “2048”]     

# you cannot use more than one cpu unless you have hardware virtualization. So for my Toshiba laptop I have no VT-x in BIOS   

vb.customize [“modifyvm”, :id, “–hwvirtex”, “off”]     

#vb.customize [“modifyvm”, :id, “–cpus”, “2”]



end code:

Use Chrome over IE

Problem with IE downloading ubuntu-saucy-console-armhf-2013-09-26.tar.xz  .   Apparently IE creates a tar out of this that must be unzipped.   PEA zip gave an index out off range error and I could not unzip the file.   Used google Chrome and worked ok.     I added the file to the Vagrantfile.

Logging in

I used putty to SSH into the Virtualbox.

User: vagrant

Password: vagrant    (It took me a while to discover this!!)

When ubuntu boots it goes to the home directory.

First thing is to change the directory to  /vagrant and list the directory since this has the build script.

Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:22:31 2012 from
vagrant@precise32:~$ cd /vagrant
vagrant@precise32:/vagrant$ ls
]             lib
build.sh      putty info 10.24.txt
cleanup.sh    ubuntu-saucy-console-armhf-2013-09-26.tar.xz
contrib       Vagrantfile

I list the directory using “ls” command and then copy the long name of the .tar.xz file and use it in the build command
vagrant@precise32:/vagrant$ sudo ./build.sh ubuntu-saucy-console-armhf-2013-09-26.tar.xz –black

When running build.sh be sure to add the processor type  as a second argument.  For me this is “–black”.

Updating Ubuntu

The next error was the need to install some missing tool packages.  I  wrote a shell script that is called in the Vagrantfile to load boot tools, git, nodejs,npm qemu-user-static,cross compiler etc.  Here is the script update.sh:


echo “updating ubuntu with nodejs,crosscompilers ,git,qemu-static etc”

sudo apt-get update

sudo apt-get install -y dosfstools git-core kpartx u-boot-tools wget

sudo apt-get install -y nodejs nodejs-dev npm

sudo apt-get install -y debootstrap qemu-user-static qemu-system git

sudo apt-get install -y g++-4.6-arm-linux-gnueabihf

#end script

 update.sh is called in the Vagrantfile by adding a provisioner statement

config.vm.provision :shell, :path => “update.sh” 

Build Errors

Currently I still am getting some build errors related to unsuccessful mounts and failure to make some directories:

mount: wrong fs type, bad option, bad superblock on /dev/mapper/loop0p1,


mount: mount point /vagrant/root/dev/ does not exist

mount: mount point /vagrant/root/proc/ does not exist

mount: mount point /vagrant/root/sys/ does not exist

mount: mount point /vagrant/root/run/ does not exist

mount: mount point /vagrant/root/etc/resolv.conf does not exist

cp: cannot create regular file `/vagrant/root/usr/bin/’: No such file or directory

mkdir: cannot create directory `/vagrant/root/tmp/work/’: No such file or directory

Here are more complete debug files

installation debug printout

dmesg and partd printouts

Anyone have some ideas??

note 1 Beaglebone Black: Boot attempt using OPENROV image

August 9, 2013

As mentioned in my last Arduino post, the 599 Algilita ROV team selected the OPENROV processing architecture for their ROV.   It was hoped that this would save us a lot of time setting up the cockpit display software which is already working on OPENROV.   Ha…think again.   Unfortunately, the OPENROV flash image which works so nice in the Beaglebone doesn’t seem to boot with the Beaglebone Black (BBB), at least for me.

Flashing the OPENROV image to BBB (unsuccessful)

The BBB uses a built-in eMMC to boot from normally.   To flash a new image you insert a micro SD MMC and while holding down the User (boot) button on the BBB you power up the board either by USB or 5v power supply.  Continue to hold the button until the user LED’s begin to blink (See flashing procedure),  The BBB board is then boots up and transfers the image from the micro SD to the built-in eMMC.

I made a bootable 8GB micro SD card using the Windows solution outlined in the Getting Started link  github.com/OpenROV/openrov-image.   I held the boot button down, powered up and waited for over 5 minutes for the user LED’s to light, but only the power LED lit.

I searched the forums and only found one comment re the BBB not being able to flash the OPENROV-image.  Apparently some modifications need to be made to the uSD 64K partition that contains a file called

I did check that I could flash something by starting with a fresh Angstrom image and booted that ok.

note 2 BeagleBone Black:building OpenROV software with Angstrom

August 9, 2013

I decided to try to get the OpenROV software working using the demo Angstrom distribution that comes installed in the BBB since it has a lot of the needed packages already installed and you don’t need an Ubuntu SD image.   There are 13 installation steps in the OpenROV/openrov-software/Readme.md file shown here.  I skipped step 1 since I am using Angstrom.  I postponed Step 2 for later if I get everything else working.

Step 3

upgrade software and install rerequisits (holy moly, there’re packages!):

sudo apt-get update
sudo apt-get install g++ curl pkg-config libv4l-dev libjpeg-dev build-essential libssl-dev vim cmake

I verified that most of the required packages were already installed and found only “build-essentials” missing from Angstrom.  Those that were installed were updated with opkg.

build-essentials was not found in searching Angstrom opkg.   However,  I did find packagegroup-core-buildessential-dev 1.0-r0.1 .  I installed this with opkg and seemed to work.

Installing SUDO:

Using opkg search I couldn’t find  a sudo package.  I did find an Angstrom dev package for sudo and installed that by downloading it to my computer from here and copying it to the BBB root.   I then used

root:/# opkg install ./sudo_1.8.4p4-r1_armv7a.ipk

The program unzipped the ipk package and successfully installed  sudo.

Step 4:

Install nvm (Node Version Manager):

git clone git://github.com/creationix/nvm.git ~/.nvm
echo ". ~/.nvm/nvm.sh" >> .bashrc
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> .bashrc
echo "export PATH=$PATH:/opt/node/bin" >> .bashrc

And make those changes work now:

source ~/.bashrc

I followed these instructions and tried to install node v0.8.11 as per Steps 5 thru 7  but ran into a missing Python compiler.ast error so I opkg updated the Python compiler and then things worked.   Since Angstrom has v0.8.2 node installed already, I don’t think it is necessary to install v0.8.11 but I have yet to try this.

No /opt/ directory

It seems that my Angstrom dist doesn’t have an opt directory and I am not sure why since it is standard in the LInux directory tree.  Also many of the paths in OpenROV software assume it is populated.   My solution was to create the directory.   Later I would install OpenROV software into it.

Step 8

Install mjpg-streamer

Download mjpg-stream:

 wget http://downloads.sourceforge.net/project/mjpg-streamer/mjpg-streamer/Sourcecode/mjpg-streamer-r63.tar.gz

Prepare mjpg-streamer for make:

tar zxf mjpg-streamer-r63.tar.gz
cd mjpg-streamer-r63.tar.gz

Make and install OpenCV:

make && sudo make install

The r63.tar.gz package would not install because of  fatal error: videodev.h No such file or directory .   Apparently it uses videodev.h instead of videodev2.h which is in more recent library distributions of Linux..at least in my version of Angstrom.  I tried to fix it by just changing all the videodev.h to videodev2.h in all the source files that need it.  I got it to compile through most of the files but ran into some other problem which I don’t recall right now.   So I gave up and found a more recent version of mjpg-streamer on the github.com site that uses vidodev2.h.  You can download this from Dominik’s codewithpassion site as “mjpg-streamer or the sourceforge site that it is branched from.  You know you have the right version if mjpg_streamer.c has <linux/vidoedev2.h>.

I actually installed mjpeg-streamer-experimental in /root rather than /~ and tested it standalone and it seems to work fine with Chrome except there is about .5 second delay in the image.  I understand that the delay is roughly .2 to .3 seconds with Firefox browser but I didn’t try it.

Step 9 Download OpenROV ROVision:

cd ~
git clone git://github.com/OpenROV/openrov-software.git
cd openrov-software/

Change to development branch:

git checkout development

edit ~/.bashrc, add:

export LD_LIBRARY_PATH=/usr/local/lib

You’ll need to restart your shell:

source ~/.bashrc

Git OpenROV-software

Ok I did all this but I could not checkout development branch…it said that it didn’t exist.  I decided to use Dominiks codewithpassion/OPENROV code since it probably was more recent and also had a development branch which I checked out to 599ROV branch.

git clone git://github.com/codewithpassion/openrov-software/

git checkout remote/origin/development -b 599ROV

Step 10

Download modules:

npm install express socket.io serialport

Completed this step ok and had enough modules to start testing.  I did this from root directory.

Preliminary tests:

Restarted shell with

source  ~/.bashrc

node app

and got error that “forever-monitor’ module could not be found.   This is located in node.   I fixed this by reinstalling node in root rather than home.  The is is because the openrov software is now installed in /opt  I think.

Cockpit display now works and includes the Genius camera image!!

The next note will be on getting the Arduino firmware loaded to the OPENROV Cape.