CTD+ (Conductivity, Temperature, Depth, Light) - From the Breadboard to the ROV



Greetings enthusiasts!

In a previous post, I discussed a prototype using light, temperature, depth, and conductivity sensors, entailing a modular. remotely accessible package for deployment on ROVs or other marine craft. The high level plan was to develop a sparsely connected module sensor suite, using a simple web server/client interface, all in node.js. This has been progressing smoothly, albeit slowly, over the last few months. Today, I would like to go over the hardware changes that have taken place for a field testable prototype; saving the software for the data visualization for a future post.

As previously mentioned, CTD solutions for hobbyist are not commonly available. Though one can peruse the DIY aquarium community and discover a number of rather handy sensor packages, I had decided to design and build my CTD solution form the ground up. Drawing heavily from the now defunct MIT SeaPerch sensor suite, SeaPerch, I've gone off and have taken to prototype and push the solution into an Otterbox P40 (I hope this puts a smile onto the SeaPerch folks faces). Rated to 100ft of depth (< 40m) in water (stay with me here), the off the shelf pressure vessel will suffice for the next stage in prototyping. Supporting up to 1000 pounds of crush force, with a few o-ring modifications, I feel the OtterBox can do well for at least 100m depth. (we shall see when we complete our Hydrostatic Pressure Chamber...or dive it, which will most likely happen first)

Moving on, lets take a look at the innards of the solution:

  • Arduino UNO
  • SD card Shield SEED Labs
  • Light to frequency converter (what's this have to do with a CTD? Nothing really, but we may be curious about ambient light attenuation at depth)
  • Temperature sensor
  • Pressure sensor
  • Conductivity sensor

In this iteration, we are using the Arduino UNO and SD shield, with a 9VDC battery supply, connected neatly to the sensors in the snug, comfortably dry confines of a translucent OtterBox P40 case. The photots speak volumes. I've sealed all holes drilled for the temperature, conductivity, and pressure sensors with epoxy resin and healthy seal of silicon for good measure. I then dumped the case into a test tub to check for leakage at 1 atm plus a few inches, for an hours. Once satisfied, I added the more sensitive electronics to the kit. Hopefully this is enough for more aggressive depth testing. I will also be modifying the o-ring of the case, using a thicker version, allowing me to compress and lid more snugly, addressing a 100m target depth (that's 160.5 psi).

The Conductivity sensor was an interesting one. Using a design by Belladonna, and using slightly different components to address the voltage supply (9 VDC instead of her 12+), I've gone and wired up this monster. The circuit is simple. It takes a 9VDC source signal and passes it through an op-amp oscillator, giving the signal a sinusoidal, or AC profile. Then we pass the signal through an amplifier and to the sensor probes, which are gold plated stereo jacks for high conductivity. An AC current is passed between the probes. An additional amplifier and rectifier circuit then takes the values and converts to DC and out to the Arduino headers. Why the bother with the AC signal conversion? Well, with DC current, we break down the molecules of water. What we would see is a varying signal across the probes. Using AC of a certain frequency, we do not break apart the water molecules and hence are able to read the resistivity of the fluid between the probes; allowing for determination of salinity (after calibration of course. But that's for a different post). Another consideration is the change in salinity with temperature. Therefore, using the on-board temp. sensor, we need to calibrate and adjust as given temperature deltas. This is done in the software, which will be implemented in the near future.

Photos:photo 1(1)Breadboard Testing

photo 3

Component wiring after breadboard testing of the conductivity sensor.

photo 4

Fitting the parts into the OtterBox. Dimensions - 17cm x 12cm x 6cm -

photo 5

Top photo, light sensor in middle/left/bottom of component board.

photo 1

Finished board mount.

photo 2

Almost done. I still have wiring of the conductivity probes and temperature sensor to finish up.

On-board Software Solution:

For this iteration, I've chosen to log all sensor data directly to the on-board SD card. The end target is to have a MySQL server running, logging the data and allowing for real-time visualization from the on-board ROV computer (for the OpenROV kit = BeagleBoneBlack and controller). First there is the sensor code itself. We have a temperature method, light to frequency counter, conductivity, and pressure sensor methods, pulling data from the sensors in a predetermined time interval. The next bit of code logs the data to the SD card using the SD card Arduino library. I am adding a simple string set to the datalog in a human readable manner. Future implementations will push this data into a MySQL server, with all the pretty tables and timestamps, etc. But for now, I will simply post-process the data after the dive to retrieve the dive profiles, utilizing the time stamps and data written to the log. Remember, when budget and time are a big factors of your development cycle, tracer-bullet prototyping is the best way forward. (For more on tracer-bullet prototyping see "The Pragmatic Programmer" by Dave Thomas and Andy Hunt).

Code: Conductivity and temp adjustment in the works. And ignore the magic numbers, etc. This is prototyped test code as it were :)

- TEMP -



- SD Card Write -


Well, that's it for now. There's loads yet to do and fine tune, but here lies a CTD+ prototype. Now to see how it fairs in the real world. Note: This CTD is highly buoyant (since that's also what the OtterBox is for), thus, compensation will be needed for deployment.

Remember, make and make often. make the world you want, not the one you were given.

-- Jim N.


Hi Jim:

Quite a good work.

One question. Could the converter be used for splitting the ambient light frecuencies components ?

I'm fond of astronomical spectral analisys. May be a similar thing could be done from the light absortion spectrum of water.

Don't you think that really interesting results could be achived ?


- Ion -


Hi Ion, thank you. Vary interesting idea. This particular semiconductor is limited I think, however...some thought is needed. I'll get back to you about that. At a given depth, does spectral imaging of the surrounding ambient light...or artificial light, tell you interesting things about the surrounding local water make-up, etc... has that question ever been asked? Thinking just about the fundamental physics, when you spectrally analyze water, you see the absorption lines of hydrogen and oxygen, i would think...plus other stuff...wow, I have to go back to my college physics text for that one.

Short answer, I'll get back to you. Thanks for asking that!

- Jim


Hi Jim:

It could be performed as we do it for stars.

The thing goes around comparing the expected spectrum with the actual one.

Known absortion lines are added to the recorded spectrum, resulting a graph of unknowns that can be identified with elements/compounds affecting the spectral distribution.

Its just an idea, but may be it could be interesting. The problem I see, is the enviromental darkness, but, by means of the led lights, which spectrum is well known, perhaps any useful data can be achieved.

A good reading about this stuff can be found at:


Together with one of the best spectral analysis software, that, by the way, is free.

- Kind regards -



I am very interested in your CTD. I was in touch with the MIT ROV team as they developed theirs and was disappointed when they gave up on it. Please keep me posted. I work a lot with underwater light data and will be happy to help with appropriate issues. A student in my lab has developed an Arduino based chlorophyll fluorometer which can be found at: http://misclab.umeoce.maine.edu/documents/Leeuwetal2013sensors.pdf

Best, Emmmanuel



There is a whole field devoted to underwater optics. There are many web resources, including http://www.oceanopticsbook.info/. I am very interested in using cameras as well as simple light sensors. We are using a camera to deconvolve sediments from color of water with an App (http://misclab.umeoce.maine.edu/research/HydroColor.php). Using the camera on the ROV we could also get information on materials in the water, for example by looking at a target from two known different distances.



Dear Emmanuel:

Thanks for the software link that I've found really, really interesting.

Kind regards


Thank you. Please, please keep me updated with any advancement with the CTD. I would love to have my undergraduate student build such sensors for the ROV/AUV they build. Best, Emmanuel


(New guy to your forum)

I may be getting in on this one late but...I know quite a lot about water chemistry instruments. I did this in the US Navy on nuclear reactors AND for Texas Parks and Wildlife Department when I was an undergrad in Corpus Christi.

I have to say that I am impressed with your work in integrating a CTD system in this way. Your circuit design skills far and away outpace mine. I was wondering if you had any intentions of mounting other water quality sensors on your project. Two that I see as VERY useful would be pH and dissolved oxygen. The light attenuation thing might be interesting too as an analogue to the Secchi dick depth measurement. For open water marine research, a sensor package such as this on a semi-autonomous ROV would be absolutely invaluable. Having the ability to take water quality readings at varying depth intervals during coastal assessment sampling projects would be REALLY helpful to field crews.

One more question. Did you leave yourself the ability to calibrate each sensor prior to use/deployment? We always calibrated pH, conductivity, and dissolved oxygen sensors before and after each deployment cycle. Doing so gave us a statistical "line" that we could use to adjust recorded readings as necessary.

For anyone who is interested, I managed to find an Arduino-compatible dissolved oxygen sensor at this link:


Experience tells me that their professed 12-month deployment claim is a bit exaggerated. Membrane-based DO sensors ESPECIALLY in salt water tend to become fouled with biofilms inside of about a month and are pretty much useless after 3 months. Still, this is an affordable way to monitor DO using an ROV.

Here's a pH sensor that is also Arduino-compatible.


Thanks for making your work public. Research such as this is what drives innovation and further research.


In short, yes and awesome! I’ll follow up in the discussion in a few days, slammed with work at the moment!


Dear Ken:

Wellcome to the forums and thanks for the links. Hope to keep on reading things from you.




Thanks Ion!

There is quite a lot of utility in what you guys are doing here. I have been messing with UAVs for a while now and the ROV is the next logical step. It's too bad that GPS signals don't work very well underwater. If there was a way to get good GPS logs for this sort of data, we'd be sitting on a marine mapping gold mine.


The article on the in-situ measurement of chlorophyll is intriguing. Have you done any further work with this?


Hey Jim,

About time for an update on the CTD?


Yes yes it is! And soon…


My apologies Emmanual. I’ve been out of touch for almost a year. I am jumping back into it and will update soon.


One thing that’s great about tech in our age is the ability to pivot easily both on the hardware and software layers. A previous bit of work, found here,

was shelved, and a redesign of the salinity circuit was needed. The situation has been remedied and I am currently wiring the system and will have new pictures this week.

Dove back into nodejs for the webserver, continuing work from so many years ago. I definitely need a Tardus.

I also removed the Arduino UNO and MEGA from the designs due to the lack of memory required for the webserver idea and on-board data logging, space in the OtterBox, and so forth. This, of course is just a prototype so huge improvements are required and there are better solutions on the SBC processing bits…but, makers use what makers have. And typically, makers like me, are broke :smile:


Greetings Enthusiasts!

I hope all are well. Great progress has been made. A weekend filled with nodejs, jquery, and socket-io…yeah.

Nearing completion of the software and hardware build of this seriously delayed COTS (commercial of the shelf) go at a CTD. All sensors have either been acquired and built, and integration is progressing…well enough.

Here’s a clearer layout of the CTD+, I’ve dropped the json object components for the moment and just fire off the sensor data through socket-io to any connecting client topside.

System Breakdown Hardware:

  1. Phidgets 8/8/8 Interface - Analog/Digital - Handles both analog and digital sensor interfacing.
  2. Raspberry Pi 1 - Yeah I know but is all I got, and it does a pretty decent job. Running raspbian
  3. Temp sensor - LM35
  4. IMU/Depth - OpenROV IMU/Depth
  5. Light Freq - TSL35R
  6. Salinity Sensor - Belladonna
  7. OtterBox - P40

System Breakdown Software:

  1. Phidgets Webserver running on the Pi
  2. Nodejs - Running node-phidgets, socket-io, and fs. (thinking about mysql for the database)
  3. MPU9150 interface code (still working this bit out. Going to be a C++/nodejs bridge)
  4. HTML/JQuery

Here’s a pic. Starting the re-build.


Nodejs widgets have been built and tested. Client side .html complete but needs tabulation and refinement. Temperature and light sensors have been tested and integrated. Salinity sensor bread-board is being fabricated. Calibration for salinity sensor to be completed this week. IMU/depth integration to be completed by Weds. Water tests planned for next weekend, however, battery block still needed and network connection to OpenROV brains / topside needs to be worked out.

Anyone want to test an otterbox with standard and large sized o-rings in a pressure chamber? Anyone have one I can use? lol

Testing .html:

More to come, remember, make and make often. Make the word you want, not the one you were given.

– Jim


What could be better than an optimized MP9150 library that outputs fused Euler and Quaternion values? Well, one that’s also optimized for a Raspberry Pi (and Intel Edison). RTIMULib, is just that, with the pressure sensor, giving 10DOF at that.

Navigation, Location and Dead Reckoning

Raspberry Pi Attitude filter GL demo from the RTIMULib: System running on the CTD Pi screen shot (connected over the GPIO i2c pins)