I got tired of being under water and not knowing where I am pointed or going. So I added the Parallax compass module HMC5883L. It works on I2C bus so it was easy to hookup. Just 4 wires, 5v,gnd.,data, clock (connector P4). I used most of the code from an Arduino file I found on the web called compass_Simple. I first made sure the code would run by its self on the cape board (this also proves that it is wired correctly). Then I added it to the OpenROV Arduino code. Last night I had it in the pond to see how it works. The problem now is the laptop display has a resolution of 1366 by 768 and I have added temperature, depth (pressure), and heading which is to much data and runs off the bottom of the screen in landscape mode. I turned the display properties on the laptop to portrait mode which allows me to see the data but now the keyboard is vertical and the USB camera image is smaller. Ugh! It is very tough to run the OpenROV this way. When I was testing the code and electronics in my shop I was using a desktop computer with a resolution of 1280 by 1024 and you could see all the information with no problem. We need the OpenROV screen to use less real estate for the led light display or on the right side of the screen give us a little more area for information feedback.

As always it is fun to add new features to the OpenROV.

life is good!

1388-compass.jpg (190 KB) 1389-OperRov_241jun2013.jpg (133 KB) 1390-compass_Simple.ino (1.21 KB)


Hi John, nice work with the compass, i am still building but plan to add a few extra sensors after i have everything running smoothly. I agree about the screen resolution, i was hoping to drive the rov using a tablet, but most things become off the screen...


This is awesome. Are you going to be around for the Dev Call this afternoon?

We can talk more about it there...


Wow great work John

Do you have a screen shot of the Compass in the Cockpit?

I know you may have posted this before but what depth can the pressure sensor work at and a part number that you used. same for the Temp Sensor.


here it is from the previous post:

I added a temperature sensor to the OpenROV. I used an LM35 which does 0 to 100 degrees C at 10mv per degree. The AtoD on the Arduino processor is 10 bit which gives you 5v/1024 or around 0.005 volts per count. So you have a resolution of about 0.5 degrees C. You need to remove R76 on the top of the Cape board and add R30 on the back of the Cape bd. This frees up ADC1 which is tied to 5v supply and then hook the 3 pins from the LM35 to 5v, gnd. and Pin 1 of Analog in. I hooked 5 volts and ground to J1 on the Cape bd. I drilled and taped a hole in the electronics tube end for a 1/8 inch pipe plug. I drilled out the brass pipe plug .1 inch and epoxy the LM35 into it. Then screwed in the pipe plug assembly and hooked up the wires. Using the new Open Cockpit code it is easy to send the temperature to the screen changing openrov.ino.

I also added a pressure sensor. I used an Omega PX40-100G5V which does 0 to 100 psi. This has 0.5 volt offset and goes to 4.5 volts or a span of 4 volts. So 25 psi is 1 volt or each count is around .12 psi. Figuring 15 psi for 32 feet in fresh water gives you an approximant depth. You need to remove R57 on the top of the Cape board and add R31 on the back of the Cape bd. This frees up ADC2 which is tied to 3.3v supply and then hook the 3 pins from the PX40 to 5v, gnd. and Pin 2 of Analog in. I again connected 5 volts and ground to J1 on the Cape bd. I drilled a hole in the electronics tube end for a small pipe nipple and used a small piece of tubing to connect the two. Using the new Open Cockpit code it is easy to send the data to the screen as depth.

I had both parts lying around from previous projects and they are both 5 volt parts which makes it easy to hook them up to the Cape board. The LM35 is pretty cheap, but the pressure sensor is around $60.

(the post was adding a sensor)


Very nice! Was mounting those components so that they get a good sample of the water challenging? Also, for your compass module, do you find that there are many disturbances in your data from the surrounding circuitry?



Here is a picture showing the heading data. Note I have the motors running. you can tell by numbers in mtrs. And I have the led lights on. I was not able to get a good picture using the laptop with it in the water, so this is off my desktop with the OpenRov on the bench. I have included a picture of the temperature sensor stuck in a 1/8 in. pipe plug. I drilled out the pipe plug and fit the metal sensor case into it (not all the way through). Then added epoxy. Then you drill and tap the electronics housing and screw it in. Pretty much the same for the pressure sensor.

1391-openrovheadpic3.jpg (202 KB) 1392-sensorswired.jpg (88 KB)


When I first hooked it up I had the compass sensor mounted in a metal vise on my test bench and no matter how I turned it, it read close to the same number. I then looked at the documents on it that I downloaded and they mention metals should be kept away. Moving it away from the vise, it worked. The 2 times I have had it in the water with the compass mounted in the ROV it seems to be OK. It is hard to read the data on a laptop, small print and too much daylight. It would be nice to have a compass on the openrov screen with a needle showing how the unit is pointing or traveling.


Hi John

I have been looking for a good pressure sensor to add to my ROV most of the ones I have found have been way to big. Could you please post the part No. or supplier of yours. It looks nice and compact!!

Listed below are some of the sensors I have been looking at

Be nice to go all out with this one.




Omega PX40-100G5V which does 0 to 100 psi.

It is listed in the above description.



Awesome Thank you missed it :)