Depth and Heading/IMU sensor board!


I've been working on getting a combined depth and IMU sensor board made for the OpenROV. Depth and heading are very useful instruments that enable an ROV to better know where it is, and where its going.

My goal for designing this board has been to keep the costs low, and make it easy to integrate into the OpenROV

The v1 schematic and layout of the board can be found right here

The sensors going on the board:

Depth - The MS5803-14BA which can measure up to 14 bars of pressure with 0.2 mbar resolution (link)

IMU (9-DOF sensor) - The MPU-9150 which has integrated 3-axis gyros, magnetometers, and accelerometers. (link)

I'm planning on sending the board to get fabbed in the next few days, feel free to look over and criticize the schematics/layouts since its the first time I'm doing a real PCB (I'm a ME not an EE) and also making it in Upverter!


How are you connecting the pressure sensor to the outside? this sensor is intended to go straigt against the pressurized liquid, and a sealing O-ring around the metal housing.

I would fit the sensor to the opposite side of the pcb and put in holes for screws to fasten the board to the endcap of the OpenRov. the outside pressure will push the sensor and push the board inwards, so the fastening screws should be in close proximity to the sensor.

but you will still have a issue with a O-ring groove for the sensor. maybe a flat-bottom mill-bit could work to make a groove in the endcap for a O-ring


I'm planning on directly potting the entire circuit board in an epoxy (probably the hysol E-90) and just leave the top of the pressure sensor exposed (since its nicely taller than all the other components on the board). I was thinking about the recommended o-ring seal, but since all the components are solid state there isn't any reason for keeping the board in a 1 atm pressure vessel. this way we can also mount the board further away from the motors (in tests the strong magnetics of the motors do cause a little bit of jitter in the magnetometer readings)


sounds like a good plan. keep us updated on the progress!


Colin - we are also talking a bit about relative motion sensors on another thread (Raspberry Pi one).

For an auto-pilot function it would also be useful to know motion relative to the water (currents, etc.). Does anyone know of motion sensors that would be usable with the ROV?



Typically to get relative motions, you need absolute positioning with respect to the surface (like a USBL acoustic positioning system) or very high precision relative positioning with respect to the seafloor (like a DLV - Doppler Velocity Log). However both of these instruments are typically very expensive. So it would be super awesome if we could figure out a way to develop one for cheap ourselves!


The boards are ordered, should be here in about a week!


The boards are here! They look good and all the continuity checks work out :)

I'll be stuffing them today/tomorrow and I'll post the results (fingers crossed)




Hi Colin

How did the testing go on this board?

I would like to buy one if you happen to have any available, having the components on and potted in epoxy would be an even bigger plus.




It went well! They'll be available in the OpenROV store very soon.


Hi, this might be a bit late and thus not very useful but I am working on an open source dive computer project and I have gone through the struggle of how to mount the MS8503 sensor. What I finally did and it's worked well, is create a breakout board for the sensor, then drilled a 6mm hole (the same diameter as the sensor) in the case and used an adhesive automotive gasket sealer to mount the sensor to the case. with the breakout board giving it some extra surface area for the gasket sealer to do it's thing.

The original plan was to then glue some acrylic parts to the inside of the case that would straddle the board and prevent the breakout board from being pushed in under the pressure but this does not seem needed. I have taken the device down to 75 feet without failure or even any signs of weakening. I would recommend a similar mount. That would allow you to mount the IMU sensor separately in an orientation that would make it more accurate and easy to code to.

I've made the breakout board schematics and board designs for this sensor and one for the more readily available MS5541 available on my website ( - in the WIki section). I've also written an open source Arduino library for the MS5803 (for those that might be experimenting with Arduino or if you want to port it) at


Any update on the depth/heading board?
Will we have auto depth and heading when it’s finished or only sensor data?



Hey Victor,

I'll let the mechanical engineers respond on the topic of mounting the sensor, but regarding the software I just wanted to let you know that we have been using it as reference code for MS5803 in OpenROV. Your code clearly pops out on github :-) We are using the I2C interface vs the SPI so I'll send my feedback/pull request in the next couple weeks as we have been dialing things in this month.

Thanks for sharing with the community!



Victor, Brian, and others:

I am trying to use Victor's Arduino library for the MS5803-14BA and running into this error:

MS5803.h:67: error: ISO C++ forbids in-class initialization of non-const static member ‘temp’

I'm trying to use the SPI option, but I could try it with I2C too.

My email address is if you have thoughts on this.




Really looking forward to this. Any idea when it will be available and what the cost will be?


Soon...ish... and under $100... lol. That's about as much as I can figure right now. We still have to do some testing to make sure our waterproofing method for the sensor works and does not interfere with its ability know... sense. Also, we've got a fairly hefty amount of code that will have to be developed, and we've been a bit over our heads recently. My hope is that we'll get enough testing done to give the go-ahead to a fab shop for the initial batch within the next week or so.



Hi Eric,

That’s excellent, sign me up for one :wink:



I have looked into using the built in sensors (accelerometers, gyros and compass) in mobile phones to do inertial measurement for my DIY Dive Computer project ( and have found that there is a lot of noise in the data produced by these sensors that will cause a lot of drift once you double integrate the data to get position (see this Google Tech Talk: at about 25 mins in for a description from someone who knows more about it that me). I did some experiments and found that this drift can add up to hundreds of meters of error in position in only a few minutes. When I first saw this project, I thought that you guys had found a new part that got around this issue but after looking at the data sheet, I'm not so sure. Am I missing something or did you guys?


Getting good position data from an IMU based on low-cost accels and gyros is challenging and the drift i have seen agrees pretty much what you have observed. Basically even with the best processing you are going to see about 1cm/sec drift in position. The use of a magnetometer can help to bound these errors, but absolute position/heading will always have a very high drift rate.