Hi everyone! Hope all is well!
I’ve seen on the forums that some people have been struggling with integrating the Atlas Scientific sensors onto the BlueROV system. There are a few different ways to do it, but here is what I did to integrate a conductivity sensor onto my BlueROV:
-
Starting off, in order to integrate an Atlas sensor onto the BlueROV, you must use a sensor that is paired with an EZO board. Atlas has thorough documentation on the EZO boards, providing important details about the board and sensor integration. Here is the one for the conductivity sensor EZO board that I used for reference. Pages 12, 14, 15, 16, 28, 31 were the most important for my process when integrating the Conductivity sensor on my ROV (more on that later). However it may vary between documents for the different sensors. This is the overall kit I got from Atlas. There are similar kits for pH, ORP, dissolved oxygen, and temperature. Learn more here. In the kit, it provides the necessary carrier board (where the EZO board mounts and the sensor plugs into before it reaches the RPI). The one provided in the kit has an SMA port and a pinout, which would work for UART, however I chose to use this one with a built-in USB micro port instead of the pinout to maximize durability and simplicity. Additionally, it’s ideal to purchase the SMA connectors/cables with the tinned leads separate from the Sensor cable so you can later splice it after potting the sensor cable in a penetrator.
-
Slip a penetrator over the sensor cable for later potting, then solder the sensor cable and SMA connector cable together (don’t forget heat shrink and O-ring!). Also, they recommend soaking the wires in alcohol before and after soldering them together to remove flux. Find more detailed instructions here.
-
Temporarily hook up the sensor to a desktop computer for calibration. In order to calibrate the sensor, you must download the AtlasDesktop software (you can find it under Documents and Downloads on the product page). They provide the step-by-step process in this video. As the sensor takes readings, the EZO board will flash cyan and green (see Pages 12 and 14 in EZO board document for LED color key).
-
After calibration, temporarily connect the sensor to the onboard RPI and pull up the BlueOS terminal. Enter the command “red-pill” to exit the docker container and get to root. Here you will need to install some libraries to run the USB mode for the sensor on the RPI. In this RPI code document, refer to page 6 and install the libftdi-dev package. You do not need to install the Python pylibftdi package. Go to the udev folder in the terminal and create a udev rule file. Open the file and create the udev rule as per the instructions. When you create the lengthy rule, do NOT enter - it is all one line of code. On page 7, only commence with the udev service restart - do not continue following through the rest of the steps on that page.
-
Next, you’ll need to install the Node-RED extension. Node-RED will be the dashboard for displaying the readings of the sensor. Tony at BR has provided a very helpful tutorial on setting up and utilizing Node-RED on BlueOS, here. He discusses the use of Node-RED Dashboard too, which will be key in displaying the sensor values (I utilized Node-RED Dashboard 2.0, but they’re both great). Create a serial input node, a function node, a gauge node (from either Dashboard 1.0 or 2.0), and a debug node. In the serial node, the baud rate should be at 9600, the input should be split on the character: 0x0D and deliver ASCII strings, the output messages should have the added character: 0x0D, and select the appropriate serial port (ie: “/dev/ttyUSBX” - X being whichever port number used). In the function node, write a snippet of JavaScript to exclude the “over voltage” (shown as *OV) alert from the returned message. Configure the gauge (or whatever you chose from the dashboard to display your readings) however you like. These nodes should all be connected into a single Node Flow (see figure 1 below).
-
Very important! In addition to the first Node Flow, you must create a second one as well using an “inject output string” node and a serial output node. In the inject node, inject a payload message to enable conductivity parameters and disable all other sensor parameters. Use page 28 in the EZO board document as reference for the commands. Inject each command one at a time. Deploy your Node Flows and the conductivity sensor readings should appear in the debug window.
-
To obtain the URL for the gauge dashboard, go to the upper right hand corner of Node-RED and click the little drop-down arrow. It will give you a list of options to choose from, including one that says “Dashboard” - click on that. It will take you to a new side panel menu showing all the nodes you have running on the Dashboard. Just under the drop down arrow is a button that says “Open Dashboard.” Click that button and it’ll open a separate browser page. In the URL, type “/page1” and the dashboard will finish loading (you can change this path name in the gauge node settings). Copy the URL of the gauge and paste it into an iFrame in Cockpit. Adjust the settings of the gauge browser view in the dashboard node as needed or as desired. Test the conductivity sensor in salty water and watch in Cockpit as the gauge fluctuates with the different readings.
-
Create a mount for the sensor and attach it to the frame of the ROV. Then finally, stand back and admire the cool new sensor!
Hope this is helpful for some folks! If you have any extra questions on this feel free to ask